![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
(●´ω`●)φ
文章平均质量分 79
风动护花
喜欢我你就关注我,有话说你就评论我,没话说你就点个赞≖‿≖✧
展开
-
ICPC 6823 Counting substhreengs
题意:求出满足要求的子串个数,要求是:子串都是数字,并且能被3整除。做法:动态规划的思想。弄一个数组记录当前选定值之前的情况,num[0]记录余数为0的个数。假设选定当前值作为数字的最后一个位数,如果当前值mod3等于1,那么前面num[2]的数加上当前值都能变成余数0,所以num[0]=num[2].以此类推......不用long long 会wa。#include#includ原创 2015-09-03 12:51:53 · 602 阅读 · 0 评论 -
CF 546C Soldier and Cards
C. Soldier and Cardstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo bored soldiers are playing card wa原创 2015-10-26 22:23:11 · 579 阅读 · 0 评论 -
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 · 431 阅读 · 0 评论 -
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 · 345 阅读 · 0 评论 -
CF 588B Duff in Love
B. Duff in Lovetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDuff is in love with lovely numbers! A posi原创 2015-10-30 20:20:29 · 746 阅读 · 0 评论 -
CF 557B Pasha and Tea
B. Pasha and Teatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPasha decided to invite his friends to a te原创 2015-10-30 22:18:59 · 616 阅读 · 0 评论 -
CF 545C Woodcutters
C. Woodcutterstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Susie listens to fairy tales before be原创 2015-10-31 14:36:59 · 507 阅读 · 0 评论 -
CF 570C Replacement
C. Replacementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaniel has a string s, consisting of lowerca原创 2015-10-31 15:06:19 · 549 阅读 · 0 评论 -
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 · 482 阅读 · 0 评论 -
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 · 396 阅读 · 0 评论 -
CF 584B Kolya and Tanya
B. Kolya and Tanyatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKolya loves putting gnomes at the circle原创 2015-10-25 21:02:59 · 554 阅读 · 1 评论 -
CF 554B Ohana Cleans Up
B. Ohana Cleans Uptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOhana Matsumae is trying to clean a room原创 2015-10-22 21:13:57 · 339 阅读 · 0 评论 -
CF 158D Ice Sculptures
D. Ice Sculpturestime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Berland University is preparing to ce原创 2015-10-22 22:01:20 · 485 阅读 · 0 评论 -
ICPC 6828 Help cupid(Regionals 2014 >> Latin America)
Cupid’s job is getting harder, so he is adopting new technologies to help him with his difficult task of matching people into happy couples. He appointed the best programmers in his staff to a new projec原创 2015-09-03 16:39:23 · 451 阅读 · 0 评论 -
ICPC 6918 And Or
#include#includeusing namespace std;#define ll long longlong long A,B;ll solve(ll x){ ll cnt = 0; ll y = 1; while(x>=y) { // cout<<"/////"<<endl; y = y<<1; ++cnt; } return cnt;}int原创 2015-09-02 15:06:44 · 442 阅读 · 0 评论 -
ICPC 6789 Superstitious Socks
题目意思是,这个人有很多袜子。socks(袜子的复数)但是他每只袜子长度都不一样。他每天穿一对长度差最小的袜子,穿完之后第二天就换,也就是说,每一对匹配出来的袜子他只会穿一天。求第K天他穿的袜子长度。解法:直接暴力是不对的。先对两只袜子的长度差进行二分。然后再查找长度差的值。关键在,计算这个长度差范围之内的袜子匹配种数。应为对袜子排序过。所以可以看出,中间一大段都是重复的计原创 2015-09-08 21:11:57 · 571 阅读 · 0 评论 -
ICPC 6834 Shopping
题意:有一个人去市场上买东西,他要穿越整个市场。市场是一条直线,线上有N家店。一般这个人不会去买东西,但是会有一个限制条件,比如C1,D1;意思是,想要路过D1店,必须返回C1店买东西,然后再回来。。所以最短的路线就是,直接穿越整个市场的路程加上重复的区间 。#include#includeusing namespace std;typedef struct pp{ int first原创 2015-09-06 12:45:07 · 478 阅读 · 0 评论 -
HDU 3826 Squarefree number
Squarefree numberTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2754 Accepted Submission(s): 695Problem DescriptionIn mathemati原创 2015-10-02 10:30:01 · 511 阅读 · 0 评论 -
HDU 3819 A and B Problem
A and B ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 786 Accepted Submission(s): 251Problem DescriptionAfter calculatin原创 2015-10-02 10:56:30 · 560 阅读 · 0 评论 -
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 · 438 阅读 · 0 评论 -
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 · 468 阅读 · 0 评论 -
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 · 389 阅读 · 0 评论 -
HDU2104 hide handkerchief
Problem Description The Children’s Day has passed for some days .Has you remembered something happened at your childhood? I remembered I often played a game called hide handkerchief with my friends.原创 2017-05-03 10:34:24 · 359 阅读 · 0 评论