
基础题
文章平均质量分 83
974792789
不要在能吃苦的年纪追求安逸。
展开
-
Steps
Steps One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the previous ste原创 2014-04-29 23:25:44 · 841 阅读 · 0 评论 -
Where is the Marble? uva 计数排序
Where is the Marble? Raju and Meena love to play with Marbles. They have got a lotof marbles with numbers written on them. At the beginning, Rajuwould place the marbles one after another i原创 2014-05-25 23:28:53 · 428 阅读 · 0 评论 -
Don't Get Rooked uva 回溯
Don't Get Rooked In chess, the rook is a piece that can move any number of squaresvertically or horizontally. In this problem we will consider smallchess boards (at most 44) that can als原创 2014-05-28 22:59:02 · 633 阅读 · 0 评论 -
Getting in Line uva 回溯
Getting in Line Computer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chainedtogether so that e原创 2014-05-26 23:35:22 · 365 阅读 · 0 评论 -
The Settlers of Catan uva dfs+回溯
The Settlers of Catan Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an islandby building roads, settlements and cities across its uncharted wilder原创 2014-06-01 10:43:15 · 566 阅读 · 0 评论 -
Game With Sticks codeforces +水题==
Game With Stickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter winning gold and silver in IOI 2014, Akshat and原创 2014-07-27 20:16:10 · 534 阅读 · 0 评论 -
Sort the Array+codeforces+水题
Sort the Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBeing a programmer, you like arrays a lot. For your bir原创 2014-07-27 20:18:16 · 510 阅读 · 0 评论 -
Annoying painting tool+POJ+水题
Annoying painting toolTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1665 Accepted: 1112DescriptionMaybe you wonder what an annoying painting tool is?原创 2014-08-06 15:13:58 · 546 阅读 · 0 评论 -
Codeforces Round #268 (Div. 2)+24 Game
24 Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle X used to play a card game called "24 Game",原创 2014-09-22 08:20:37 · 486 阅读 · 0 评论 -
Instruction Decoder+SPOJ+机智题
Instruction DecoderProblem code: ICODERMathews uses a brand new 16-bit instruction processor. (Yeah i am being sarcastic!). It has one register (say R) and it supports two instru原创 2014-08-15 19:02:23 · 654 阅读 · 0 评论 -
Favorite Dice +SPOJ+算概率题
Favorite DiceProblem code: FAVDICEBuggyD loves to carry his favorite die around. Perhaps you wonder why it's his favorite? Well, his die is magical and can be transformed into an原创 2014-08-15 17:41:09 · 1072 阅读 · 0 评论 -
Touch of Venom +SPOJ+推公式题
Touch of VenomProblem code: VENOMSometimes you have to try fighting even though you know that your enemy is very powerful than you. Your hero with initial health H is about to fi原创 2014-08-15 18:49:47 · 624 阅读 · 0 评论 -
Central Avenue Road+csuoj+水题
Central Avenue RoadTime Limit: 3 Sec Memory Limit: 128 MBSubmit: 30 Solved: 10[Submit][Status][Web Board]DescriptionThere are a lot of trees in the park of Jilin University. We wan原创 2014-10-05 16:56:35 · 494 阅读 · 0 评论 -
Matrix Multiplication+adream+矩阵相乘
Matrix MultiplicationTime Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)Problem Description Let us consider undirected graph G = {V; E} which has N vertice原创 2014-10-01 20:59:55 · 453 阅读 · 0 评论 -
VK Cup 2012 Qualification Round 2--E. Zebra Tower 离散化+优先队列
E. Zebra Towertime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Janet likes playing with cubes. Act原创 2015-01-26 21:41:38 · 548 阅读 · 0 评论 -
Codeforces Round #285 (Div. 2) C. Misha and Forest
C. Misha and Foresttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a forest as a non-directed原创 2015-01-23 13:18:21 · 485 阅读 · 0 评论 -
Island of Logic uva 暴力枚举
Island of Logic The Island of Logic has three kinds of inhabitants: divine beings that always tell the truth, evil beings that always lie, and human beings that are truthful during the day原创 2014-05-25 01:38:32 · 509 阅读 · 0 评论 -
The Psychic Poker Player UVA 暴力
The Psychic Poker Player In 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player may then discard between zero and five of his or her cards and ha原创 2014-05-24 00:49:07 · 635 阅读 · 2 评论 -
(2/3/4)-D Sqr/Rects/Cubes/Boxes?
(2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard inputOutput: standard outputTime Limit: 2 seconds You can see a (4x4) grid below. Can you tell me how many squares and rectangles are hidden t原创 2014-04-30 22:03:28 · 444 阅读 · 0 评论 -
How Many Points of Intersection? uva
How Many Points of Intersection? We have two rows. There are a dots on the top row and b dots on the bottom row. We draw line segments connecting every dot on the top row with every dot on the b原创 2014-04-30 18:19:36 · 606 阅读 · 0 评论 -
Multiplying by Rotation 移位乘法 uva
Multiplying by Rotation Warning: Not all numbers in this problem are decimal numbers!Multiplication of natural numbers in general is a cumbersome operation. In some cases however the原创 2014-05-01 22:17:57 · 478 阅读 · 0 评论 -
Uniform Generator uva
Uniform Generator Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formwhere `` " is the modulus operator.Su原创 2014-05-02 13:23:36 · 442 阅读 · 0 评论 -
Just the Facts uva
Just the Facts The expression N!, read as ``N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for example,NN!01原创 2014-05-01 23:29:24 · 520 阅读 · 0 评论 -
``Accordian'' Patience
一道简单的模拟,关于vector的使用。原创 2014-05-06 00:59:38 · 1513 阅读 · 0 评论 -
ShellSort uva
关于list容器的使用。原创 2014-05-07 00:14:04 · 1372 阅读 · 0 评论 -
Parentheses Balance uva
Parentheses Balance You are given a string consisting of parentheses () and []. Astring of this type is said to becorrect:(a)if it is the empty string(b)if A and B are correct, AB is c原创 2014-05-07 17:59:15 · 619 阅读 · 0 评论 -
Matrix Chain Multiplication uva
Matrix Chain Multiplication Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices.Since matrix multiplication is associative, the order in which multip原创 2014-05-07 23:03:54 · 498 阅读 · 0 评论 -
Image Is Everything
#include#include#includeusing namespace std;#define For(i,n) for(int i=0;i<(n);i++)char view[6][11][11];char pos[11][11][11];int n;char readchar(){ char ch; for(;;) { ch=g原创 2014-04-25 17:43:52 · 657 阅读 · 0 评论 -
Stacks of Flapjacks uva
Stacks of Flapjacks BackgroundStacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete even原创 2014-04-26 16:44:39 · 438 阅读 · 0 评论 -
The Mad Numerologist UVA
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 are very com原创 2014-04-26 20:20:05 · 493 阅读 · 0 评论 -
Ant on a Chessboard uva
Ant on a Chessboard原创 2014-04-26 22:05:35 · 505 阅读 · 0 评论 -
Oil Deposits uva DFS
Oil Deposits The GeoSurvComp geologic survey company is responsible for detectingunderground oil deposits. GeoSurvComp works with one large rectangularregion of land at a time, and creates原创 2014-05-13 11:24:57 · 644 阅读 · 0 评论 -
Tree Summing uva
Tree Summing原创 2014-05-13 11:06:01 · 458 阅读 · 0 评论 -
Codeforces Round #287 (Div. 2) C. Guess Your Way Out!+二叉树
C. Guess Your Way Out!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmr bought a new video game "Guess Yo原创 2015-01-25 00:17:30 · 541 阅读 · 0 评论