- 博客(14)
- 收藏
- 关注
原创 1059. Prime Factors (25)
1059. Prime Factors (25) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 HE, Qinming Given any positive integer N, you are supp
2017-06-23 14:41:14 191
原创 1013. 数素数 (20)
1013. 数素数 (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 令Pi表示第i个素数。现任给两个正整数M 4,请输出PM到PN的所有素数。 输入格式: 输入在一行
2017-06-22 14:31:40 189
转载 筛选素数
参照算法笔记P162 首先确定2是素数,那么2的倍数一定不是素数,标记它们。 3未被标记,则3是素数,那么那么3的倍数一定不是素数,标记它们。 4已被标记,不是素数。 5未被标记,则5是素数,那么5的倍数一定不是素数,标记它们。 。。。 const int maxn = 1000001; int prime[maxn], num = 0; bool p[maxn] =
2017-06-22 14:23:58 210
原创 1069. The Black Hole of Numbers (20)
1069. The Black Hole of Numbers (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue For any 4-digit integer except t
2017-06-22 13:28:49 201
原创 1105. Spiral Matrix (25)
1105. Spiral Matrix (25) 时间限制 150 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue This time your job is to fill a sequence of
2017-06-21 16:04:38 142
转载 1022. Digital Library (30)
时间限制 1000 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A Digital Library contains millions of books, stored according to their tit
2017-06-17 13:59:52 246
转载 1071. Speech Patterns (25)
时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 HOU, Qiming People often have a preference among synonyms of the same word. For exampl
2017-06-12 15:06:31 197
转载 1108. Finding Average (20)
时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue The basic task is simple: given N real numbers, you are supposed to calculat
2017-06-11 16:00:33 164
原创 1120. Friend Numbers (20)
时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Two integers are called "friend numbers" if they share the same sum of their
2017-06-09 21:26:46 176
转载 1063. Set Similarity (25)
时间限制 300 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Given two sets of integers, the similarity of the sets is defined to be Nc/N
2017-06-09 21:19:30 195
原创 1047. Student List for Course (25)
时间限制 400 ms 内存限制 64000 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Zhejiang University has 40000 students and provides 2500 courses. Now given
2017-06-09 14:50:17 169
转载 1039. Course List for Student (25)
时间限制 200 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Zhejiang University has 40000 students and provides 2500 courses. Now given
2017-06-09 10:22:15 210
转载 字符串哈希
参照算法笔记P109 先假设字符串均由大写字母A~Z构成。在这个基础上,不妨把A~Z视为0~25,这样就把26个大写字母对应到了26进制中。接着,按照将26进制转化为10进制的思路,由进制的转换结论可知,在进制转换过程中,得到的10进制肯定是唯一的,由此便可实现将字符串映射为整数的需求(注意:转换成的最大整数位(int)(pow(26,len)-1),len为字符串长度) int
2017-06-09 10:14:29 641
转载 1056. Mice and Rice (25)
时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Mice and Rice is the name of a programming contest in which each programmer
2017-06-02 21:29:20 218
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人