- 博客(102)
- 资源 (1)
- 收藏
- 关注
原创 1079. Total Sales of Supply Chain (25)
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Starting from one root supplier, everyone on th
2014-11-03 18:49:13 489
原创 1078. Hashing (25)
The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be "H(key) = key %
2014-11-03 18:47:00 387
原创 1077. Kuchiguse (20)
The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called
2014-11-03 18:43:34 637
原创 1087. All Roads Lead to Rome (30)
#include #include#include#includeusing namespace std;#define MAX 8888888#define SIZE 205int n,k;int dest;vector resPath;map hash1;map hash2;int happiness[SIZE];int graph[SIZE][SIZE];int
2014-10-24 10:43:53 593
原创 1086. Tree Traversals Again (25)
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered from 1 to 6) is traversed, the stac
2014-10-21 09:15:52 415
原创 1085. Perfect Sequence (25)
Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence" if M Now given a sequence and a parameter p, you are supposed to find from the
2014-10-21 09:09:11 332
原创 1084. Broken Keyboard (20)
On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given a string that you are supposed
2014-10-21 09:03:48 328
原创 1076. Forwards on Weibo (30)
#include#include#includeusing namespace std;int n,l;vector > fd;int bfs(int start){ int count=0; vector level(n,-1); queue q; q.push(start); level[start]=0; while(!q.empty()){ if(level[s
2014-09-02 15:27:49 444
原创 1073. Scientific Notation (20)
#include#include#include#includeusing namespace std;int main (){ string s,ans=""; getline(cin,s); if (s[0]=='-') ans+=s[0]; int indexE=s.find("E"); string num=s.substr(1,indexE-1); char x
2014-09-02 10:03:03 396
原创 1065. A+B and C (64bit) (20)
Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (Output
2014-08-30 14:17:38 1020
原创 1070. Mooncake (25)
1070. Mooncake (25)时间限制100 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueMooncake is a Chinese bakery product traditionall
2014-08-29 21:15:17 345
原创 1071. Speech Patterns (25)
People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help to narrow down a speaker
2014-08-29 21:10:04 460
原创 1072. Gas Station (30)
A gas station has to be built at such a location that the minimum distance between the station and any of the residential housing is as far away as possible. However it must guarantee that all the hou
2014-08-29 20:52:49 420
原创 1069. The Black Hole of Numbers (20)
1069. The Black Hole of Numbers (20)时间限制100 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueFor any 4-digit integer except t
2014-08-29 10:46:33 411
原创 1067. Sort with Swap(0,*) (25)
#include#includeusing namespace std;int visit[100010]={0},ip[100010],pos[100010],n;void sort (int a,int b){ int tmp=pos[a]; pos[a]=pos[b]; pos[b]=tmp;}int main(){ scanf("%d",&n); int i,j; f
2014-08-28 14:07:29 345
原创 1045. Favorite Color Stripe (30)
Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining parts
2014-08-25 09:50:44 429
原创 1033. To Fill or Not to Fill (25)
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different ga
2014-08-23 18:41:35 318
原创 1048. Find Coins (25)
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,
2014-08-23 10:39:46 366
原创 1042. Shuffling Machine (20)
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler
2014-08-23 09:53:03 309
原创 1041. Be Unique (20)
Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one who bets on
2014-08-23 08:52:15 376
原创 PAT 1020 Tree Traversals
时间限制400 ms 内存限制32000 kB 代码长度限制16000 B 判题程序Standard作者CHEN, Yue Suppose that all the keys in a binary tree are distinct positive integers. Given the posto
2014-08-22 21:15:03 397
原创 1030. Travel Plan (30)
A traveler's map gives the distances between cities along the highways, together with the cost of each highway. Now you are supposed to write a program to help a traveler to decide the shortest path b
2014-08-18 15:18:09 352
原创 1059. Prime Factors (25)
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1* p2^k2 *…*pm^km.Input Specification:Each input file contains one test ca
2014-08-17 15:02:00 415 1
原创 1015. Reversible Primes (20)
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr
2014-08-17 12:08:45 457
原创 1055. The World's Richest (25)
Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the peopl
2014-08-16 10:55:05 448 1
原创 1047. Student List for Course (25)
Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input S
2014-08-15 10:52:16 284
原创 1044. Shopping in Mars (25)
1044. Shopping in Mars (25)时间限制 100 ms内存限制 32000 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueShopping in Mars is quite a different experienc
2014-08-14 11:42:18 290 1
原创 1039. Course List for Student (25)
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who co
2014-08-14 09:10:02 299
原创 1038. Recover the Smallest Number (30)
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-02
2014-08-13 14:30:26 399
原创 1029. Median (25)
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15.
2014-08-13 13:15:25 342
原创 1028. List Sorting (25)
Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N
2014-08-13 12:26:54 390
原创 1025. PAT Ranking (25)
Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklis
2014-08-13 10:51:51 291
原创 1026. Table Tennis (30) 未AC
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava
2014-08-11 11:04:29 630
原创 1017. Queueing at Bank (25)
Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow li
2014-08-10 15:48:29 407
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人