摘要:
Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:26088Accepted:9035DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D i 阅读全文
摘要:
Safe Or UnsafeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1388Accepted Submission(s): 544Problem DescriptionJavac++ 一天在看计算机的书籍的时候,看到了一个有趣的东西!每一串字符都可以被编码成一些数字来储存信息,但是不同的编码方式得到的储存空间是不一样的!并且当储存空间大于一定的值的时候是不安全的!所以Javac++ 就想是否有一种方式是可以得到字符编码最小的空间值!显然 阅读全文
摘要:
EntropyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3648Accepted Submission(s): 1451Problem DescriptionAn entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with “wasted” or “extra” informatio 阅读全文
摘要:
Box RelationsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 894Accepted Submission(s): 324Special JudgeProblem DescriptionThere arenboxesC1, C2, ..., Cnin 3D space. The edges of the boxes are parallel to thex, yorz-axis. We provide some relations 阅读全文
摘要:
Tr ATime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2449Accepted Submission(s): 1819Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input数据的第一行是一个T,表示有T组数据。每组数据的第一行有n(2 8 #include 9 #define N 997310 struct matrix{11 int g[15]... 阅读全文
摘要:
GCDTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5064Accepted Submission(s): 1818Problem DescriptionGiven 5 integers: a, b, c, d, k, you're to find x in a...b, y in c...d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x an 阅读全文
摘要:
GCDTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 890Accepted Submission(s): 396Problem DescriptionThe greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,( 阅读全文
摘要:
CupTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3533Accepted Submission(s): 1136Problem DescriptionThe WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tell us it height?T 阅读全文
摘要:
Calculation 2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1923Accepted Submission(s): 812Problem DescriptionGiven a positive integer N, your task is to calculate the sum of the positive integers less than N which are not coprime to N. A is said 阅读全文
摘要:
GCD AgainTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2257Accepted Submission(s): 908Problem DescriptionDo you have spent some time to think and try to solve those unsolved problem after one ACM contest?No? Oh, you must do this when you want to 阅读全文
摘要:
欧拉函数 1 /* 2 欧拉函数: 3 小于或等于n的正整数中,与n互质的数的数目 4 */ 5 #include 6 #define N 3000005 7 __int64 ans[N]; 8 void init() //打表法 9 {10 for(int i=1;i1) ret*=n-1;29 return ret;30 } 31 int main(void)32 {33 int n;34 while(scanf("%d",&n)!=EOF)35 {36 printf("%d\n",euler(n));37... 阅读全文
摘要:
The Euler functionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3333Accepted Submission(s): 1368Problem DescriptionThe Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smalle 阅读全文
摘要:
找新朋友Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6952Accepted Submission(s): 3612Problem Description新年快到了,“猪头帮协会”准备搞一个聚会,已经知道现有会员N人,把会员从1到N编号,其中会长的号码是N号,凡是和会长是老朋友的,那么该会员的号码肯定和N有大于1的公约数,否则都是新朋友,现在会长想知道究竟有几个新朋友?请你编程序帮会长计算出来。Input第一行是测试数据的组数CN(Case 阅读全文
摘要:
PetTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1054Accepted Submission(s): 528Problem DescriptionOne day, Lin Ji wake up in the morning and found that his pethamster escaped. He searched in the room but didn’t find the hamster. He tried to use 阅读全文
摘要:
CubeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1307Accepted Submission(s): 674Problem DescriptionGiven an N*N*N cube A, whose elements are either 0 or 1. A[i, j, k] means the number in the i-th row , j-th column and k-th layer. Initially we h 阅读全文