- 博客(18)
- 资源 (1)
- 收藏
- 关注
原创 小注意点~
3 题目:一个素数反过来还是一个素数且不等于本身,那么这个数是满足条件的,求第K个满足条件的数,如果这个数大于10的6次则输出-1. K的范围是1到1000, 注意点是:K它说是一千就把数组开到一千啦?用筛选法求的时候,10的6次方内会求出不止一千个满足条件的数,K开到10的6次方能保证程序正常运行。这题提醒我 ,开数据不要直接根据题目来,脑子呢?
2015-11-26 20:57:35 291
原创 找规律小总结~
1 有事没事要想一想GCD。 比如说一系列的卡片1 2 3 4 5 6,n等于6,k= 4,那么就变成5 6 1 2 3 4,从第一张卡片5开始跳跃,跳到第五张卡片3,再跳到第三张卡片1,直至完成一个循环,继续从第二张木有跳过的卡片开始跳跃。。。。。求有多少个循环。 开始找规律,发现答案直接就是gcd(n,k).
2015-11-26 20:55:25 386
原创 小注意点~
1.模拟题里面要注意int,判断一下是否会超过int.(例如: 所有元素都是int..要计算总和sum,sum就要考虑会超过int的范围)2 要把周期为T的数,从数X开始,初始化整个数组的时候for(int i=x;i<60000;i+=t) num[i]++; for(int i=x-t;i>=0;i-=t) num[i]++;应该如上 。不小心把int i = x-t写成i
2015-11-26 20:48:44 402
原创 CF 559B Equivalent Strings
B. Equivalent Stringstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday on a lecture about strings Gera
2015-11-25 14:11:31 408
原创 CF 534B Covered Path
B. Covered Pathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe on-board computer on Polycarp's car meas
2015-11-25 13:25:22 489
原创 CF 431C k-Tree
C. k-Treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputQuite recently a creative student Lesha had a lect
2015-11-24 20:44:06 353
原创 HDU 5570 balls
代码不是自己写的,这道题看上去是个好题。先囤着。#include#includeusing namespace std;int n;int m;int a[1005][1005];int sum[1005];double f[1005][1005];double g[1005][1005];double ans;int main(){ while(~scanf("%d%d"
2015-11-22 17:35:20 376
原创 HDU 5095 Linearization of the kernel functions in SVM
Linearization of the kernel functions in SVMTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 206 Accepted Submission(s): 109Proble
2015-11-13 09:08:59 355
原创 HDU 5090 Game with Pearls
Game with PearlsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1196 Accepted Submission(s): 441Problem DescriptionTom and Je
2015-11-13 08:43:03 435
原创 HDU 4190 Distributing Ballot Boxes
D - Distributing Ballot BoxesCrawling in process...Crawling failedTime Limit:10000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmitStatus Practice HDU 4190
2015-11-11 14:25:25 394
原创 优先队列~
struct typedef{ int tot; int num; int now; const int operator < (Node b) const { return this->cur < b.cur; }}node;自己声明的一个结构体。重点是要在结构体里面放一个重定义const int operator < (Node b) const { return
2015-11-11 13:57:28 300
原创 CF 500C New Year Book Reading
C. New Year Book Readingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNew Year is coming, and Jaehyun de
2015-11-09 18:37:54 677
原创 CF 501B Misha and Changing Handles
B. Misha and Changing Handlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMisha hacked the Codeforces si
2015-11-07 14:25:48 613
原创 CF 509B Painting Pebbles
B. Painting Pebblestime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputThere are n piles of pebbles on the
2015-11-06 20:48:00 447
原创 CF 581C Developing Skills
C. Developing Skillstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves computer games. Finally a g
2015-11-05 19:52:50 396
原创 CF 591B Rebranding
B. Rebrandingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe name of one small but proud corporation c
2015-11-04 16:18:17 496
原创 CF 414B Mashmokh and ACM
B. Mashmokh and ACMtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMashmokh's boss, Bimokh, didn't like Mas
2015-11-04 15:43:54 442
原创 位运算
举例:for(int mm = 0;mm{if(__builtin_popcount(mm)>1){int maxn = -10000;int minn = 10000;int tot = 0;for(int i=0;i{if((1{maxn = max(maxn,num[i]);minn = min(minn,num[i]);tot +
2015-11-04 14:15:41 358
git bash 2.19.1 Windows64安装包
2018-10-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人