摘要:
Labeling Balls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9641 Accepted: 2636 Description Windy has N balls of distinct weights from 1 unit to N units. Now he tries to label ... 阅读全文
摘要:
Count Color Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33311 Accepted: 10058 Description Chosen Problem Solving and Program design as an optional course, you are required to ... 阅读全文
摘要:
PeriodTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 12089Accepted: 5656DescriptionFor each prefix of a given string S with N characters (ea... 阅读全文
摘要:
Power StringsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 29663Accepted: 12387DescriptionGiven two strings a and b we define a*b to be the... 阅读全文
摘要:
Can you solve this equation? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7156 Accepted Submi 阅读全文
摘要:
10679 多少个1 该题有题解 时间限制:1000MS 内存限制:65535K 题型: 编程题 语言: 无限制 Description Acm比赛里面经常需要巧妙方法处理数据,如求给定数组的最大连续和就可用到前缀和。现在给出一个给定长度的且初始化为0的数组, 然后对该数组的一系列区间做取反操作,最后询问数组中有多少个1。(取反操作:原来是0就变为1,是1就变为0) 输入格式 输... 阅读全文
摘要:
Sliding Window Time Limit: 12000MSMemory Limit: 65536K Case Time Limit: 5000MS Description An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very l... 阅读全文
摘要:
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers... 阅读全文
摘要:
看到好文章,忍不住就转了最短路径—Dijkstra算法和Floyd算法Dijkstra算法1.定义概览Dijkstra(迪杰斯特拉)算法是典型的单源最短路径算法,用于计算一个节点到其他所有节点的最短路径。主要特点是以起始点为中心向外层层扩展,直到扩展到终点为止。Dijkstra算法是很有代表性的最短... 阅读全文
摘要:
Stockbroker Grapevine Time Limit: 1000MS Memory Limit: 10000K Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation... 阅读全文
摘要:
1003 - Drunk PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB One of my friends is always drunk. So, sometimes I get a bit confused whether he is drunk or not.... 阅读全文
摘要:
1215 - Finding LCMTime Limit: 2 second(s) Memory Limit: 32 MBLCM is an abbreviation used for Least Common Multiple in Mathematics. We say LCM (a, b, c) = L if and only if L is the least integer which is divisible by a, b and c.You will be given a, b and L. You have to find c such that LCM (a, b, c) 阅读全文
摘要:
比如乘法AB一、1)用A的第1行各个数与B的第1列各个数对应相乘后加起来,就是乘法结果中第1行第1列的数;//1=1*0+1*12)用A的第1行各个数与B的第2列各个数对应相乘后加起来,就是乘法结果中第1行第2列的数;//3=1*2+1*13)用A的第1行各个数与B的第3列各个数对应相乘后加起来,就是乘法结果中第1行第3列的数;//5=1*3+1*2依次进行,(直到)用A的第1行各个数与B的第末列各个数对应相乘后加起来,就是乘法结果中第1行第末列的的数,二、1)用A的第2行各个数与B的第1列各个数对应相乘后加起来,就是乘法结果中第2行第1列的数;//0=2*0+0*12)用A的第2行各个数与B 阅读全文
摘要:
Drying Time Limit: 2000MS Memory Limit: 65536K Description It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart g 阅读全文
摘要:
1: #include 2: #include 3: using namespace std; 4: const int maxn=10000; 5: int a[maxn],n; 6: 7: int Partition(int l,int r) 8: { 9: int key=a[l]; 10: while(l=key) r--; 13: a[l]=a[r]; 14: while(l<r&&a[l]<=key) l++; 15: a[r]=a[l]; 16: } 1... 阅读全文