Codeforces Round 484 (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
982 Codeforces Round 484 (Div. 2) FINISHED False 7200 210950723 May 17, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8440 ) B Bus of Characters PROGRAMMING data structures greedy implementation 1300

B"In the Bus of Characters there are n rows of seat, each having 2 seats. The width of both seats in the i -th row is w_i centimeters. All integers w_i are distinct. Initially the bus is empty. On each of 2n stops one passenger enters the bus. There are two types of passengers: You are given the seats width in each row and the order the passengers enter the bus. Determine which row each passenger will take. The first line contains a single integer n ( 1 <= n <= 200 ,000 ) -- the number of rows in the bus. The second line contains the sequence of integers w_1, w_2, ... , w_n ( 1 <= w_i <= 10^{9} ), where w_i is the width of each of the seats in the i -th row. It is guaranteed that all w_i are distinct. The third line contains a string of length 2n , consisting of digits '0' and '1' -- the description of the order the passengers enter the bus. If the j -th character is '0', then the passenger that enters the bus on the j -th stop is an introvert. If the j -th character is '1', the the passenger that enters the bus on the j -th stop is an extrovert. It is guaranteed that the number of extroverts equals the number of introverts (i. e. both numbers equal n ), and for each extrovert there always is a suitable row. Print 2n integers -- the rows the passengers will take. The order of passengers should be the same as in input. In the first example the first passenger (introvert) chooses the row 2 , because it has the seats with smallest width. The second passenger (introvert) chooses the row 1 , because it is the only empty row now. The third passenger (extrovert) chooses the row 1 , because it has exactly one occupied seat and the seat width is the largest among such rows. The fourth passenger (extrovert) chooses the row 2 , because it is the only row with an empty place. "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
38403601 luke888 B May 18, 2018, 2:48 p.m. OK Clang++17 Diagnostics TESTS 49 1309 21504000 1300
52779052 ruban B April 15, 2019, 1:20 p.m. OK Delphi TESTS 49 327 149913600 1300
40603595 chaorenhaha B July 21, 2018, 9:59 a.m. OK FPC TESTS 49 841 5632000 1300
38376873 Ulanov_Victor B May 17, 2018, 6:14 p.m. OK FPC TESTS 49 857 4812800 1300
38441843 Bear.-. B May 19, 2018, 8:06 p.m. OK FPC TESTS 49 951 8806400 1300
42669041 chaorenhaha B Sept. 8, 2018, 9:52 a.m. OK FPC TESTS 49 1184 12083200 1300
44066354 chaorenhaha B Oct. 10, 2018, 9:33 a.m. OK FPC TESTS 49 1216 2457600 1300
43563458 minhkha B Sept. 29, 2018, 10:07 a.m. OK FPC TESTS 49 1216 5632000 1300
38587658 xiao-xiao B May 24, 2018, 1:16 p.m. OK GNU C TESTS 49 171 2764800 1300
38380936 vladislav_k B May 17, 2018, 7:55 p.m. OK GNU C TESTS 49 187 2355200 1300
38964396 C1ariS B June 5, 2018, 9:06 a.m. OK GNU C TESTS 49 187 8499200 1300
38398262 rajput1999 B May 18, 2018, 10:42 a.m. OK GNU C TESTS 49 187 11878400 1300
38397783 rajput1999 B May 18, 2018, 10:23 a.m. OK GNU C TESTS 49 187 11878400 1300
38378723 DanielixS B May 17, 2018, 6:31 p.m. OK GNU C TESTS 49 218 2867200 1300
38809997 imptroll B May 31, 2018, 5:43 p.m. OK GNU C TESTS 49 218 6553600 1300
38527296 RabbitHu B May 22, 2018, 7:42 a.m. OK GNU C++ TESTS 49 124 18329600 1300
39955164 jangjie B July 4, 2018, 12:33 p.m. OK GNU C++ TESTS 49 155 2662400 1300
38578458 e_e B May 24, 2018, 6:41 a.m. OK GNU C++ TESTS 49 155 3993600 1300
40993743 Scut82 B July 31, 2018, 2:11 a.m. OK GNU C++ TESTS 49 155 9625600 1300
38972444 luogu_bot1 B June 5, 2018, 3:17 p.m. OK GNU C++ TESTS 49 155 10752000 1300
38992927 vjudge3 B June 6, 2018, 11:22 a.m. OK GNU C++ TESTS 49 156 3788800 1300
39662234 sdibt5 B June 26, 2018, 12:55 a.m. OK GNU C++ TESTS 49 156 3788800 1300
38528499 zero1998 B May 22, 2018, 8:28 a.m. OK GNU C++ TESTS 49 156 3993600 1300
38386300 Tgotp B May 18, 2018, 2:01 a.m. OK GNU C++ TESTS 49 156 4710400 1300
39135473 _ShadowSong B June 11, 2018, 3:28 a.m. OK GNU C++ TESTS 49 156 5017600 1300
51860555 NoSoul B March 26, 2019, 12:59 p.m. OK GNU C11 TESTS 49 1403 3584000 1300
50235609 Code0 B Feb. 20, 2019, 10:36 a.m. OK GNU C11 TESTS 49 1419 10035200 1300
38561736 pandrei B May 23, 2018, 12:30 p.m. OK GNU C11 TESTS 49 1762 5324800 1300
38375077 revpro B May 17, 2018, 5:58 p.m. OK GNU C11 TESTS 49 1777 3174400 1300
38587597 xiao-xiao B May 24, 2018, 1:14 p.m. OK GNU C11 TESTS 49 1809 2764800 1300
43507153 Jose19397 B Sept. 27, 2018, 8:02 p.m. OK GNU C11 TESTS 49 1825 6553600 1300
40301870 karam123 B July 14, 2018, 2:45 a.m. OK GNU C11 TESTS 49 1933 8396800 1300
40932120 ReaLNero1 B July 30, 2018, 1:36 a.m. OK GNU C++11 TESTS 49 77 4915200 1300
40092277 AkaneSasu B July 8, 2018, 6:06 p.m. OK GNU C++11 TESTS 49 109 4198400 1300
38385818 GuYueNa B May 18, 2018, 1:29 a.m. OK GNU C++11 TESTS 49 124 15564800 1300
47307501 Gazelle_ w_t B Dec. 20, 2018, 5:37 p.m. OK GNU C++11 TESTS 49 139 5324800 1300
38533979 SleepZzz B May 22, 2018, 11:50 a.m. OK GNU C++11 TESTS 49 140 4300800 1300
65404088 Heartbeat666 B Nov. 20, 2019, 1:47 a.m. OK GNU C++11 TESTS 49 140 5222400 1300
51743290 vjudge3 B March 23, 2019, 6:41 a.m. OK GNU C++11 TESTS 49 155 2867200 1300
66468715 vjudge2 B Dec. 7, 2019, 5:31 p.m. OK GNU C++11 TESTS 49 155 3584000 1300
50049226 smilestruggler B Feb. 17, 2019, 7:23 a.m. OK GNU C++11 TESTS 49 155 4505600 1300
46927200 TUGAAAA B Dec. 12, 2018, 9:26 a.m. OK GNU C++11 TESTS 49 155 5017600 1300
59430981 Igor_2017 B Aug. 25, 2019, 6:14 a.m. OK GNU C++14 TESTS 49 140 2969600 1300
53180215 AMnu B April 23, 2019, 7:07 a.m. OK GNU C++14 TESTS 49 140 3174400 1300
47310675 Haru. B Dec. 20, 2018, 7:35 p.m. OK GNU C++14 TESTS 49 140 3174400 1300
38380219 Wolve_rine B May 17, 2018, 7:41 p.m. OK GNU C++14 TESTS 49 140 3174400 1300
38427564 Anjali_2901 B May 19, 2018, 10:45 a.m. OK GNU C++14 TESTS 49 140 9625600 1300
38380517 alwerty B May 17, 2018, 7:47 p.m. OK GNU C++14 TESTS 49 155 2662400 1300
38380004 Santhosh219 B May 17, 2018, 7:39 p.m. OK GNU C++14 TESTS 49 155 3174400 1300
51716665 introibo B March 22, 2019, 4:51 p.m. OK GNU C++14 TESTS 49 155 3174400 1300
40504611 wanggann B July 18, 2018, 7:49 a.m. OK GNU C++14 TESTS 49 155 3174400 1300
38391626 harshit_ag456 B May 18, 2018, 6:40 a.m. OK GNU C++14 TESTS 49 155 3174400 1300
38393756 szechuan_sauce B May 18, 2018, 7:57 a.m. OK GNU C++17 TESTS 49 140 3072000 1300
53893415 loading.. B May 9, 2019, 3:13 a.m. OK GNU C++17 TESTS 49 140 3072000 1300
52805321 AMY B April 16, 2019, 3:37 a.m. OK GNU C++17 TESTS 49 140 3174400 1300
61752729 Anmol B Oct. 3, 2019, 4:13 a.m. OK GNU C++17 TESTS 49 140 3686400 1300
67508911 vjudge5 B Dec. 24, 2019, 8:26 a.m. OK GNU C++17 TESTS 49 155 2662400 1300
67764761 manovik18 B Dec. 28, 2019, 2:44 a.m. OK GNU C++17 TESTS 49 155 3174400 1300
39817264 CrafterKolyan B July 1, 2018, 9:27 a.m. OK GNU C++17 TESTS 49 155 3174400 1300
51382453 Nitpr B March 16, 2019, 5 p.m. OK GNU C++17 TESTS 49 155 3174400 1300
52017457 shadowlj B March 30, 2019, 11:13 a.m. OK GNU C++17 TESTS 49 155 3174400 1300
40722494 dionysios B July 25, 2018, 2:17 a.m. OK GNU C++17 TESTS 49 155 3174400 1300
40861755 f2lk6wf90d B July 27, 2018, 10:20 p.m. OK Haskell TESTS 49 623 47513600 1300
38546597 stczhc B May 22, 2018, 9:06 p.m. OK Haskell TESTS 49 670 46387200 1300
38623691 sl0th B May 26, 2018, 5:26 a.m. OK Haskell TESTS 49 1543 71680000 1300
38906566 Nebuchadnezzar B June 3, 2018, 1:50 a.m. OK Haskell TESTS 49 1606 116428800 1300
38420554 brainddump B May 19, 2018, 7:01 a.m. OK Haskell TESTS 49 1778 73728000 1300
38411603 ShowStopper728 B May 18, 2018, 10:03 p.m. OK Java 8 TESTS 49 343 4710400 1300
62568640 Java B Oct. 14, 2019, 1:52 p.m. OK Java 8 TESTS 49 343 5734400 1300
39072086 rahejamehul B June 9, 2018, 2:50 p.m. OK Java 8 TESTS 49 358 6246400 1300
45692752 m1_k3 B Nov. 13, 2018, 9:54 p.m. OK Java 8 TESTS 49 373 11776000 1300
61105491 kaloosh B Sept. 23, 2019, 8:59 a.m. OK Java 8 TESTS 49 374 4710400 1300
39072010 rahejamehul B June 9, 2018, 2:47 p.m. OK Java 8 TESTS 49 374 6246400 1300
50698765 ramez B March 2, 2019, 7:33 p.m. OK Java 8 TESTS 49 389 5632000 1300
67046969 fundamentals B Dec. 16, 2019, 11:34 p.m. OK Java 8 TESTS 49 389 18534400 1300
67046894 fundamentals B Dec. 16, 2019, 11:28 p.m. OK Java 8 TESTS 49 405 18329600 1300
67046941 fundamentals B Dec. 16, 2019, 11:32 p.m. OK Java 8 TESTS 49 405 18636800 1300
38378123 simonmysun B May 17, 2018, 6:26 p.m. OK JavaScript TESTS 49 545 69529600 1300
38616103 yodhacs B May 25, 2018, 6:28 p.m. OK Kotlin TESTS 49 920 30310400 1300
38615949 yodhacs B May 25, 2018, 6:17 p.m. OK Kotlin TESTS 49 997 29388800 1300
38400762 0442A403 B May 18, 2018, 12:15 p.m. OK Kotlin TESTS 49 1684 20684800 1300
38400423 0442A403 B May 18, 2018, 12:02 p.m. OK Kotlin TESTS 49 1715 20684800 1300
38400445 0442A403 B May 18, 2018, 12:03 p.m. OK Kotlin TESTS 49 1980 17305600 1300
55601189 og.kostya B June 15, 2019, 6:29 p.m. OK Mono C# TESTS 49 156 8294400 1300
38374540 vivek17geek B May 17, 2018, 5:54 p.m. OK Mono C# TESTS 49 249 40038400 1300
38640375 zazak B May 26, 2018, 5:09 p.m. OK Mono C# TESTS 49 265 45875200 1300
51222917 nemars B March 12, 2019, 1:07 p.m. OK Mono C# TESTS 49 327 40243200 1300
38544788 lionvs13 B May 22, 2018, 7:04 p.m. OK Mono C# TESTS 49 795 43929600 1300
38374604 GustavK B May 17, 2018, 5:54 p.m. OK Mono C# TESTS 49 935 62464000 1300
38828763 keep.deep B June 1, 2018, 1:03 p.m. OK Mono C# TESTS 49 1123 44544000 1300
53893527 vjudge3 B May 9, 2019, 3:21 a.m. OK MS C++ TESTS 49 156 3584000 1300
46029996 vjudge2 B Nov. 21, 2018, 1:13 p.m. OK MS C++ TESTS 49 171 2764800 1300
38996583 vjudge2 B June 6, 2018, 1:55 p.m. OK MS C++ TESTS 49 171 3072000 1300
40052646 vjudge4 B July 7, 2018, 6:17 a.m. OK MS C++ TESTS 49 171 3686400 1300
50513167 vjudge5 B Feb. 26, 2019, 3:36 a.m. OK MS C++ TESTS 49 171 5120000 1300
54010303 vjudge4 B May 12, 2019, 1:32 a.m. OK MS C++ TESTS 49 171 5120000 1300
56782815 vjudge3 B July 10, 2019, 7:02 a.m. OK MS C++ TESTS 49 171 5120000 1300
50513204 vjudge5 B Feb. 26, 2019, 3:39 a.m. OK MS C++ TESTS 49 171 6758400 1300
50513189 vjudge2 B Feb. 26, 2019, 3:37 a.m. OK MS C++ TESTS 49 171 6758400 1300
40611205 X_begegr B July 21, 2018, 2:30 p.m. OK MS C++ TESTS 49 171 6963200 1300
65708938 vjudge3 B Nov. 25, 2019, 1:37 p.m. OK MS C++ 2017 TESTS 49 217 19558400 1300
69704264 vjudge4 B Jan. 29, 2020, 3:27 a.m. OK MS C++ 2017 TESTS 49 218 3686400 1300
64118722 vjudge3 B Nov. 2, 2019, 10:46 p.m. OK MS C++ 2017 TESTS 49 218 5017600 1300
60952336 ahmedo42 B Sept. 20, 2019, 10:54 p.m. OK MS C++ 2017 TESTS 49 451 3686400 1300
57595313 CtrlAlt B July 23, 2019, 1:44 p.m. OK MS C++ 2017 TESTS 49 498 6451200 1300
67574965 vjudge2 B Dec. 25, 2019, 12:58 a.m. OK MS C++ 2017 TESTS 49 592 15872000 1300
59102293 HishamDroubi B Aug. 19, 2019, 4:33 p.m. OK MS C++ 2017 TESTS 49 639 7577600 1300
54250854 chetanag35 B May 16, 2019, 5:09 p.m. OK MS C++ 2017 TESTS 49 670 10137600 1300
68862404 0Mordecai0 B Jan. 15, 2020, 12:30 p.m. OK MS C++ 2017 TESTS 49 1981 12902400 1300
38544392 jan25 B May 22, 2018, 6:43 p.m. OK Perl TESTS 49 1138 58470400 1300
38396033 rsFalse B May 18, 2018, 9:15 a.m. OK Perl TESTS 49 1309 85708800 1300
38587033 mayakin B May 24, 2018, 12:53 p.m. OK PHP TESTS 49 576 39424000 1300
38408984 dbhrockzz B May 18, 2018, 6:49 p.m. OK PyPy 2 TESTS 49 514 28467200 1300
38429790 jakab922 B May 19, 2018, 12:02 p.m. OK PyPy 2 TESTS 49 717 26419200 1300
40094456 kakkarotssj B July 8, 2018, 8:05 p.m. OK PyPy 2 TESTS 49 1715 21811200 1300
44666694 sonya123 B Oct. 21, 2018, 6:20 p.m. OK PyPy 3 TESTS 49 763 31641600 1300
60914856 kopok2 B Sept. 20, 2019, 7:41 a.m. OK PyPy 3 TESTS 49 889 31027200 1300
38375444 Pratik_2106 B May 17, 2018, 6:02 p.m. OK PyPy 3 TESTS 49 920 46694400 1300
65595493 Ivan_Tea B Nov. 23, 2019, 3:43 p.m. OK PyPy 3 TESTS 49 1154 29696000 1300
48180266 saku7 B Jan. 10, 2019, 12:06 p.m. OK PyPy 3 TESTS 49 1200 57548800 1300
38513772 ELDVN B May 21, 2018, 5:23 p.m. OK PyPy 3 TESTS 49 1310 50073600 1300
49634131 vjudge4 B Feb. 8, 2019, 5:46 p.m. OK PyPy 3 TESTS 49 1388 33484800 1300
45060605 SHOVON588 B Oct. 29, 2018, 2:38 p.m. OK PyPy 3 TESTS 49 1403 33280000 1300
57147632 ashok123 B July 16, 2019, 1:32 p.m. OK PyPy 3 TESTS 49 1403 58470400 1300
38437477 badrinarayan.sarma B May 19, 2018, 5 p.m. OK PyPy 3 TESTS 49 1513 35532800 1300
38594897 frmsaul B May 24, 2018, 6:58 p.m. OK Python 2 TESTS 49 779 40140800 1300
40094466 kakkarotssj B July 8, 2018, 8:07 p.m. OK Python 2 TESTS 49 826 19251200 1300
54830546 pein_7 B May 30, 2019, 8:43 a.m. OK Python 2 TESTS 49 826 19865600 1300
54830560 kaif_7 B May 30, 2019, 8:44 a.m. OK Python 2 TESTS 49 826 19865600 1300
38450715 nealzane B May 20, 2018, 7:22 a.m. OK Python 2 TESTS 49 873 16691200 1300
38376702 elistark B May 17, 2018, 6:13 p.m. OK Python 2 TESTS 49 873 20275200 1300
38680204 Karamchi B May 27, 2018, 9:16 p.m. OK Python 2 TESTS 49 920 19046400 1300
38970801 Minology B June 5, 2018, 2:07 p.m. OK Python 2 TESTS 49 920 27136000 1300
38410297 ReaLNero B May 18, 2018, 8:14 p.m. OK Python 2 TESTS 49 967 24166400 1300
39760547 homie B June 29, 2018, 6:44 a.m. OK Python 2 TESTS 49 998 52428800 1300
42289189 orailly B Aug. 30, 2018, 7:23 p.m. OK Python 3 TESTS 49 685 35328000 1300
38414217 cabaleirog B May 19, 2018, 1:58 a.m. OK Python 3 TESTS 49 732 41472000 1300
38480463 sergovoy B May 21, 2018, 10:39 a.m. OK Python 3 TESTS 49 748 35840000 1300
42289071 orailly B Aug. 30, 2018, 7:18 p.m. OK Python 3 TESTS 49 764 34816000 1300
38375715 David.Zhang B May 17, 2018, 6:04 p.m. OK Python 3 TESTS 49 779 42086400 1300
38431443 denyolkin B May 19, 2018, 12:58 p.m. OK Python 3 TESTS 49 811 39526400 1300
38559312 omarnvidia B May 23, 2018, 11 a.m. OK Python 3 TESTS 49 826 41164800 1300
38384655 XiangyuTong B May 17, 2018, 11:37 p.m. OK Python 3 TESTS 49 841 29798400 1300
40026472 bttcl B July 6, 2018, 10:06 a.m. OK Python 3 TESTS 49 842 31846400 1300
38380308 simonmysun B May 17, 2018, 7:43 p.m. OK Python 3 TESTS 49 857 29798400 1300
38404605 nafeezabrar B May 18, 2018, 3:28 p.m. OK Scala TESTS 49 1029 32870400 1300
38456198 AlexProk B May 20, 2018, 10:48 a.m. OK Scala TESTS 49 1076 70656000 1300

remove filters

Back to search problems