自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

石前有座桥的博客

自律即自由

  • 博客(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 181

原创 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 161

转载 筛选素数

参照算法笔记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 178

原创 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 193

原创 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 133

转载 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 233

转载 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 185

转载 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 156

原创 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 170

转载 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 188

原创 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 163

转载 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 200

转载 字符串哈希

参照算法笔记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 624

转载 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 201

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除