Live2d Test Env

随笔分类 -  OJ---ZOJ,POJ

摘要:Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concate 阅读全文
posted @ 2017-12-10 14:39 nimphy 阅读(475) 评论(0) 推荐(0)
摘要:问题: The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being w 阅读全文
posted @ 2017-12-10 11:17 nimphy 阅读(225) 评论(0) 推荐(0)
摘要:问题 Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atom 阅读全文
posted @ 2017-12-03 16:24 nimphy 阅读(383) 评论(0) 推荐(0)
摘要:The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest num 阅读全文
posted @ 2017-11-29 16:24 nimphy 阅读(317) 评论(0) 推荐(0)
摘要:The terrorist group leaded by a well known international terrorist Ben Bladen is buliding a nuclear reactor to produce plutonium for the nuclear bomb 阅读全文
posted @ 2017-11-20 20:55 nimphy 阅读(289) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/u014355480/article/details/40862041 ZOJ2091题意:其实就是找后几个数的平均值的最大值!! (贪心策略!要找对)k=1,... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(108) 评论(0) 推荐(0)
摘要:我想我是和Segmentation Fault有仇,我一直以为是空间开大的问题,然后一直减少空间,还是SF,谁让n没有给范围了,qwq。教训:以后注意输入范围和开的空间大小。#include#include#include#includeusing namespace std;int a[34000... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(136) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; struct In { int id; int ReturnTime; int period; In(int i, int p):id(i), ReturnTime(p), period(p){} //重载写在在里面又怎么写? }; bool operato... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(112) 评论(0) 推荐(0)
摘要:ZOJ2105:点击打开链接错误代码#include#includeint q[110];int main(){ int a,b,n,T; while(~scanf("%d%d%d",&a,&b,&n)&&(a||b||n)... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(137) 评论(0) 推荐(0)
摘要:ZOJ2006(最小表示法) 题目大意:输出第一个字符串的最小字典序字串的下标!然后我居然想试一试string的erase的能力,暴力一下,然后20msAC了,尴尬的数据。。。。。。。。。。#include#incl... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(114) 评论(0) 推荐(0)
摘要:Alice bought a lot of pairs of socks yesterday. But when she went home, she found that she has lost one of them. Each sock has a name which contains e 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(250) 评论(0) 推荐(0)
摘要:FatMouse's SpeedTime Limit: 2 Seconds Memory Limit:65536 KB Special Judge FatMouse believes that the fatter a mouse is, the faster it runs. To disprov 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(256) 评论(0) 推荐(0)
摘要:Given any integer 0 <= n <= 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many dig 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(172) 评论(0) 推荐(0)
摘要:题目要求FIFO#include#include#include#include#include#include#includeusing namespace std;struct in{ string name; int id; int dex; in(string s,int d,int x):... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(151) 评论(0) 推荐(0)
摘要:第二次遇到双塔DP,再写一下。 (flag是为了避免memset多次导致的时间浪费) #include<cstdio> #include<cstdlib> #include<iostream> #include<cstring> using namespace std; char x[410],y[ 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(404) 评论(0) 推荐(0)
摘要:题目:一个由‘.’和‘#’组成矩形,统计里面'.'组成的矩形的个数。 点击打开链接 自己写挂了,懒得搞了 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(201) 评论(0) 推荐(0)
摘要:分析: 组合数学类型的题目。 正常的话可能会去分解1~N数里面有几个5和2,但是这样的复杂度为O(nlogn)。 其实有更巧妙的办法,可以把问题分解成子问题。 可以发现N!末尾的0与1~N中有几个5的因子相同(因为2总是比5多)。 1~N中只有5的倍数包含5因子,比如[5, 10, 15, 20..... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(146) 评论(0) 推荐(0)
摘要:传送门:Zoj2002题目大意:从左到右把一排数字k分,得到最小化最大份,如果有多组解,左边的尽量小。思路:贪心+二分(参考青蛙过河)。方向:从右向左。注意:有可能最小化时不够k分。如 ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(116) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/loy_184548/article/details/51154195 一开始对不同组合得不同分数(mm1,mg2,gg3),想用sap来写,但是保证了最大girl数却没有记录下组数.标准解法应该是KM,自己写一遍了再来改博客。。。。。。。 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(104) 评论(0) 推荐(0)
摘要:Zoj1654 标准解法:二分匈牙利。 写法各异嘛,看不懂或者懒得看也正常,如果想了解我思路的可以和我讨论的。 在练习sap,所以还是写了一遍: 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(159) 评论(0) 推荐(0)