SGU 115 Calendar
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…
SGU 108 self-number 规律
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…
洛谷P1709 [USACO5.5]隐藏口令Hidden Password 最小表示法
有时候程序员有很奇怪的方法来隐藏他们的口令。Binny会选择一个字符串S(由N个小写字母组成,5<=N<=5,000,000),然后他把S顺时针绕成一个圈,每次取一个做开头字母并顺时针依次取字母而组成一个字符串。这样将得到一些字符串,他把它们排序后取出第一个字符串。把这个字符串的第一个字母在原字符串中的位置-1做为口令。 如字符串ala…
SGU 107 987654321problem
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 …
SGU分类目录【转】
由于SGU上神题遍地,特列此表,便于训练时分类训练。 101 Domino 欧拉路 102 Coprime 枚举/数学方法 103 Traffic Lights 最短路 104 Little Shop of Flowers 动态规划 105 Div 3 找规律 106 The Equation 扩展欧几里德 107 987654321 Proble…
SGU 101. Domino 欧拉回路
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…