A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers...
分类:
其他好文 时间:
2015-02-25 21:11:47
阅读次数:
126
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...
分类:
其他好文 时间:
2015-02-25 21:11:19
阅读次数:
141
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:
The spa...
分类:
其他好文 时间:
2015-02-25 21:11:01
阅读次数:
177
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:
其他好文 时间:
2015-02-25 21:10:58
阅读次数:
151
To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...
分类:
其他好文 时间:
2015-02-25 21:10:23
阅读次数:
157
#include#includebool isprime(int num){ int sqr=(int)sqrt(num*1.0); //【skill】判断素数只要判断到开平方就可以了 for(int i=2 ; i=l && cnt=r) break; ...
分类:
其他好文 时间:
2015-02-24 13:47:35
阅读次数:
167
#include#includebool isprime(int num) //判断素数的子函数{ int sqr=(int)sqrt(num*1.0); for(int i=2 ; i<sqr+1 ; ++i) if(num%i==0) return 0; re...
分类:
其他好文 时间:
2015-02-24 13:45:13
阅读次数:
108
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...
分类:
其他好文 时间:
2015-02-24 12:38:14
阅读次数:
136
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...
分类:
其他好文 时间:
2015-02-24 12:37:00
阅读次数:
156
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec...
分类:
其他好文 时间:
2015-02-24 12:36:59
阅读次数:
344