01 2016 档案
摘要:题目链接 Problem Description 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的
阅读全文
摘要:题目链接 Problem Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,
阅读全文
摘要:题目链接 Problem Description A while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmo
阅读全文
摘要:Time Limit: 1 Sec Memory Limit: 128 MB Description 有一个长度为n的字符串(只包含小写字母),操作m次,每次操作交换两个字母,输出最终字符串。 Input 多组输入,每组第一行为n,m表示字符串长度和操作数,1<n,m<=100000第二行为长度n的
阅读全文
摘要:题目链接 Problem Description Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C
阅读全文
摘要:题目链接 Problem Description Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For
阅读全文
摘要:题目链接 Problem Description Now,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try your l
阅读全文
摘要:题目链接 题解:题意为给出一个N*M的矩阵,然后(i∗2,j∗2) (i,j=0,1,2...)的点处是数字,两个数字之间是符号,其他位置是‘#’号。 但不知道是理解的问题还是题目描述的问题,数据中还有类似1#1这种数据存在,因此WA了4次,加上了一句代码后,马上AC了,该行代码在下文以斜粗体标出。
阅读全文
摘要:Time Limit: 1 Sec Memory Limit: 128 MB Description 你的任务是编写一个程序实现简单的字符宽度编码方法。规则如下:将任何2~9个相同字符的序列编码成2个字符:第1个字符是序列的长度,用数字字符2~9表示,第2个字符为这一串相同字符序列中的字符。超过9个
阅读全文
摘要:题目链接 题解:将每个单词倒置,可以用char数组,然后用空格分隔,这里用的是string和stringstream。 #include <cstdio> #include <iostream> #include <string> #include <sstream> #include <cstri
阅读全文
摘要:题目链接 Problem Description We know that some positive integer x can be expressed as x=A^2+B^2(A,B are integers). Take x=10 for example, 10=(-3)^2+1^2.We
阅读全文
摘要:题目链接 Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shak
阅读全文
摘要:题目链接 Problem Description Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an i
阅读全文
摘要:题目链接 Problem Description “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于
阅读全文

浙公网安备 33010602011771号