随笔分类 - ACM-POJ
摘要:Description The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cow
阅读全文
摘要:Description FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjace
阅读全文
摘要:Description Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in som
阅读全文
摘要:There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he c
阅读全文
摘要:1.hdu--4513 吉哥系列故事——完美队形II http://acm.hdu.edu.cn/showproblem.php?pid=4513 题意:中文题不解释 思路:数字型的manachar算法。将模板中的比较字符改为比较数字就行了。 AC代码: 1 #include <iostream>
阅读全文
摘要:Description The cows are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superi
阅读全文
摘要:Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the
阅读全文
摘要:Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poste
阅读全文
摘要:Description An array of size n ≤ 10 6 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very
阅读全文
摘要:Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the leve
阅读全文
摘要:Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping
阅读全文
摘要:Description For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a g
阅读全文
摘要:题目链接: http://poj.org/problem?id=2488 注意两点: 1.本题要求按照字典序最小输出所以a[8]={-1, 1, -2, 2, -2, 2, -1, 1},b[8]={-2, -2, -1, -1, 1, 1, 2, 2} 2.由于 1 <= p * q <= 26所
阅读全文
摘要:第一个深搜的问题,虽然很简单,但是很高兴,加油!!! 题目链接: http://poj.org/problem?id=2386 题目交了好几次,一直RE,又重新写了一遍总算是A了 最初RE是由于是s[x][y]='#'放到了dfs的后面,以后要把最初的改变放在前面 RE代码,引以为戒: 1 #inc
阅读全文

浙公网安备 33010602011771号