这题简单,只要看懂题目就好,坑爹的是我的英语水平太差了,wa了n次,所以 仅此纪念 一下. //坑爹的英语题目,注意重点:move d times clockwise the current time #include<stdio.h> #include<string.h> int main() { ]; while(scanf("%d%d",&s,&d)!=EOF) { &&d==)break; e=s; ;i<;i++)…
Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall…
有两个序列A和B,A=(a1,a2,...,ak),B=(b1,b2,...,bk),A和B都按升序排列.对于1<=i,j<=k,求k个最小的(ai+bj).要求算法尽量高效. int *min_k(int *A, int *B, int len1, int len2, int k) { if (A == NULL || B == NULL || k <= 0) return NULL; int i, j; int *tmp = new int[k]; i = len1; j = len…