随笔分类 - OJ---ZOJ,POJ
摘要:Out of N soldiers, standing in one line, it is required to choose several to send them scouting. In order to do that, the following operation is perfo
阅读全文
摘要:For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The
阅读全文
摘要:Kinds of FuwasTime Limit: 2 Seconds Memory Limit:65536 KBIn the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the ...
阅读全文
摘要:Accurately Say "CocaCola"!范围找到:1——700左右,然后打表就ok了#include#include#includeusing namespace std;bool a[810];int sum[810];int pos[810];void _judge(int v){ ...
阅读全文
摘要:题目要求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):...
阅读全文
摘要:Lenny likes to play the game of lotto. In the lotto game, he picks a list of N unique numbers in the range from 1 to M. If his list matches the list o
阅读全文
摘要:昨天做过一样的题: 平方和公式:n*(n+1)*(2n+1)/6
阅读全文
摘要:题意:两家原始人(猴)打交道后成为一家猴,打交道时两家分别派出最帅的两位猴子,颜值各自减半,问每次打交道后新家族最帅的猴子的颜值。当然,已经是一家子就没有必要打交道了,因为没有猴希望颜值降低,毕竟还得靠这个吃饭。裸裸的并查集+大根堆:由于在下写的queue,需要重量优化,不然超时#include#i...
阅读全文
摘要:第二次遇到双塔DP,再写一下。 (flag是为了避免memset多次导致的时间浪费) #include<cstdio> #include<cstdlib> #include<iostream> #include<cstring> using namespace std; char x[410],y[
阅读全文
摘要:我想我是和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...
阅读全文