Codeforces Global Round 3

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
1148 Codeforces Global Round 3 FINISHED False 8100 178212304 June 1, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1693 ) E Earth Wind and Fire PROGRAMMING constructive algorithms greedy math sortings two pointers 2300

B'There are n stones arranged on an axis. Initially the i -th stone is located at the coordinate s_i . There may be more than one stone in a single place. You can perform zero or more operations of the following type: You want to move the stones so that they are located at positions t_1, t_2, ldots, t_n . The order of the stones is not important -- you just want for the multiset of the stones resulting positions to be the same as the multiset of t_1, t_2, ldots, t_n . Detect whether it is possible to move the stones this way, and if yes, construct a way to do so. You don 't need to minimize the number of moves. The first line contains a single integer n ( 1 <= n <= 3 cdot 10^5 ) xe2 x80 x93 the number of stones. The second line contains integers s_1, s_2, ldots, s_n ( 1 <= s_i <= 10^9 ) -- the initial positions of the stones. The second line contains integers t_1, t_2, ldots, t_n ( 1 <= t_i <= 10^9 ) -- the target positions of the stones. If it is impossible to move the stones this way, print "NO". Otherwise, on the first line print "YES", on the second line print the number of operations m ( 0 <= m <= 5 cdot n ) required. You don 't have to minimize the number of operations. Then print m lines, each containing integers i, j, d ( 1 <= i, j <= n , s_i <= s_j , 0 <= q 2 cdot d <= q s_j - s_i ), defining the operations. One can show that if an answer exists, there is an answer requiring no more than 5 cdot n operations. Consider the first example. '...

Tutorials

