zl程序教程

解题报告

  • ECUST 09年 校赛个人赛第三场部分解题报告(A,D,F,I)

    ECUST 09年 校赛个人赛第三场部分解题报告(A,D,F,I)

    校赛个人赛第三场部分解题报告(A,D,F,I)这次我完成了四道题分别是A,D,F,I一大半时间我都花在了A上,我犯了很究级的错误首先是VC6.0的algorithm里没有min函数,而我用min做变量名导致CE4次,找了半天才找出来其次是我的最短路算法中错误和初始化错误交替出现导致的6次WAA. The K-th CityA题的大意是给出几个城市之间的距离,要求算出第k远的城市因为数据量较小,可以

    日期 2023-06-12 10:48:40     
  • 因数的多少——解题报告

    因数的多少——解题报告

    因子数【1,n】中的数进行余数的判断,若为0,则是它的一个因数,对应的优化便是【1,sqrt(n)】的判断1,返回因子数返回因子数 题目的意思是:一个数只含有2,3,5,7因子,返回它包含的因子数#include<cstdio> #define ll long long int main() { ll n; int yueshu[4] = { 2,3,5,7 }; while

    日期 2023-06-12 10:48:40     
  • 【LeetCode】Min Stack 解题报告

    【LeetCode】Min Stack 解题报告

    【题目】 Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()

    日期 2023-06-12 10:48:40     
  • pat解题报告【1082】

    pat解题报告【1082】

    1082. Read Number in Chinese (25) 时间限制   400 ms 内存限制   32000 kB 代码长度限制   16000 B 判题程序     Standard     作者 

    日期 2023-06-12 10:48:40     
  • 【LeetCode】Repeated DNA Sequences 解题报告

    【LeetCode】Repeated DNA Sequences 解题报告

    【题目】 All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the D

    日期 2023-06-12 10:48:40     
  • leetcode 201. 数字范围按位与 解题报告

    leetcode 201. 数字范围按位与 解题报告

    给定范围 [m, n],其中 0 <= m <= n <= 2147483647,返回此范围内所有数字的按位与(包含 m, n 两端点)。 示例 1: 输入: [5,7] 输出: 4 示例 2: 输入: [0,1] 输出: 0 思路分析 由于是按位与,那么某位一旦出现0,结果该位肯定是0。所以只需要考虑m,n都是1的位置。那么直接从高位开始,往低位走,直到遇到该为的数字不相

    日期 2023-06-12 10:48:40     
  • poj解题报告——poj 3536 Beer Refrigerator

    poj解题报告——poj 3536 Beer Refrigerator

    原题入口 poj 3536 Beer Refrigerator 题目描述 Beer Refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submis

    日期 2023-06-12 10:48:40     
  • poj解题报告——poj 1493 Machined Surfaces

    poj解题报告——poj 1493 Machined Surfaces

    原题入口 poj 1493 Machined Surfaces 题目描述 Machined Surfaces Time Limit: 1000MS Memory Limit: 10000K Total Submis

    日期 2023-06-12 10:48:40     
  • [LeetCode]Container With Most Water, 解题报告

    [LeetCode]Container With Most Water, 解题报告

    前言 难怪LeetCode OJ在找工作时被很多人推荐,发现了这道最大蓄水题目就是美团的笔试最后一道题,当时我霸笔只有着一道题目没有答出来,因此也就没有获得面试机会,可惜了 题目 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n

    日期 2023-06-12 10:48:40     
  • 【LeetCode】Word Break 解题报告

    【LeetCode】Word Break 解题报告

    Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For example, given s&nb

    日期 2023-06-12 10:48:40     
  • 【LeetCode】Generate Parentheses 解题报告

    【LeetCode】Generate Parentheses 解题报告

    【题目】 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()

    日期 2023-06-12 10:48:40