Codeforces Round 101 (Div. 2)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
141 Codeforces Round 101 (Div. 2) FINISHED False 7200 411922751 Jan. 8, 2012, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2495 ) C Queue PROGRAMMING constructive algorithms greedy sortings 1800

B'In the Main Berland Bank n people stand in a queue at the cashier, everyone knows his/her height hi, and the heights of the other people in the queue. Each of them keeps in mind number ai -- how many people who are taller than him/her and stand in queue in front of him. After a while the cashier has a lunch break and the people in the queue seat on the chairs in the waiting room in a random order. When the lunch break was over, it turned out that nobody can remember the exact order of the people in the queue, but everyone remembers his number ai. Your task is to restore the order in which the people stood in the queue if it is possible. There may be several acceptable orders, but you need to find any of them. Also, you need to print a possible set of numbers hi -- the heights of people in the queue, so that the numbers ai are correct. The first input line contains integer n -- the number of people in the queue (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893000). Then n lines contain descriptions of the people as "namei ai" (one description on one line), where namei is a non-empty string consisting of lowercase Latin letters whose length does not exceed 10 characters (the i-th person 's name), ai is an integer (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891), that represents the number of people who are higher and stand in the queue in front of person i. It is guaranteed that all names are different. If there 's no acceptable order of the people in the queue, print the single line containing "-1" without the quotes. Otherwise, print in n lines the people as "namei hi", where hi is the integer from 1 to 109 (inclusive), the possible height of a man whose name is namei. Print the people in the order in which they stand in the queue, starting from the head of the queue and moving to its tail. Numbers hi are not necessarily unique.'...

Tutorials

