随笔分类 - OJ---ZOJ,POJ
摘要:ZOJ2150 快速幂,但是用递归式的好像会栈溢出。 #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> using namespace std; long long M,i; #define LL long l
阅读全文
摘要:初步找大概位置,然后找精确位置,算是简单化的分块吧! #include<cstdio> #include<cstdlib> #include<iostream> using namespace std; int c[5000]; int num=0; void _get() { int k=1,m;
阅读全文
摘要:我想我是和Segmentation Fault有仇,我一直以为是空间开大的问题,然后一直减少空间,还是SF,谁让n没有给范围了,qwq。教训:以后注意输入范围和开的空间大小。#include#include#include#includeusing namespace std;int a[34000...
阅读全文
摘要:#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...
阅读全文
摘要:ZOJ2105:点击打开链接错误代码#include#includeint q[110];int main(){ int a,b,n,T; while(~scanf("%d%d%d",&a,&b,&n)&&(a||b||n)...
阅读全文
摘要:ZOJ2006(最小表示法) 题目大意:输出第一个字符串的最小字典序字串的下标!然后我居然想试一试string的erase的能力,暴力一下,然后20msAC了,尴尬的数据。。。。。。。。。。#include#incl...
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:题目要求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):...
阅读全文
摘要:第二次遇到双塔DP,再写一下。 (flag是为了避免memset多次导致的时间浪费) #include<cstdio> #include<cstdlib> #include<iostream> #include<cstring> using namespace std; char x[410],y[
阅读全文

浙公网安备 33010602011771号