Online Judge
文章平均质量分 76
github.com/4gnosed
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU6043 KazaQ's Socks
Problem DescriptionKazaQ wears socks everyday.At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the smallest number in原创 2017-09-06 14:48:31 · 512 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区-banana
DiscussionBananas are the favoured food of monkeys. In the forest, there is a Banana Company that provides bananas from different places. The company has two lists. The first list records原创 2017-09-11 17:13:40 · 1457129 阅读 · 1 评论 -
2017 ACM-ICPC 亚洲区-Coconut
DiscussionInput FormatSample InputSample Output题意:code:原创 2017-09-11 17:58:14 · 382 阅读 · 0 评论 -
UVA 10391 Compound Words
You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is theconcatenation of exactly two other words in the dictionary.Input原创 2017-10-06 16:08:33 · 296 阅读 · 0 评论 -
UVA 540 Team Queue(queue的使用)
Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday life. At lunch time the qu原创 2017-09-27 23:46:14 · 368 阅读 · 0 评论 -
UVA 12100 Printer Queue(队列,优先队列)
详细题目:https://vjudge.net/problem/UVA-12100思路:用队列模拟,开一个 的队列,分别表示任务的优先级和位置。再开一个 的优先队列,默认任务的优先级为从大到小的优先顺序。每次取出队列首任务,若其优先级不是最高的(根据优先队列判断),将其入队;否则,ans++,再判断其位置是否为所求任务完成的时刻,若是则输出ans结束。#inclu原创 2017-10-06 22:33:23 · 385 阅读 · 0 评论 -
UVA 1595 Symmetry(暴力)
The figure shown on the left is left-right symmetric as it is possible to fold the sheet of paper along a vertical line, drawn as a dashed line, and to cut the figure into two identical halves. The fi原创 2017-10-06 16:33:07 · 331 阅读 · 0 评论 -
UVA 230 Borrowers(多种STL运用)
详细题目:https://vjudge.net/problem/UVA-230思路:根据题意先对各本书进行排序(按ASCII码先作者后书名),建立一个结构体 book 对每本书的作者和状态(入藏,借出,归还但未上架)进行储存,并通过建立 map 的键值关系。对于每次 SHELVE 操作,找到第三种状态的书,确定其插入的位置(先前排序的作用于此)。代码:#include #incl原创 2017-10-08 16:55:45 · 332 阅读 · 0 评论 -
UVA 136 Ugly Number(优先队列)
题目 Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...shows the first 11 ugly numbers. By convention, 1 is included.原创 2017-09-29 23:26:58 · 347 阅读 · 0 评论 -
UVA 400 Unix Is
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 assignment is to write原创 2017-09-30 21:26:44 · 438 阅读 · 0 评论 -
UVA 221 Urban Elevations (离散化)
An elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external elevation of a city would show the skyline and the faces of the ``visible" bui原创 2017-10-03 12:15:06 · 414 阅读 · 0 评论 -
UVA 1594 Ducci Sequence
思路:开个新的数组来保存Ducci 序列,每次abs后,作判断。只有两种LOOP或ZERO结果,只需判断一项。#include #include #include using namespace std;bool zeo_jud(int *a,int len){ for(int i=0;i<len;i++) { if(a[i]!=0)原创 2017-10-03 17:29:28 · 297 阅读 · 0 评论 -
UVA 1593 Alignment of Code
You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is basically a text editor with bells and whistles. You are working on a module that takes a piece of原创 2017-10-03 13:40:35 · 282 阅读 · 0 评论 -
UVA 210 Concurrency Simulator(deque,queue,模拟)
Programs executed concurrently on a uniprocessor system appear to be executed at the same time, butin reality the single CPU alternates between the programs, executing some number of instructions fr原创 2017-10-15 18:17:17 · 292 阅读 · 0 评论 -
UVA 10935 Throwing cards away I (queue)
Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: Throw原创 2017-10-05 19:30:23 · 314 阅读 · 0 评论 -
UVA 10763 Foreign Exchange
思路:每一个想从A学校换到B学校的学生必须找到一个唯一的从B学校换到A学校的学生。可以定义一个arr[ ]数组作为AB的关系,并对每一对关系进行swap(arr[a],arr[b]),如果交换成功,最后的对于每一个 i,必有arr[ i ]= i。#include #include #include using namespace std;const int maxn=5000原创 2017-10-05 21:38:50 · 293 阅读 · 0 评论 -
UVA 12504 Updatig a Dictionary(map)
In this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative integers. Given an old dictionary and a new dictionary, find out what wer原创 2017-10-11 22:36:10 · 298 阅读 · 0 评论 -
UVA 1592 Database(map)
Peter studies the theory of relational databases. Table in the relational database consists of values that are arranged in rows and columns.There are different normal forms that database may adher原创 2017-09-18 23:46:11 · 562 阅读 · 0 评论 -
UVA 12096 The SetStack Computer(stack及其它STL容器综合使用)
Background from Wikipedia: “Set theory is a branch of mathematics created principally by the German mathe-matician Georg Cantor at the end of the 19th century.Initially controversial, set theory has c原创 2017-09-25 20:54:38 · 365 阅读 · 0 评论 -
HDU1124 Factorial
Problem DescriptionThe most important part of a GSM network is so called Base Transceiver Station (BTS). These transceivers form the areas called cells (this term gave the name to the cellular phone)原创 2017-09-06 14:48:27 · 369 阅读 · 0 评论 -
HDU1058 Humble Numbers(DP)
Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first原创 2017-09-06 14:48:23 · 278 阅读 · 0 评论 -
HDU1049 Climbing Worm
Problem DescriptionAn inch worm is at the bottom of a well n inches deep. It has enough energy to climb u inches every minute, but then has to rest a minute before climbing again. During the rest, it原创 2017-09-06 14:48:19 · 278 阅读 · 0 评论 -
HUD1048 The Hardest Problem Ever
Problem DescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of th原创 2017-09-06 14:48:14 · 296 阅读 · 0 评论 -
HDU1047 Integer Inquiry
Problem DescriptionOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various sums of those numbe原创 2017-09-06 14:48:10 · 265 阅读 · 0 评论 -
HDU1042 N!(大整数类应用)
Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N! InputOne N in one line, process to the end of file. OutputFor each N, output N! in one line. Sample In原创 2017-09-06 14:48:06 · 272 阅读 · 0 评论 -
HDU1039 Easier Done Than Said?
Problem Description Password security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-g原创 2017-09-06 14:48:02 · 251 阅读 · 0 评论 -
HDU1036 Average is not Fast Enough!
Problem DescriptionA relay is a race for two or more teams of runners. Each member of a team runs one section of the race. Your task is to help to evaluate the results of a relay race. You have to pr原创 2017-09-06 14:47:58 · 281 阅读 · 0 评论 -
HDU1035 Robot Motion
Problem Description1035 Robot Motion" src="http://acm.hdu.edu.cn/data/images/1035-1.gif" alt="hdu 1035 Robot Motion" />A robot has been programmed to follow the instructions in its path. Instruction原创 2017-09-06 14:47:51 · 259 阅读 · 0 评论 -
HDU1034 Candy Sharing Game
Problem DescriptionA number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each studen原创 2017-09-06 14:47:47 · 326 阅读 · 0 评论 -
HDU1031 Design T-Shirt
Problem DescriptionSoon after he decided to design a T-shirt for our Algorithm Board on Free-City BBS, XKA found that he was trapped by all kinds of suggestions from everyone on the board. It is ind原创 2017-09-06 14:47:43 · 360 阅读 · 0 评论 -
HDU1027 Ignatius and the Princess II
Problem DescriptionNow our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill our pretty Princess. But now the BEelzebub has to beat our hero first.原创 2017-09-06 14:47:39 · 240 阅读 · 0 评论 -
HDU1015 Safecracker
Problem Description "The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroye原创 2017-09-06 14:47:35 · 288 阅读 · 0 评论 -
HDU1113 Word Amalgamation
DescriptionIn millions of newspapers across the United States there is a word game called Jumble. The object of this game is to solve a riddle, but in order to find the letters that appear in the ans原创 2017-09-06 14:47:26 · 654 阅读 · 0 评论 -
UVA 156 Ananagrams (map应用)
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,原创 2017-09-24 11:58:26 · 291 阅读 · 0 评论 -
UVA 10815 Andy's First Dictionary(set的应用)
Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of words that he knows is, well, not quite enough. Instead of thinking up all the wo原创 2017-09-21 23:15:59 · 273 阅读 · 0 评论 -
大整数相加
Description给你两个整数n,m,求从n到m之间所有数字之和,保证0<=n<=mInput只有一行包含两个整数n,mOutput输出n到m之间所有数字之和Sample Input1 20 100000Sample Output35000050000思路:对于大整数类的运算,只能当其为字符串处理,模拟运算过程。原创 2017-11-01 17:40:17 · 450 阅读 · 0 评论
分享