摘要: p.s.这场比赛题目都还挺好的我觉得,但还是做跪了,要是没那4个hack的话就死了...A.略B.解法:可以直接预处理出来距离每个数最近的素数,然后加一遍。当然也可以打个素数表然后二分。我的二分写法 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<iostream> 5 #define N 1000010 6 using namespace std; 7 bool p[N]; 8 int s[N]; 9 int x[1010][1010];10 int 阅读全文
posted @ 2013-02-12 20:04 silver__bullet 阅读(182) 评论(0) 推荐(0) 编辑