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 阅读(468) 评论(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 阅读(224) 评论(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 阅读(378) 评论(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 阅读(316) 评论(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 阅读(284) 评论(0) 推荐(0)
摘要:ZOJ2150 快速幂,但是用递归式的好像会栈溢出。 #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> using namespace std; long long M,i; #define LL long l 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(94) 评论(0) 推荐(0)
摘要:初步找大概位置,然后找精确位置,算是简单化的分块吧! #include<cstdio> #include<cstdlib> #include<iostream> using namespace std; int c[5000]; int num=0; void _get() { int k=1,m; 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(122) 评论(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 阅读(135) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/u014355480/article/details/40862041 ZOJ2091题意:其实就是找后几个数的平均值的最大值!! (贪心策略!要找对)k=1,... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(106) 评论(0) 推荐(0)
摘要:题目:一个由‘.’和‘#’组成矩形,统计里面'.'组成的矩形的个数。 点击打开链接 自己写挂了,懒得搞了 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(199) 评论(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 阅读(143) 评论(0) 推荐(0)
摘要:ZOJ2006(最小表示法) 题目大意:输出第一个字符串的最小字典序字串的下标!然后我居然想试一试string的erase的能力,暴力一下,然后20msAC了,尴尬的数据。。。。。。。。。。#include#incl... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(113) 评论(0) 推荐(0)
摘要:传送门:Zoj2002题目大意:从左到右把一排数字k分,得到最小化最大份,如果有多组解,左边的尽量小。思路:贪心+二分(参考青蛙过河)。方向:从右向左。注意:有可能最小化时不够k分。如 ... 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(115) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/loy_184548/article/details/51154195 一开始对不同组合得不同分数(mm1,mg2,gg3),想用sap来写,但是保证了最大girl数却没有记录下组数.标准解法应该是KM,自己写一遍了再来改博客。。。。。。。 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(102) 评论(0) 推荐(0)
摘要:Zoj1654 标准解法:二分匈牙利。 写法各异嘛,看不懂或者懒得看也正常,如果想了解我思路的可以和我讨论的。 在练习sap,所以还是写了一遍: 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(156) 评论(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 阅读(242) 评论(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 阅读(249) 评论(0) 推荐(0)
摘要:A common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as " 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(103) 评论(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 阅读(169) 评论(0) 推荐(0)
摘要:Consider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expr 阅读全文
posted @ 2017-09-27 21:06 nimphy 阅读(147) 评论(0) 推荐(0)