time limit per test: 0.25 sec. memory limit per test: 4096 KB There is a group of N (2<=N<=1000) people which are numbered 1 through N, and everyone of them has not less…
time limit per test: 0.25 sec. memory limit per test: 4096 KB First year of new millenium is gone away. In commemoration of it write a program that finds the name of the day o…
time limit per test: 0.5 sec. memory limit per test: 4096 KB In 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive…
time limit per test: 0.25 sec. memory limit per test: 4096 KB Every city in Berland is situated on Ox axis. The government of the country decided to build new telecasting stat…
有时候程序员有很奇怪的方法来隐藏他们的口令。Binny会选择一个字符串S(由N个小写字母组成,5<=N<=5,000,000),然后他把S顺时针绕成一个圈,每次取一个做开头字母并顺时针依次取字母而组成一个字符串。这样将得到一些字符串,他把它们排序后取出第一个字符串。把这个字符串的第一个字母在原字符串中的位置-1做为口令。 如字符串ala…
time limit per test: 0.25 sec. memory limit per test: 4096 KB For given number N you must output amount of N-digit numbers, such, that last digits of their square is equal to …
Time limit per test: 0.25 second(s) Memory limit: 4096 kilobytes In the city of Dingilville the traffic is arranged in an unusual way. There are junctions and roads connecting…
由于SGU上神题遍地,特列此表,便于训练时分类训练。 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traffic Lights 最短路 104 Little Shop of Flowers 动态规划 105 Div 3 找规律 106 The Equation 扩展欧几里德 107 987654321 Proble…
time limit per test: 0.25 sec. memory limit per test: 4096 KB For given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let…
time limit per test: 0.25 sec. memory limit per test: 4096 KB Dominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of d…