Codeforces Round #101 (Div. 2) Разбор Задач.

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67868961 ZzjxZWz2SO C Dec. 29, 2019, 10:43 a.m. OK Clang++17 Diagnostics TESTS 52 186 10547200 1800
54774702 rr_ C May 28, 2019, 6:30 p.m. OK D TESTS 52 92 4198400 1800
2900148 Misha100896 C Jan. 9, 2013, 5:27 p.m. OK Delphi TESTS 52 31 307200 1800
2958710 AleksanderBalobanov C Jan. 19, 2013, 7:56 a.m. OK Delphi TESTS 52 265 102400 1800
11345885 irevt C May 29, 2015, 1:04 p.m. OK FPC TESTS 52 60 1740800 1800
33653684 TShT C Dec. 26, 2017, 4:56 p.m. OK FPC TESTS 52 62 1843200 1800
21864638 fran_vz C Oct. 29, 2016, 6:09 a.m. OK GNU C TESTS 52 30 0 1800
21848917 nakedghost C Oct. 28, 2016, 2:03 p.m. OK GNU C TESTS 52 30 0 1800
21847079 BelenSaldivar98 C Oct. 28, 2016, 12:50 p.m. OK GNU C TESTS 52 30 0 1800
21834563 nataliacardozo C Oct. 27, 2016, 8:29 p.m. OK GNU C TESTS 52 30 0 1800
21884268 yanina C Oct. 29, 2016, 11:33 p.m. OK GNU C TESTS 52 30 102400 1800
21873211 yhusem C Oct. 29, 2016, 1:51 p.m. OK GNU C TESTS 52 30 102400 1800
21862710 nomeataquesman C Oct. 29, 2016, 3:39 a.m. OK GNU C TESTS 52 30 102400 1800
21862362 kikikie C Oct. 29, 2016, 3:11 a.m. OK GNU C TESTS 52 30 102400 1800
21860627 rozen_maiden C Oct. 28, 2016, 11:28 p.m. OK GNU C TESTS 52 30 102400 1800
21851365 kukiamarilla C Oct. 28, 2016, 3:39 p.m. OK GNU C TESTS 52 30 102400 1800
4079703 MAXX C July 16, 2013, 8:18 a.m. OK GNU C++ TESTS 52 15 102400 1800
3790915 ShadowSong C May 29, 2013, noon OK GNU C++ TESTS 52 15 102400 1800
3133866 darkscale C Feb. 15, 2013, 5:25 p.m. OK GNU C++ TESTS 52 15 102400 1800
2983656 Lord_F C Jan. 22, 2013, 12:42 p.m. OK GNU C++ TESTS 52 15 102400 1800
20318719 gzz C Sept. 1, 2016, 10:15 a.m. OK GNU C++ TESTS 52 30 0 1800
15427084 MLine C Jan. 18, 2016, 12:49 p.m. OK GNU C++ TESTS 52 30 0 1800
15156792 leecs0503 C Jan. 2, 2016, 9:37 a.m. OK GNU C++ TESTS 52 30 0 1800
8585774 Player12 C Nov. 6, 2014, 7:58 a.m. OK GNU C++ TESTS 52 30 0 1800
15913131 vjudge1 C Feb. 9, 2016, 1:03 p.m. OK GNU C++ TESTS 52 30 102400 1800
20280229 vjudge1 C Aug. 30, 2016, 1:07 p.m. OK GNU C++ TESTS 52 30 102400 1800
4909023 Orfest C Oct. 27, 2013, 12:20 a.m. OK GNU C++0x TESTS 52 31 1638400 1800
9341776 nosy C Jan. 1, 2015, 8:16 p.m. OK GNU C++0x TESTS 52 60 307200 1800
7948597 rendon C Sept. 25, 2014, 3:33 p.m. OK GNU C++0x TESTS 52 60 307200 1800
10154221 .I. C March 4, 2015, 9:52 p.m. OK GNU C++0x TESTS 52 62 204800 1800
9619753 Kareem C Jan. 29, 2015, 8:35 p.m. OK GNU C++0x TESTS 52 62 307200 1800
9974099 harshil C Feb. 23, 2015, 9:15 p.m. OK GNU C++0x TESTS 52 62 307200 1800
9926565 AndreiNet C Feb. 19, 2015, 1:58 p.m. OK GNU C++0x TESTS 52 62 307200 1800
9216842 sidchelseafan C Dec. 21, 2014, 3:49 p.m. OK GNU C++0x TESTS 52 62 307200 1800
8771956 hakobyan.tigran C Nov. 21, 2014, 7:56 a.m. OK GNU C++0x TESTS 52 62 307200 1800
9084236 saichandu6 C Dec. 11, 2014, 5:42 p.m. OK GNU C++0x TESTS 52 62 409600 1800
21883827 hugo14eckert14 C Oct. 29, 2016, 10:25 p.m. OK GNU C11 TESTS 52 62 0 1800
58969992 rainboy C Aug. 17, 2019, 7:49 p.m. OK GNU C11 TESTS 52 92 102400 1800
21846235 dummylp21 C Oct. 28, 2016, 12:16 p.m. OK GNU C11 TESTS 52 92 307200 1800
21858585 albertffs C Oct. 28, 2016, 8:24 p.m. OK GNU C11 TESTS 52 342 90112000 1800
21857402 albertffs C Oct. 28, 2016, 7:27 p.m. OK GNU C11 TESTS 52 374 90112000 1800
22874768 wwwwing C Dec. 11, 2016, 10:14 a.m. OK GNU C++11 TESTS 52 30 0 1800
22874708 wwwwing C Dec. 11, 2016, 10:11 a.m. OK GNU C++11 TESTS 52 30 0 1800
21792447 mengxiang000 C Oct. 26, 2016, 11:19 a.m. OK GNU C++11 TESTS 52 30 0 1800
14323137 fengsuiyan C Nov. 18, 2015, 9:03 a.m. OK GNU C++11 TESTS 52 30 102400 1800
23013524 asvikr C Dec. 15, 2016, 5:18 p.m. OK GNU C++11 TESTS 52 30 102400 1800
20713990 shivama7 C Sept. 17, 2016, 5:01 p.m. OK GNU C++11 TESTS 52 30 102400 1800
27912177 MaxZubec C June 19, 2017, 7:56 p.m. OK GNU C++11 TESTS 52 30 102400 1800
21618512 deadpool66 C Oct. 20, 2016, 1:17 p.m. OK GNU C++11 TESTS 52 30 204800 1800
15345203 100_1.3.5.6.8 C Jan. 14, 2016, 2:03 p.m. OK GNU C++11 TESTS 52 30 204800 1800
22914224 Mursalin_sust C Dec. 12, 2016, 9:10 p.m. OK GNU C++11 TESTS 52 30 307200 1800
27305502 md.ashif313 C May 23, 2017, 4:44 p.m. OK GNU C++14 TESTS 52 30 102400 1800
32496263 mihele C Nov. 20, 2017, 10:41 a.m. OK GNU C++14 TESTS 52 30 102400 1800
30051004 LJL36 C Sept. 4, 2017, 10:38 a.m. OK GNU C++14 TESTS 52 30 102400 1800
22516687 Solve_Every_Where C Nov. 26, 2016, 8:19 p.m. OK GNU C++14 TESTS 52 30 204800 1800
33385555 WUST_Kris_Lee C Dec. 18, 2017, 4:23 p.m. OK GNU C++14 TESTS 52 30 1945600 1800
25773766 RNS_JKS C March 24, 2017, 1:11 p.m. OK GNU C++14 TESTS 52 30 2048000 1800
35962472 Porestoranams C March 5, 2018, 10:58 a.m. OK GNU C++14 TESTS 52 30 2048000 1800
32852117 wust-flc C Dec. 2, 2017, 8:15 a.m. OK GNU C++14 TESTS 52 30 2048000 1800
34638863 kobortor C Jan. 28, 2018, 4:44 p.m. OK GNU C++14 TESTS 52 30 2048000 1800
33968823 dionysios C Jan. 6, 2018, 5:22 p.m. OK GNU C++14 TESTS 52 30 2048000 1800
59573409 vjudge2 C Aug. 27, 2019, 1:21 p.m. OK GNU C++17 TESTS 52 62 102400 1800
67771308 Ghost0fSparta C Dec. 28, 2019, 6:55 a.m. OK GNU C++17 TESTS 52 62 102400 1800
64181768 Princ_iple C Nov. 4, 2019, 1:30 a.m. OK GNU C++17 TESTS 52 62 102400 1800
47342159 vjudge3 C Dec. 21, 2018, 5:49 p.m. OK GNU C++17 TESTS 52 62 102400 1800
42452089 AhmedGhazaly C Sept. 4, 2018, 8:49 a.m. OK GNU C++17 TESTS 52 62 102400 1800
39140365 SpeedOfMagic C June 11, 2018, 7:59 a.m. OK GNU C++17 TESTS 52 62 204800 1800
46188774 mosta7il C Nov. 25, 2018, 2:28 a.m. OK GNU C++17 TESTS 52 62 204800 1800
55225695 vjudge5 C June 7, 2019, 12:59 a.m. OK GNU C++17 TESTS 52 62 204800 1800
67469407 orsobruno96 C Dec. 23, 2019, 12:15 p.m. OK GNU C++17 TESTS 52 62 204800 1800
60041008 nitish235 C Sept. 4, 2019, 6:20 p.m. OK GNU C++17 TESTS 52 62 307200 1800
16533474 mishagam C March 5, 2016, 12:14 p.m. OK Go TESTS 52 92 307200 1800
48312873 nullstein C Jan. 13, 2019, 4:10 a.m. OK Go TESTS 52 124 5324800 1800
6707570 erikr C May 24, 2014, 10:15 p.m. OK Haskell TESTS 52 124 1126400 1800
6707411 erikr C May 25, 2014, 8:54 a.m. OK Haskell TESTS 52 124 1126400 1800
6432773 xiaowuc1 C April 21, 2014, 5:08 a.m. OK Java 6 TESTS 52 186 102400 1800
3652361 santjuan C April 29, 2013, 8:27 p.m. OK Java 6 TESTS 52 1015 307200 1800
4089678 mkirsche C July 17, 2013, 4:14 p.m. OK Java 6 TESTS 52 1281 2662400 1800
3399890 trunghieu11 C March 24, 2013, 11:52 a.m. OK Java 7 TESTS 52 125 0 1800
4080267 lovefly1983 C July 16, 2013, 10:17 a.m. OK Java 7 TESTS 52 125 102400 1800
5810027 0p9o8i C Jan. 26, 2014, 2:19 a.m. OK Java 7 TESTS 52 156 204800 1800
2999873 miguelmaurizio C Jan. 24, 2013, 3:50 a.m. OK Java 7 TESTS 52 171 204800 1800
4239127 DoublePointer C Aug. 7, 2013, 6:40 a.m. OK Java 7 TESTS 52 186 0 1800
6716305 manoprenko C May 26, 2014, 2:51 p.m. OK Java 7 TESTS 52 216 0 1800
5598771 aladdin3 C Jan. 1, 2014, 3:09 p.m. OK Java 7 TESTS 52 218 0 1800
5691676 evgeni.kiselev C Jan. 14, 2014, 4:42 p.m. OK Java 7 TESTS 52 218 204800 1800
6716592 Javanochka C May 26, 2014, 3:33 p.m. OK Java 7 TESTS 52 248 0 1800
14796157 mIchanic C Dec. 14, 2015, 12:09 a.m. OK Java 7 TESTS 52 280 0 1800
69968162 sakt_coder C Feb. 1, 2020, 1:12 p.m. OK Java 8 TESTS 52 248 0 1800
60749689 _mcubed123 C Sept. 18, 2019, 5:21 a.m. OK Java 8 TESTS 52 248 0 1800
12011092 Guliash C July 11, 2015, 5:17 p.m. OK Java 8 TESTS 52 278 0 1800
9438495 AStepanov C Jan. 15, 2015, 6:56 p.m. OK Java 8 TESTS 52 280 0 1800
50281057 Ahmed.Shawky C Feb. 21, 2019, 12:44 p.m. OK Java 8 TESTS 52 310 0 1800
68018082 IbrahimYousre C Dec. 31, 2019, 8:05 p.m. OK Java 8 TESTS 52 312 0 1800
39257781 bluesky111 C June 15, 2018, 5:20 a.m. OK Java 8 TESTS 52 312 0 1800
53021772 hongquanntct C April 19, 2019, 4:49 p.m. OK Java 8 TESTS 52 342 0 1800
18696089 aomran94 C June 24, 2016, 7:34 a.m. OK Java 8 TESTS 52 342 0 1800
29249085 rtoni C Aug. 6, 2017, 9:18 p.m. OK Java 8 TESTS 52 342 20684800 1800
53022405 hongquanntct C April 19, 2019, 5:08 p.m. OK Mono C# TESTS 52 124 2355200 1800
26822898 og.kostya C May 3, 2017, 5:31 p.m. OK MS C# TESTS 52 124 9728000 1800
3321794 wwwsealss C March 15, 2013, 3:19 p.m. OK MS C++ TESTS 52 15 102400 1800
7205168 xiaoyu20123 C July 23, 2014, 1:55 a.m. OK MS C++ TESTS 52 30 102400 1800
22850296 vjudge3 C Dec. 10, 2016, 7:50 a.m. OK MS C++ TESTS 52 30 102400 1800
19469494 stun C July 28, 2016, 11:37 p.m. OK MS C++ TESTS 52 30 307200 1800
22775004 vjudge3 C Dec. 7, 2016, 3:42 a.m. OK MS C++ TESTS 52 30 2150400 1800
3932672 smx C June 21, 2013, 2:58 p.m. OK MS C++ TESTS 52 31 204800 1800
2997746 Androik C Jan. 23, 2013, 2:56 p.m. OK MS C++ TESTS 52 31 204800 1800
4076661 m94 C July 15, 2013, 4:26 p.m. OK MS C++ TESTS 52 31 204800 1800
3828214 tomas.svab C June 6, 2013, 2:27 p.m. OK MS C++ TESTS 52 31 409600 1800
3858564 dronov C June 11, 2013, 7:46 p.m. OK MS C++ TESTS 52 31 409600 1800
58663651 Yanhui C Aug. 12, 2019, 11:51 a.m. OK MS C++ 2017 TESTS 52 92 409600 1800
15306947 kofhearts C Jan. 12, 2016, 4:14 a.m. OK PyPy 2 TESTS 52 436 3891200 1800
56419645 platypus179 C July 2, 2019, 6:43 a.m. OK PyPy 3 TESTS 52 436 6041600 1800
60815076 Mr.Inconsistent C Sept. 18, 2019, 7:59 p.m. OK PyPy 3 TESTS 52 934 6348800 1800
4146568 leeaa C July 24, 2013, 10:32 a.m. OK Python 2 TESTS 52 78 512000 1800
3135183 user93 C Feb. 16, 2013, 4:30 a.m. OK Python 2 TESTS 52 78 819200 1800
5275757 Unlenin C Nov. 27, 2013, 7:43 p.m. OK Python 2 TESTS 52 92 409600 1800
5275742 Unlenin C Nov. 27, 2013, 7:40 p.m. OK Python 2 TESTS 52 92 409600 1800
5275737 Unlenin C Nov. 27, 2013, 7:40 p.m. OK Python 2 TESTS 52 92 409600 1800
9506667 justforlaugh C Jan. 22, 2015, 10:21 p.m. OK Python 2 TESTS 52 124 409600 1800
11204233 vovaminiof C May 22, 2015, 3:34 p.m. OK Python 2 TESTS 52 124 512000 1800
11006558 fuzzz3r C May 5, 2015, 3:07 p.m. OK Python 2 TESTS 52 124 512000 1800
9565596 justforlaugh C Jan. 26, 2015, 9:01 p.m. OK Python 2 TESTS 52 154 409600 1800
18171407 fanmeng nihaolvxingzhe Jsnalpha C May 31, 2016, 4:11 p.m. OK Python 2 TESTS 52 186 5222400 1800
6016030 yugle7 C March 14, 2014, 5:13 p.m. OK Python 3 TESTS 52 154 921600 1800
16558440 tarek.nawara C March 6, 2016, 9:39 p.m. OK Python 3 TESTS 52 156 921600 1800
25227732 AbcFly C March 4, 2017, 9:24 p.m. OK Python 3 TESTS 52 156 6246400 1800
30040662 Least_but_not_the_last C Sept. 3, 2017, 5:40 p.m. OK Python 3 TESTS 52 186 819200 1800
9073261 Latko C Dec. 10, 2014, 3:13 p.m. OK Python 3 TESTS 52 186 819200 1800
47529859 _aurora_ C Dec. 26, 2018, 6:12 p.m. OK Python 3 TESTS 52 278 921600 1800
42134536 Mk_Python_v1 C Aug. 26, 2018, 9:55 p.m. OK Python 3 TESTS 52 280 819200 1800
8168055 WARenie C Oct. 10, 2014, 5:05 p.m. OK Python 3 TESTS 52 374 921600 1800
7950233 WARenie C Sept. 25, 2014, 6:17 p.m. OK Python 3 TESTS 52 374 921600 1800
7720300 ItsLastDay C Sept. 8, 2014, 10:49 a.m. OK Python 3 TESTS 52 436 921600 1800
35839123 ______n______ C March 2, 2018, 1:46 p.m. OK Ruby TESTS 52 154 6451200 1800
35839120 ______u______ C March 2, 2018, 1:46 p.m. OK Ruby TESTS 52 154 6451200 1800
35839021 _____k_____ C March 2, 2018, 1:44 p.m. OK Ruby TESTS 52 154 6451200 1800
35839020 _____i_____ C March 2, 2018, 1:44 p.m. OK Ruby TESTS 52 154 6451200 1800
35834557 ______h______ C March 2, 2018, 12:05 p.m. OK Ruby TESTS 52 154 6451200 1800
35834518 ______k______ C March 2, 2018, 12:05 p.m. OK Ruby TESTS 52 154 6451200 1800
35834289 ______i______ C March 2, 2018, 11:59 a.m. OK Ruby TESTS 52 154 6451200 1800
35830789 ______M______ C March 2, 2018, 9:27 a.m. OK Ruby TESTS 52 154 6451200 1800
56028418 sorry_im_smurfing C June 25, 2019, 8:13 a.m. OK Ruby TESTS 52 156 102400 1800
3263959 bohu.ibm C March 8, 2013, 1:09 a.m. OK Ruby TESTS 52 1437 409600 1800
35064931 suibaka C Feb. 8, 2018, 4 p.m. OK Rust TESTS 52 342 2150400 1800

remove filters

Back to search problems