
非常简单的签到题
JeraKrs
本人目前就职于百度商业研发部,有需要内推的朋友简历可发我邮箱 jerakrs@qq.com
展开
-
uva 10420 List of Conquests(检索+排序)
List of ConquestsInput: standard inputOutput: standard outputTime Limit: 2 secondsIn Act I, Leporello is telling Donna Elvira about his master's long list of conquests:``This is the list of原创 2013-07-28 15:15:45 · 1625 阅读 · 0 评论 -
uva 156 Ananagrams(检索+sort排序)
Most crossword puzzle fans are used to anagrams--groups of words with the same letters in different orders--for example OPTS, SPOT, STOP, POTS and POST. Some words however do not have this attribute,原创 2013-07-28 15:43:49 · 1538 阅读 · 0 评论 -
uva 10785 The Mad Numerologist(遍历+sort排序)
The Mad Numerologist Numerology is a science that is used by many people to find out a mans personality, sole purpose of life, desires to experience etc. Some calculations of numerology原创 2013-07-28 14:43:14 · 1132 阅读 · 0 评论 -
uva 113 Power of Cryptography(double活用)
Power of Cryptography BackgroundCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo functions of these primes. W原创 2013-07-31 09:58:10 · 1161 阅读 · 0 评论 -
uva 299 Train Swapping(模拟冒泡排序)
At an old railway station, you may still encounter one of the last remaining ``train swappers''. A train swapper is an employee of the railroad, whose sole job it is to rearrange the carriages of trai原创 2013-07-28 15:36:43 · 1618 阅读 · 0 评论 -
uva 400 Unix ls(借助printf("%*s",int, char*);控制格式)
Unix ls The computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along with the new computer. Your原创 2013-07-20 20:39:42 · 1375 阅读 · 0 评论 -
uva 575 Skew Binary(模拟)
When a number is expressed in decimal, the k-th digit represents a multiple of 10k. (Digits are numbered from right to left, where the least significant digit is number 0.) For example,When a原创 2013-07-20 21:39:55 · 1326 阅读 · 0 评论 -
uva 350 Pseudo-Random Numbers(模拟)
Pseudo-Random Numbers Computers normally cannot generate really random numbers, but frequently are used to generate sequences of pseudo-random numbers. These are generated by some algo原创 2013-07-26 15:30:25 · 1266 阅读 · 0 评论 -
uva 100 The 3n + 1 problem (递归)
The 3n + 1 problem BackgroundProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will原创 2013-08-04 00:25:08 · 1059 阅读 · 0 评论 -
uva 340 Master-Mind Hints(检索)
Master-Mind Hints MasterMind is a game for two players. One of them, Designer, selects a secret code. The other, Breaker, tries to break it. A code is no more than a row of colored dot原创 2013-07-28 14:55:23 · 1177 阅读 · 0 评论 -
uva 123 Searching Quickly(遍历+排序)
Searching Quickly BackgroundSearching and sorting are part of the theory and practice of computer science. For example, binary search provides a good example of an easy-to-unde原创 2013-07-28 15:57:13 · 1626 阅读 · 0 评论 -
uva 10194 Football (aka Soccer)(字符串处理+sort排序)
Football (aka Soccer) The ProblemFootball the most popular sport in the world (americans insist to call it "Soccer", but we will call it "Football"). As everyone knows, Brasil原创 2013-07-28 16:16:43 · 2275 阅读 · 0 评论 -
uva 621 Secret Research
Secret Research At a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an information of its completion:`po原创 2013-07-31 10:09:42 · 996 阅读 · 0 评论 -
uva 573 The Snail(模拟)
The Snail A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The s原创 2013-07-31 10:33:16 · 1014 阅读 · 0 评论 -
uva 10879 Code Refactoring(分解因子)
Code RefactoringTime Limit: 2 seconds"Harry, my dream is a code waiting to bebroken. Break the code, solve the crime."Agent CooperSeveral algorithms in mode原创 2013-07-26 15:51:06 · 1741 阅读 · 0 评论 -
uva 152 Tree's a Crowd(检索)
Tree's a Crowd Dr William Larch, noted plant psychologist and inventor of the phrase ``Think like a tree--Think Fig'' has invented a new classification system for trees. This is a comp原创 2013-07-28 15:22:16 · 1316 阅读 · 0 评论 -
uva 755 487--3279(检索+排序)
487-3279 Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the原创 2013-07-28 16:20:59 · 1098 阅读 · 0 评论 -
uva 10152 ShellSort
The ProblemKing Yertle wishes to rearrange his turtle throne to place his highest-ranking nobles and closest advisors nearer to the top. A single operation is available to change the order of th原创 2013-07-16 11:32:35 · 1246 阅读 · 0 评论 -
uva 1368 DNA Consensus String(检索)
Description Figure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cyt原创 2013-08-01 00:12:34 · 1070 阅读 · 0 评论 -
hdu 4708 Rotation Lock Puzzle(模拟)
题目连接:4708 Rotation Lock Puzzle题目大意:现在给出一个n * n 的矩阵, 像题目中图所给的一样,矩阵可以分成n / 2个圈, 每个圈可以进行顺时针可逆时针的旋转, 现在要求在矩阵的两条对角之和要最大并且旋转次数最少, 输出最大值和最少步数。解题思路:先把每一个圈复制到数组中处理, 求的每个圈的最大值, 以及到达最大值的最短路径,求最短路径的时候原创 2013-09-08 20:31:20 · 1033 阅读 · 0 评论 -
poj 1068 Parencodings(模拟)
题目链接:POJ 1068-Parencodings题目大意:对与一个全为括号的序列,定义两种表示方法,P-sequence,表示第i个右括号左边有几个左括号。W-sequence表示第i个右括号与它左边的第j个左括号配对,现在给出P-sequence,求W-sequence。解题思路:简单的模拟,因为总数不会大于20,所以不用考虑的太复杂。#include原创 2013-10-18 14:18:17 · 1088 阅读 · 0 评论 -
CodeForces 302B Eugeny and Play List(遍历)
题目链接:CodeForces 302B Eugeny and Play List题目大意: Eugeny 喜欢听歌,他有一个播放列表,里面有n首歌,给出n和m,然后给出每首歌曲的次数ci和时间ti,接下来给出m次询问,在给出的询问时间中,Eugeny在听哪首歌曲。(歌曲列表按照顺序播放,当第i首歌听过ci遍后才听下一首歌)解题思路:很水的一道题目,直接遍历一遍就可以了。原创 2013-10-17 23:34:53 · 1354 阅读 · 0 评论 -
hdu 1013 Digital Roots
题目链接:hdu 1013 Digital Roots题目大意:给出一个数num,计算num每一个位数上的值之和,的到新的num,如果num>= 10, 重复操作,直到为个数。解题思路:第一次输入的时候位数很多,得用字符串读入。#include #include #include const int N = 10005;int main () {原创 2013-11-01 17:42:35 · 896 阅读 · 0 评论 -
【索引】Volume 0. Getting Started
AOAPC I: Beginning Algorithm Contests (Rujia Liu)Volume 0. Getting Started10055 - Hashmat the Brave Warrior15379327.33%3338585.74%原创 2013-08-22 13:45:52 · 1636 阅读 · 0 评论 -
uva 12554 - A Special "Happy Birthday" Song!!!
题目链接:uva 12554 - A Special "Happy Birthday" Song!!!题目大意:给出n个人的名字,然后由这n个人唱歌,每人一句,要求是每个人都要唱至少一句话,而且不可以在一首歌的中间停止。解题思路:简单模拟,注意两个坑点就可以了。#include #include const int N = 105;const char原创 2013-11-03 19:36:11 · 1518 阅读 · 0 评论 -
uva 10205 - Stack 'em Up(模拟)
题目链接:uva 10205 - Stack 'em Up题目大意:比较长,很多人卡在题意上面,介绍篇翻译点击打开链接。解题思路:就是简单的模拟,然后对应的i位置要放dir[num][i]位置上的牌。#include #include const int MAXN = 105;const int N = 52;const char value[][原创 2013-11-10 11:11:38 · 1968 阅读 · 0 评论 -
uva 10970 Big Chocolate
Mohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive(You know Mohammad is a little BIT原创 2013-07-31 13:19:25 · 1423 阅读 · 0 评论 -
fzu 1909 An Equation(水题)
题目链接:fzu 1909 An Equation典型的签到题。#include #include bool judge(int *a, int sum) { for (int i = 0; i < 4; i++) { for (int j = i + 1; j < 4; j++) if (sum == (a[i] + a[j]) * 2) return原创 2013-12-04 23:04:41 · 1973 阅读 · 0 评论 -
fzu 2034 Password table(水题)
题目链接:fzu 2034 Password table题目大意:给出一个密码表,然后根据后面给出的坐标输出相应的值。解题思路:略。#include #include const int N = 20;int n, m, q;char g[N][N][100];void init() { memset(g, 0, sizeof(g)); s原创 2013-12-11 19:55:11 · 1061 阅读 · 0 评论 -
fzu 1914 Funny Positive Sequence
题目链接:fzu 1914 Funny Positive Sequence题目大意:给出n,以及长度为n的数列a[i],现在以每个i为起点,计算d[i][j]表示以i为起点,计算后面j个数的和(如果i + j超过n,从1开始继续计算)问有几个i满足d[i][j](1≤j≤n)均大于0。解题思路:这题还是有点技巧的,从数组的后面枚举,碰到a[i] ≤ 0,就开始往前叠加,凡是原创 2013-12-05 19:40:53 · 1568 阅读 · 0 评论 -
fzu 2102 Solve equation(水题)
题目连接:fzu 2102 Solve equation题目大意:给出数a,b和进制bas,a和b都是bas进制的数,现在要计算十进制数k和d ,使得a = k * b + d。解题思路:将a和b转换成十进制数,然后k = a / b, d =a - (a/b) * b.#include #include const int N = 100;int b原创 2013-12-13 18:17:37 · 1230 阅读 · 0 评论 -
fzu 2104 Floor problem(水题)
题目链接:fzu 2104 Floor problem题目大意:给出n,l和r, 计算∑(l≤i≤r)floor(n/i).解题思路:直接遍历l到r。#include #include #include int main () { int cas, n, L, R; scanf("%d", &cas); while (cas--) { scan原创 2013-12-13 18:21:15 · 1150 阅读 · 0 评论 -
fzu 2146 Easy Game & 2147 A-B Game & 2151 OOXX Game(水题)
题目链接:fzu 2146 Easy Game 题目连接:fzu 2147 A-B Game题意略。2146#include #include const int N = 10100;const char sign[2][N] = {"Even", "Odd"};int main () { char str[N]; int cas;原创 2013-12-22 19:08:04 · 1496 阅读 · 0 评论 -
uva 11462 - Age Sort(计数排序+输入外挂)
题目链接:uva 11462 - Age Sort题目大意:给出n个数进行排序输出,内存限制2M。解题思路:因为所给的排序数均小于100,所以开一个数组记录该数出现的次数即可。#include const int N = 105;int n, c[N];void scanfINT(int& num) { bool flag = false; ch原创 2014-01-22 22:15:46 · 1223 阅读 · 0 评论 -
uva 11078 - Open Credit System(水题)
题目链接:uva 11078 - Open Credit System题目大意:给出n个数,找出两个数之间差的最大值,要求num[i] - num[j](i 解题思路:维护最大值Max,每次读取一个数时用Max - c,维护ans。#include #include using namespace std;const int INF = 0x3f3f3f原创 2014-01-22 22:28:10 · 1306 阅读 · 0 评论 -
CodeForces 378A Playing with Dice(水题)
题目链接: CodeForces 378A Playing with Dice题目大意:两个人猜数1~6,给出a和b,然后随机丢一个色子,问说接近a的可能,相等的可能,以及接近b的可能。解题思路:完完全全的签到题。#include #include #include int main() { int a, b; int x = 0, y原创 2014-01-29 17:43:16 · 1462 阅读 · 0 评论 -
Codeforces 385A Bear and Raspberry(水题)
题目链接:Codeforces 385A Bear and Raspberry题目大意:就是给出一个序列,然后相邻两个数之间差的最大值于C的差,小于0的话要输出0.解题思路:水题。#include #include #include using namespace std;const int N = 105;int n, c, a[N];in原创 2014-01-30 13:00:28 · 1412 阅读 · 0 评论 -
Codeforces 382A Ksenia and Pan Scales(水题)
题目链接:Codeforces 382A Ksenia and Pan Scales题目大意:判断两边是否可以拥有相同的字母数,每个字母z原创 2014-02-01 17:32:48 · 1387 阅读 · 0 评论 -
Codeforces 384A Coder(水题)
题目链接:Codeforces 384A Coder题目大意:给出n,在一个n * n的棋盘,要求在这个棋盘上方尽量多的棋子,棋子不能相邻,给出摆法。解题思路:错开摆就行了,水题。#include #include #include using namespace std;int main () { int n; scanf("%d", &n);原创 2014-02-03 13:10:04 · 1299 阅读 · 0 评论 -
Codefoces 387A George and Sleep(水题)
题目链接:Codefoces 387A George and Sleep题目大意:给出一个时间,然后往前推一个时间长度,给出那时的时间。解题思路:水题,注意借位即可。#include #include int main() { int h, m, hh, mm; scanf("%d:%d", &h, &m); scanf("%d:%d", &hh,原创 2014-01-31 23:58:45 · 1313 阅读 · 0 评论