摘要:
题 Description Rhason Cheung had a simple problem, and asked Teacher Mai for help. But Teacher Mai thought this problem was too simple, sometimes naive 阅读全文
摘要:
题 Description soda has a set $S$ with $n$ integers $\{1, 2, \dots, n\}$. A set is called key set if the sum of integers in the set is an even number. 阅读全文
摘要:
gcd算法: 通过辗转相除求最大公约数 #include<stdio.h> int gcd(int a,int b){ return a%b==0?b:gcd(b,a%b); } int main(){ printf("%d",gcd(15,18)); return 0; } 扩展gcd算法: 对于 阅读全文
摘要:
题 Description Give a time.(hh:mm:ss),you should answer the angle between any two of the minute.hour.second hand Notice that the answer must be not mor 阅读全文
摘要:
题 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝 阅读全文
摘要:
题 Description Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + 阅读全文
摘要:
Description Alice and Bob decide to play a funny game. At the beginning of the game they pick n(1 <= n <= 10 6) coins in a circle, as Figure 1 shows. 阅读全文
摘要:
题 Description A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves t 阅读全文