Codeforces Global Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55018840 jiangly E June 3, 2019, 1:44 p.m. OK Clang++17 Diagnostics TESTS 113 1232 24064000 2300
55226723 Hiasat E June 7, 2019, 2:15 a.m. OK Clang++17 Diagnostics TESTS 113 1341 34713600 2300
54938432 Gassa E June 1, 2019, 4:05 p.m. OK D TESTS 113 545 41369600 2300
54940741 iica E June 1, 2019, 4:17 p.m. OK D TESTS 113 654 45670400 2300
55192929 Denor E June 6, 2019, 7:14 a.m. OK Delphi TESTS 113 436 25292800 2300
54940313 LJC00118 E June 1, 2019, 4:15 p.m. OK GNU C++11 TESTS 113 139 24064000 2300
59652204 chenyewei_1234 E Aug. 29, 2019, 8:45 a.m. OK GNU C++11 TESTS 113 140 15462400 2300
55610336 ReaLNero1 E June 16, 2019, 5:16 a.m. OK GNU C++11 TESTS 113 171 21504000 2300
54929916 1919810 E June 1, 2019, 3:24 p.m. OK GNU C++11 TESTS 113 171 21504000 2300
54935136 Umi E June 1, 2019, 3:49 p.m. OK GNU C++11 TESTS 113 202 15769600 2300
54938466 xay5421 E June 1, 2019, 4:05 p.m. OK GNU C++11 TESTS 113 202 47923200 2300
54968509 ErkkiErkko E June 2, 2019, 7:32 a.m. OK GNU C++11 TESTS 113 217 12083200 2300
59959733 xzyxzy E Sept. 3, 2019, 5:31 p.m. OK GNU C++11 TESTS 113 217 25292800 2300
56954328 M_sea E July 13, 2019, 3:49 a.m. OK GNU C++11 TESTS 113 218 9625600 2300
59970142 hankeke E Sept. 4, 2019, 12:12 a.m. OK GNU C++11 TESTS 113 218 14233600 2300
61765259 idxcalcal E Oct. 3, 2019, 8:24 a.m. OK GNU C++14 TESTS 113 296 18636800 2300
55192878 tjd229 E June 6, 2019, 7:13 a.m. OK GNU C++14 TESTS 113 311 17203200 2300
54935480 ahwhrky_follower E June 1, 2019, 3:50 p.m. OK GNU C++14 TESTS 113 311 24064000 2300
54964424 atoiz E June 2, 2019, 5:42 a.m. OK GNU C++14 TESTS 113 327 10854400 2300
55065374 shjgkwo E June 4, 2019, 3:11 a.m. OK GNU C++14 TESTS 113 327 13107200 2300
54963569 OnionPringles E June 2, 2019, 5:14 a.m. OK GNU C++14 TESTS 113 327 13107200 2300
54942483 YaKon4ick E June 1, 2019, 4:27 p.m. OK GNU C++14 TESTS 113 327 13107200 2300
61894259 Sortoite E Oct. 5, 2019, 6:47 a.m. OK GNU C++14 TESTS 113 327 14336000 2300
55914692 JooDdae E June 22, 2019, 4:43 a.m. OK GNU C++14 TESTS 113 327 14336000 2300
55382917 mjhun E June 9, 2019, 10:52 p.m. OK GNU C++14 TESTS 113 327 14336000 2300
54940842 lesskreker E June 1, 2019, 4:18 p.m. OK GNU C++17 TESTS 113 248 21913600 2300
54937944 MrDindows E June 1, 2019, 4:03 p.m. OK GNU C++17 TESTS 113 295 13107200 2300
54939778 1207koo E June 1, 2019, 4:12 p.m. OK GNU C++17 TESTS 113 311 27648000 2300
54949409 ChitandaEru E June 1, 2019, 6:42 p.m. OK GNU C++17 TESTS 113 312 12492800 2300
55071096 jiangly E June 4, 2019, 6:22 a.m. OK GNU C++17 TESTS 113 326 24064000 2300
55232891 90n E June 7, 2019, 6:44 a.m. OK GNU C++17 TESTS 113 327 8704000 2300
54944399 Taube E June 1, 2019, 4:36 p.m. OK GNU C++17 TESTS 113 327 15257600 2300
55084273 bktl1love E June 4, 2019, 11:58 a.m. OK GNU C++17 TESTS 113 327 15462400 2300
54959677 tataky E June 2, 2019, 2:53 a.m. OK GNU C++17 TESTS 113 327 16384000 2300
54957616 m1sch3f E June 2, 2019, 1:19 a.m. OK GNU C++17 TESTS 113 327 18739200 2300
54999638 dalt E June 3, 2019, 3:28 a.m. OK Java 8 TESTS 113 498 64819200 2300
54932415 Petr E June 1, 2019, 3:35 p.m. OK Java 8 TESTS 113 499 39014400 2300
54937068 uwi E June 1, 2019, 3:58 p.m. OK Java 8 TESTS 113 514 49766400 2300
56181639 mbfeci E June 28, 2019, 12:24 a.m. OK Java 8 TESTS 113 530 38092800 2300
56181660 mbfeci E June 28, 2019, 12:26 a.m. OK Java 8 TESTS 113 530 39219200 2300
54929599 qwerty787788 E June 1, 2019, 3:22 p.m. OK Java 8 TESTS 113 561 45465600 2300
54978555 KharYusuf E June 2, 2019, 11:59 a.m. OK Java 8 TESTS 113 592 31436800 2300
54950511 Nutella3000 E June 1, 2019, 7 p.m. OK Java 8 TESTS 113 607 41881600 2300
54936515 Harpae E June 1, 2019, 3:55 p.m. OK Java 8 TESTS 113 608 26828800 2300
55008607 darnley E June 3, 2019, 8:56 a.m. OK Java 8 TESTS 113 608 62361600 2300
64675854 Spheniscine E Nov. 11, 2019, 8 a.m. OK Kotlin TESTS 113 701 62873600 2300
54938297 alexey.enkov E June 1, 2019, 4:04 p.m. OK Kotlin TESTS 113 1325 48128000 2300
55014463 eki E June 3, 2019, 11:40 a.m. OK Mono C# TESTS 113 1684 96256000 2300
54953817 LateRest E June 1, 2019, 8:53 p.m. OK Mono C# TESTS 113 2043 120832000 2300
54953873 LateRest E June 1, 2019, 8:55 p.m. OK Mono C# TESTS 113 2152 120832000 2300
54944003 chokudai E June 1, 2019, 4:34 p.m. OK Mono C# TESTS 113 3946 63283200 2300
54942655 math957963 E June 1, 2019, 4:28 p.m. OK MS C++ TESTS 113 373 17203200 2300
54934813 hld67890 E June 1, 2019, 3:47 p.m. OK MS C++ 2017 TESTS 113 452 47206400 2300
55318710 zzq233 E June 9, 2019, 2:11 a.m. OK MS C++ 2017 TESTS 113 499 25907200 2300
55016057 ItsNikolor E June 3, 2019, 12:23 p.m. OK MS C++ 2017 TESTS 113 1107 20787200 2300
54939276 re_eVVorld E June 1, 2019, 4:10 p.m. OK MS C++ 2017 TESTS 113 1248 32665600 2300
54941945 IgorAkhmetov E June 1, 2019, 4:24 p.m. OK MS C++ 2017 TESTS 113 1356 20275200 2300
54946171 FatXi E June 1, 2019, 4:45 p.m. OK MS C++ 2017 TESTS 113 1434 27340800 2300
55089113 Lordxx E June 4, 2019, 1:46 p.m. OK MS C++ 2017 TESTS 113 1715 12083200 2300
55065303 st1vdy E June 4, 2019, 3:07 a.m. OK MS C++ 2017 TESTS 113 2058 8396800 2300
54950302 pajenegod E June 1, 2019, 6:55 p.m. OK PyPy 2 TESTS 113 920 85504000 2300
55018012 shehebe E June 3, 2019, 1:20 p.m. OK PyPy 2 TESTS 113 1496 92774400 2300
60193424 beginner1010 E Sept. 6, 2019, 11:23 p.m. OK PyPy 3 TESTS 113 1887 81612800 2300
60193346 beginner1010 E Sept. 6, 2019, 11:17 p.m. OK PyPy 3 TESTS 113 2105 74035200 2300
54938475 whatshisbucket E June 1, 2019, 4:05 p.m. OK PyPy 3 TESTS 113 2339 67174400 2300
54939120 nwi E June 1, 2019, 4:09 p.m. OK Python 2 TESTS 113 1638 79257600 2300
58239432 Black_Fregat E Aug. 3, 2019, 10:29 p.m. OK Python 3 TESTS 113 1684 74240000 2300
55952609 Nipun_iiitd E June 23, 2019, 4:13 a.m. OK Python 3 TESTS 113 2058 67891200 2300
54961058 tiagoshibata E June 2, 2019, 3:45 a.m. OK Python 3 TESTS 113 2105 67891200 2300
54935890 iehn E June 1, 2019, 3:52 p.m. OK Python 3 TESTS 113 2402 73932800 2300
55196067 ergatis E June 6, 2019, 8:32 a.m. OK Python 3 TESTS 113 3182 56115200 2300
63108066 sansen E Oct. 22, 2019, 6:03 a.m. OK Rust TESTS 113 186 23449600 2300
54940016 EbTech E June 1, 2019, 4:13 p.m. OK Rust TESTS 113 233 31334400 2300
54998094 kobae964 E June 3, 2019, 1:52 a.m. OK Rust TESTS 113 560 28569600 2300

remove filters

Back to search problems