
ACM
文章平均质量分 87
_txg
平凡,是为了最美的荡气回肠
展开
-
cf 777A - A. Shell Game (水)
http://codeforces.com/contest/777/problem/ABomboslav likes to look out of the window in his room and watch lads outside playing famous shell game. The game is played by two persons: operator and原创 2017-02-24 19:54:33 · 939 阅读 · 0 评论 -
poj 3295 Tautology
题目链接:点击打开链接DescriptionWFF 'N PROOF is a logic game played with dice. Each die has six faces representing some subset of the possible symbols K, A, N, C, E, p, q, r, s, t. A Well-formed formula原创 2016-07-27 14:49:51 · 369 阅读 · 0 评论 -
poj 1573 Robot Motion
题目链接:点击打开链接DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible ins原创 2016-07-27 14:40:05 · 372 阅读 · 0 评论 -
poj 3278 Catch That Cow
题目链接:点击打开链接DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow原创 2016-07-27 14:32:09 · 269 阅读 · 0 评论 -
poj 2996 Help Me with the Game
题目链接:点击打开链接DescriptionYour task is to read a picture of a chessboard position and print it in the chess notation.InputThe input consists of an ASCII-art picture of a chessboard with chess piec原创 2016-07-26 23:08:28 · 413 阅读 · 0 评论 -
poj 2630 Crashing Robots
题目链接:点击打开链接DescriptionIn a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other.原创 2016-07-26 22:56:43 · 333 阅读 · 0 评论 -
poj 1068 Parencodings
题目链接:点击打开链接DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:q By an integer sequence P = p1 p2...pn where pi is the number of left原创 2016-07-26 22:44:32 · 262 阅读 · 0 评论 -
poj 2109 Power of Cryptography
题目链接:点击打开链接DescriptionCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers among these primes. Work in this area has resulted in the p原创 2016-07-25 21:17:13 · 274 阅读 · 0 评论 -
poj 1328 Radar Installation
题目链接:点击打开链接DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar原创 2016-07-25 21:11:00 · 257 阅读 · 0 评论 -
cccc --5-2 打印多层金字塔
题目链接:点击打开链接本题目要求读入2个整数N和M,m表示小金字塔的行数,n代表大金字塔的层数。然后输出多层金字塔。输入格式:输入在一行中正整数N和M。输出格式:对每一组输入,显示对应的图案。输入样例:2 3输出样例:#include #includeusing namespace std;int main(int argc, char**原创 2016-07-12 10:16:44 · 962 阅读 · 0 评论 -
poj 2299 Ultra-QuickSort
题目链接:点击打开链接DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements un原创 2016-08-04 21:18:36 · 248 阅读 · 0 评论 -
poj 1442 Black Box
题目链接:点击打开链接DescriptionOur Black Box represents a primitive(原始的) database. It can save an integer(整数) array(数组) and has a special i variable(变量). At the initial moment Black Box is empty and原创 2016-08-09 20:09:03 · 366 阅读 · 0 评论 -
poj 3087 Shuffle'm Up
题目链接:点击打开链接DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, eac原创 2016-08-11 20:33:23 · 278 阅读 · 0 评论 -
Problem on Group Trip UVALive - 7219 (模拟+优先队列处理)
点击打开链接题目大意:有三个浴池s1,s2,s3,有n个人。每个人在每个浴池中所呆的时间为s[i].m1,s[i].m2,s[i].m3. 每次进浴池的时候要按n个人的序号的大小进行排队。310 25 150 0 250 15 10例如上面这组数据,有三个人,第一个人在s1中的时间是10,在s2中的时间是25,在s3中的时间是15,0表示这个人不需要再该浴池中,而且原创 2017-02-18 16:09:34 · 541 阅读 · 0 评论 -
HDU - 5929 Basic Data Structure(模拟+规律)
http://acm.hdu.edu.cn/showproblem.php?pid=5929Problem DescriptionMr. Frog learned a basic data structure recently, which is called stack.There are some basic operations of stack:∙ PUSH原创 2017-02-15 18:03:17 · 414 阅读 · 0 评论 -
CodeForces - 2A - Winner
点击链接:https://vjudge.net/problem/19977/originThe winner of the card game popular in Berland "Berlogging" is determined according to the following rules. If at the end of the game there is only on原创 2017-01-10 22:10:36 · 412 阅读 · 0 评论 -
vj Om Nom and Dark Park
DescriptionOm Nom is the main character of a game "Cut the Rope". He is a bright little monster who likes visiting friends living at the other side of the park. However the dark old parks can scar原创 2016-11-01 21:36:50 · 541 阅读 · 0 评论 -
vj Fox and Box Accumulation
DescriptionFox Ciel has n boxes in her room. They have the same size and weight, but they might have different strength. The i-th box can hold at most xi boxes on its top (we'll call xi the st原创 2016-11-01 21:23:55 · 384 阅读 · 0 评论 -
线段树求逆序数(模板)
经过两天的调试终于弄明白了线段树求逆序数,;说一下思路: 首先建树是根据序列中最大的数开辟的区间,(如果数太大 离散化)。 逆序对可以表示成一个数前面有几个比这个数大的数,就表示这个数所形成的逆序对数,(听绕口的,需要模拟一下); 数列a[i],将数列a[i]添加到线段树中,并将区间中有它的区间的num+1,意思是在当前的区间上有几个值了,记录下来。 因为原创 2016-10-11 11:31:37 · 1045 阅读 · 0 评论 -
Codeforce 1B Spreadsheets
题目链接:点击打开链接DescriptionIn the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — number B, etc. ti原创 2016-10-10 10:56:52 · 437 阅读 · 0 评论 -
常见定理与方法(一)
1.两点间的曼哈顿距离如果为偶数,那么两点间可以走偶数步到达2.求小于等于n 的素数的个数。 100=(2^2)*(5^2) num[100]=(2+1)*(2+1)=9; 10=2*5 num[10]=(1+1)*(1+1)=4; 48=(2^4)*(3^1) num[48]=(4+1)*(1+1)=103.以格子点为顶点的线段,覆盖的点的个数为原创 2016-09-17 21:45:23 · 484 阅读 · 0 评论 -
注意事项(一)
1. 注意特殊情况。 2. G++输出double用f%。 3. 一定要考虑0啊。 4. 定义变量的时候注意定义的是全局还是局部。 5. 回溯时,一定要看好是否完全回溯了。6. 注意visit数组的标记。 7. Short int 数组可以存到5001*5001。8. 注意使用long long。 9. 注意变量的初始化。 10. 结果是否需要mod一个数原创 2016-09-17 21:43:44 · 272 阅读 · 0 评论 -
输入挂
namespace fastIO { #define BUF_SIZE 1000000 //fread -> read bool IOerror = 0; inline char nc() { static char buf[BUF_SIZE], *p1 = buf + BUF_SIZE, *pend = buf +转载 2017-08-25 11:13:16 · 414 阅读 · 0 评论