Codeforces Round 561 (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
1166 Codeforces Round 561 (Div. 2) FINISHED False 7200 173717699 May 17, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9657 ) C A Tale of Two Lands PROGRAMMING binary search sortings two pointers 1600

B'The legend of the foundation of Vectorland talks of two integers x and y . Centuries ago, the array king placed two markers at points |x| and |y| on the number line and conquered all the land in between (including the endpoints), which he declared to be Arrayland. Many years later, the vector king placed markers at points |x - y| and |x + y| and conquered all the land in between (including the endpoints), which he declared to be Vectorland. He did so in such a way that the land of Arrayland was completely inside (including the endpoints) the land of Vectorland. Here |z| denotes the absolute value of z . Now, Jose is stuck on a question of his history exam: "What are the values of x and y ?" Jose doesn 't know the answer, but he believes he has narrowed the possible answers down to n integers a_1, a_2, ... , a_n . Now, he wants to know the number of unordered pairs formed by two different elements from these n integers such that the legend could be true if x and y were equal to these two values. Note that it is possible that Jose is wrong, and that no pairs could possibly make the legend true. The first line contains a single integer n ( 2 <= n <= 2 cdot 10^5 ) -- the number of choices. The second line contains n pairwise distinct integers a_1, a_2, ... , a_n ( -10^9 <= a_i <= 10^9 ) -- the choices Jose is considering. Print a single integer number -- the number of unordered pairs {x, y } formed by different numbers from Jose 's choices that could make the legend true. Consider the first sample. For the pair {2, 5 } , the situation looks as follows, with the Arrayland markers at |2| = 2 and |5| = 5 , while the Vectorland markers are located at |2 - 5| = 3 and |2 + 5| = 7 : The legend is not true in this case, because the interval [2, 3] is not conquered by Vectorland. For the pair {5, -3 }$$'...

Tutorials

Codeforces Round #561 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56436192 dshaman92 C July 2, 2019, 2:16 p.m. OK Clang++17 Diagnostics TESTS 32 233 0 1600
54514706 sk99735548660 C May 23, 2019, 9:09 a.m. OK Clang++17 Diagnostics TESTS 32 498 3686400 1600
54305568 Denor C May 17, 2019, 4:33 p.m. OK Delphi TESTS 32 77 819200 1600
54363078 armoking C May 18, 2019, 10:32 p.m. OK Delphi TESTS 32 109 1638400 1600
54382976 armoking C May 19, 2019, 11:50 a.m. OK Delphi TESTS 32 124 3481600 1600
54363192 armoking C May 18, 2019, 10:41 p.m. OK Delphi TESTS 32 171 2457600 1600
54309019 TranKha C May 17, 2019, 4:51 p.m. OK FPC TESTS 32 78 819200 1600
54337314 giahung.nguyentrong C May 18, 2019, 8:43 a.m. OK FPC TESTS 32 93 819200 1600
63529520 chaorenhaha C Oct. 27, 2019, 6:18 a.m. OK FPC TESTS 32 93 2252800 1600
54413698 HQT2003 C May 20, 2019, 11:25 a.m. OK FPC TESTS 32 93 8294400 1600
54350028 d4rkn19ht C May 18, 2019, 2:20 p.m. OK FPC TESTS 32 109 24064000 1600
54325610 PhuongPeu C May 18, 2019, 2:25 a.m. OK FPC TESTS 32 124 921600 1600
54363088 armoking C May 18, 2019, 10:33 p.m. OK FPC TESTS 32 124 1843200 1600
54382789 armoking C May 19, 2019, 11:45 a.m. OK FPC TESTS 32 140 5017600 1600
54413915 HQT2003 C May 20, 2019, 11:32 a.m. OK FPC TESTS 32 233 7987200 1600
54798297 JayJudge C May 29, 2019, 10:45 a.m. OK GNU C11 TESTS 32 62 819200 1600
65731163 Dream.to C Nov. 26, 2019, 5:11 a.m. OK GNU C11 TESTS 32 62 1638400 1600
55820800 cs234_shrey C June 20, 2019, 8:28 a.m. OK GNU C11 TESTS 32 77 819200 1600
54316748 mickir C May 17, 2019, 6:44 p.m. OK GNU C11 TESTS 32 77 819200 1600
54310520 rainboy C May 17, 2019, 4:58 p.m. OK GNU C11 TESTS 32 93 819200 1600
54422368 _nmp_ C May 20, 2019, 4:14 p.m. OK GNU C11 TESTS 32 93 1638400 1600
58827669 akash19jain C Aug. 14, 2019, 4:34 p.m. OK GNU C11 TESTS 32 93 1638400 1600
65335436 thisisarandomname C Nov. 19, 2019, 8:43 a.m. OK GNU C11 TESTS 32 108 819200 1600
54479486 dpritam C May 22, 2019, 10:18 a.m. OK GNU C11 TESTS 32 109 3174400 1600
63517206 disposrestfuIly C Oct. 27, 2019, 1:30 a.m. OK GNU C++11 TESTS 32 31 819200 1600
54468539 zhenGG C May 22, 2019, 2:59 a.m. OK GNU C++11 TESTS 32 31 819200 1600
54387423 newbiechdboom0 C May 19, 2019, 2:09 p.m. OK GNU C++11 TESTS 32 31 2457600 1600
58197632 luogu_bot3 C Aug. 3, 2019, 1:55 a.m. OK GNU C++11 TESTS 32 46 819200 1600
55477813 HexSeq C June 12, 2019, 2:12 a.m. OK GNU C++11 TESTS 32 46 819200 1600
55237755 maomao330 C June 7, 2019, 9:16 a.m. OK GNU C++11 TESTS 32 46 819200 1600
55116307 master_rat1 C June 5, 2019, 8:49 a.m. OK GNU C++11 TESTS 32 46 819200 1600
55105807 Umi C June 5, 2019, 2:21 a.m. OK GNU C++11 TESTS 32 46 819200 1600
54977229 chhokmah C June 2, 2019, 11:25 a.m. OK GNU C++11 TESTS 32 46 819200 1600
55478482 luogu_bot5 C June 12, 2019, 2:54 a.m. OK GNU C++11 TESTS 32 46 819200 1600
54348315 newbiechdboom0 C May 18, 2019, 1:32 p.m. OK GNU C++14 TESTS 32 31 2560000 1600
54414498 vjudge5 C May 20, 2019, 11:49 a.m. OK GNU C++14 TESTS 32 46 921600 1600
54387740 tuannv C May 19, 2019, 2:19 p.m. OK GNU C++14 TESTS 32 62 819200 1600
54373901 lok52 C May 19, 2019, 7:55 a.m. OK GNU C++14 TESTS 32 62 819200 1600
54338792 bachhieu1412 C May 18, 2019, 9:22 a.m. OK GNU C++14 TESTS 32 62 819200 1600
54534414 HipHop C May 23, 2019, 7:01 p.m. OK GNU C++14 TESTS 32 62 1638400 1600
54546765 krishna_k C May 24, 2019, 6:40 a.m. OK GNU C++14 TESTS 32 77 819200 1600
67204925 aman_9875 C Dec. 19, 2019, 12:07 p.m. OK GNU C++14 TESTS 32 77 819200 1600
54805309 MengWH C May 29, 2019, 1:48 p.m. OK GNU C++14 TESTS 32 77 819200 1600
54724075 NileshSuthar C May 27, 2019, 7:06 p.m. OK GNU C++14 TESTS 32 77 819200 1600
54874723 .tx C May 31, 2019, 11:13 a.m. OK GNU C++17 TESTS 32 46 819200 1600
54711737 a_nobody C May 27, 2019, 10:45 a.m. OK GNU C++17 TESTS 32 46 1126400 1600
54437688 swustfang C May 21, 2019, 6:49 a.m. OK GNU C++17 TESTS 32 62 819200 1600
68645900 angrysqrt3 C Jan. 12, 2020, 9:03 a.m. OK GNU C++17 TESTS 32 62 819200 1600
57121798 Raiden C July 16, 2019, 1:43 a.m. OK GNU C++17 TESTS 32 62 1638400 1600
54523365 Msy153 C May 23, 2019, 1:18 p.m. OK GNU C++17 TESTS 32 77 819200 1600
54632762 201831990439 C May 25, 2019, 3:17 p.m. OK GNU C++17 TESTS 32 77 819200 1600
54655259 mohamedeltair C May 26, 2019, 7:58 a.m. OK GNU C++17 TESTS 32 77 819200 1600
54751378 1290852513 C May 28, 2019, 1:01 p.m. OK GNU C++17 TESTS 32 77 819200 1600
57945399 iamprayush C July 29, 2019, 2:08 p.m. OK GNU C++17 TESTS 32 77 819200 1600
54390828 wilcot C May 19, 2019, 4:11 p.m. OK Go TESTS 32 108 5222400 1600
63758843 vjudge3 C Oct. 30, 2019, 2:05 a.m. OK Go TESTS 32 108 5324800 1600
54306817 node44 C May 17, 2019, 4:40 p.m. OK Go TESTS 32 109 5222400 1600
55287636 keitax C June 8, 2019, 5:57 a.m. OK Go TESTS 32 280 5222400 1600
65593442 machhra C Nov. 23, 2019, 2:58 p.m. OK Java 11 TESTS 32 296 204800 1600
63759905 emslmar C Oct. 30, 2019, 2:58 a.m. OK Java 11 TESTS 32 452 0 1600
54313911 saurabh0611 C May 17, 2019, 5:44 p.m. OK Java 8 TESTS 32 124 0 1600
54334612 StayAwayFromBitches C May 18, 2019, 7:31 a.m. OK Java 8 TESTS 32 139 0 1600
54546067 arnavks97 C May 24, 2019, 6:16 a.m. OK Java 8 TESTS 32 140 0 1600
54350928 prakhar897 C May 18, 2019, 2:47 p.m. OK Java 8 TESTS 32 140 0 1600
54315802 rahul_roy C May 17, 2019, 6:22 p.m. OK Java 8 TESTS 32 140 0 1600
54490269 GreatWhite C May 22, 2019, 3:07 p.m. OK Java 8 TESTS 32 155 3276800 1600
54315979 prem_cse C May 17, 2019, 6:26 p.m. OK Java 8 TESTS 32 155 3276800 1600
54338847 ghoshbinayak C May 18, 2019, 9:23 a.m. OK Java 8 TESTS 32 170 3276800 1600
54856426 cribabby C May 30, 2019, 7:51 p.m. OK Java 8 TESTS 32 171 0 1600
54655144 dsh_bc C May 26, 2019, 7:53 a.m. OK Java 8 TESTS 32 171 0 1600
54316695 orazbek C May 17, 2019, 6:43 p.m. OK JavaScript TESTS 32 187 21196800 1600
63271405 Spheniscine C Oct. 24, 2019, 4:23 a.m. OK Kotlin TESTS 32 202 6041600 1600
63370798 Spheniscine C Oct. 25, 2019, 9:18 a.m. OK Kotlin TESTS 32 218 6144000 1600
63370457 Spheniscine C Oct. 25, 2019, 9:10 a.m. OK Kotlin TESTS 32 218 6246400 1600
54566212 ulna C May 24, 2019, 4:35 p.m. OK Kotlin TESTS 32 421 17920000 1600
54972178 redjohn C June 2, 2019, 9:05 a.m. OK Kotlin TESTS 32 452 17715200 1600
54729252 Deemo C May 27, 2019, 9:43 p.m. OK Kotlin TESTS 32 483 18329600 1600
55788789 og.kostya C June 19, 2019, 4:36 p.m. OK Mono C# TESTS 32 78 1638400 1600
54406606 azukun C May 20, 2019, 6:47 a.m. OK Mono C# TESTS 32 124 26521600 1600
54336774 nastya1199 C May 18, 2019, 8:29 a.m. OK Mono C# TESTS 32 140 24268800 1600
54418173 camypaper C May 20, 2019, 1:51 p.m. OK Mono C# TESTS 32 155 8294400 1600
54366442 MiuraMiuMiu C May 19, 2019, 3:17 a.m. OK Mono C# TESTS 32 155 20684800 1600
54304423 claw88 C May 17, 2019, 4:27 p.m. OK Mono C# TESTS 32 171 26009600 1600
54368491 eki C May 19, 2019, 5:04 a.m. OK Mono C# TESTS 32 187 26828800 1600
54311567 sergmel C May 17, 2019, 5:02 p.m. OK Mono C# TESTS 32 202 40038400 1600
54318746 omikad C May 17, 2019, 7:41 p.m. OK Mono C# TESTS 32 233 37171200 1600
65441842 vjudge2 C Nov. 20, 2019, 2:36 p.m. OK MS C++ TESTS 32 62 819200 1600
58102696 vjudge4 C Aug. 1, 2019, 2:11 a.m. OK MS C++ TESTS 32 62 819200 1600
56299965 vjudge5 C June 30, 2019, 8:19 a.m. OK MS C++ TESTS 32 62 819200 1600
54806289 vjudge4 C May 29, 2019, 2:20 p.m. OK MS C++ TESTS 32 62 819200 1600
54452549 vjudge3 C May 21, 2019, 2:15 p.m. OK MS C++ TESTS 32 62 819200 1600
54965758 vjudge5 C June 2, 2019, 6:21 a.m. OK MS C++ TESTS 32 62 1228800 1600
57187946 vjudge3 C July 17, 2019, 9:22 a.m. OK MS C++ TESTS 32 62 1638400 1600
54850437 scorpiowf C May 30, 2019, 4:17 p.m. OK MS C++ TESTS 32 62 2457600 1600
57188387 vjudge4 C July 17, 2019, 9:31 a.m. OK MS C++ TESTS 32 62 3174400 1600
58054588 511019727 C July 31, 2019, 4:24 a.m. OK MS C++ TESTS 32 62 3174400 1600
57324813 ___sss C July 19, 2019, 11:40 a.m. OK MS C++ 2017 TESTS 32 78 819200 1600
54347403 Xun_ C May 18, 2019, 1:08 p.m. OK MS C++ 2017 TESTS 32 93 819200 1600
57325562 ___sss C July 19, 2019, 11:58 a.m. OK MS C++ 2017 TESTS 32 93 819200 1600
54525261 NPUlzh C May 23, 2019, 2:11 p.m. OK MS C++ 2017 TESTS 32 93 819200 1600
54662285 coder_pikachu C May 26, 2019, 11:25 a.m. OK MS C++ 2017 TESTS 32 93 1638400 1600
54307987 fireflw C May 17, 2019, 4:46 p.m. OK MS C++ 2017 TESTS 32 93 1740800 1600
63878571 AleksanderBalobanov C Oct. 30, 2019, 7:52 p.m. OK MS C++ 2017 TESTS 32 93 3584000 1600
56539972 petko_mitkov C July 5, 2019, 4:23 a.m. OK MS C++ 2017 TESTS 32 108 819200 1600
60748742 succ1815406055 C Sept. 18, 2019, 4:29 a.m. OK MS C++ 2017 TESTS 32 108 819200 1600
54347291 R99 C May 18, 2019, 1:04 p.m. OK MS C++ 2017 TESTS 32 108 819200 1600
54362831 armoking C May 18, 2019, 10:16 p.m. OK PascalABC.NET TESTS 32 436 102400 1600
54362849 armoking C May 18, 2019, 10:18 p.m. OK PascalABC.NET TESTS 32 436 102400 1600
54362538 armoking C May 18, 2019, 9:59 p.m. OK PascalABC.NET TESTS 32 452 0 1600
54380208 armoking C May 19, 2019, 10:34 a.m. OK PascalABC.NET TESTS 32 452 11366400 1600
54877102 lostamok C May 31, 2019, 12:21 p.m. OK PHP TESTS 32 124 24780800 1600
54305134 bl4ckc4t C May 17, 2019, 4:31 p.m. OK PyPy 2 TESTS 32 217 19148800 1600
54396683 mdippel C May 19, 2019, 8:48 p.m. OK PyPy 2 TESTS 32 233 13312000 1600
54320494 daniel.carlos C May 17, 2019, 8:48 p.m. OK PyPy 2 TESTS 32 233 13414400 1600
54305241 codeseeker C May 17, 2019, 4:32 p.m. OK PyPy 2 TESTS 32 234 12800000 1600
54310925 raj1307 C May 17, 2019, 5 p.m. OK PyPy 2 TESTS 32 295 15564800 1600
54440591 yajun C May 21, 2019, 8:26 a.m. OK PyPy 2 TESTS 32 343 14028800 1600
54314364 c1729 C May 17, 2019, 5:51 p.m. OK PyPy 2 TESTS 32 389 14540800 1600
54529003 jolt.tks C May 23, 2019, 4:04 p.m. OK PyPy 2 TESTS 32 420 28876800 1600
54357031 sainitejeshwar C May 18, 2019, 6:09 p.m. OK PyPy 2 TESTS 32 436 13824000 1600
54669063 thenewguy39 C May 26, 2019, 3:09 p.m. OK PyPy 2 TESTS 32 499 18124800 1600
54326806 hyta4982 C May 18, 2019, 3:18 a.m. OK PyPy 3 TESTS 32 311 19660800 1600
54421569 Mint_Dentifrice C May 20, 2019, 3:46 p.m. OK PyPy 3 TESTS 32 326 19456000 1600
54351031 sersht C May 18, 2019, 2:51 p.m. OK PyPy 3 TESTS 32 327 19456000 1600
55509185 erickjohnross C June 12, 2019, 8:21 p.m. OK PyPy 3 TESTS 32 327 19660800 1600
54363329 albeXL C May 18, 2019, 10:51 p.m. OK PyPy 3 TESTS 32 327 19660800 1600
54319311 thekushalghosh C May 17, 2019, 7:59 p.m. OK PyPy 3 TESTS 32 327 23654400 1600
54337082 _nathan_drake_ C May 18, 2019, 8:37 a.m. OK PyPy 3 TESTS 32 342 19251200 1600
55641883 sdhd C June 16, 2019, 11:23 a.m. OK PyPy 3 TESTS 32 342 19456000 1600
55210797 tardis39 C June 6, 2019, 2:32 p.m. OK PyPy 3 TESTS 32 342 19660800 1600
54330847 Letmecry C May 18, 2019, 5:48 a.m. OK PyPy 3 TESTS 32 342 21913600 1600
59389495 -Morass- C Aug. 24, 2019, 7:52 a.m. OK Python 2 TESTS 32 405 13004800 1600
56490282 musayime C July 3, 2019, 9:15 p.m. OK Python 2 TESTS 32 483 11059200 1600
55611414 soumyasarkar1998 C June 16, 2019, 6 a.m. OK Python 2 TESTS 32 514 11059200 1600
54313979 davidzhou C May 17, 2019, 5:45 p.m. OK Python 2 TESTS 32 545 11264000 1600
63761203 vjudge4 C Oct. 30, 2019, 3:51 a.m. OK Python 2 TESTS 32 561 11161600 1600
54310802 shubhankarsharma00 C May 17, 2019, 4:59 p.m. OK Python 2 TESTS 32 576 11161600 1600
63771933 vjudge1 C Oct. 30, 2019, 8:18 a.m. OK Python 3 TESTS 32 373 16179200 1600
54570777 eugalt C May 24, 2019, 7:08 p.m. OK Python 3 TESTS 32 374 16588800 1600
54314069 adjanybekov C May 17, 2019, 5:46 p.m. OK Python 3 TESTS 32 374 16588800 1600
54492218 vslutov C May 22, 2019, 3:58 p.m. OK Python 3 TESTS 32 389 16076800 1600
54697992 Muyuyi C May 26, 2019, 8:17 p.m. OK Python 3 TESTS 32 389 16588800 1600
54577631 eugalt C May 25, 2019, 1:19 a.m. OK Python 3 TESTS 32 389 16588800 1600
63757394 vjudge2 C Oct. 30, 2019, 12:45 a.m. OK Python 3 TESTS 32 389 17100800 1600
54474457 365050244 C May 22, 2019, 7:35 a.m. OK Python 3 TESTS 32 405 15769600 1600
54547560 eugalt C May 24, 2019, 7:07 a.m. OK Python 3 TESTS 32 405 16588800 1600
54521095 traveller10 C May 23, 2019, 12:18 p.m. OK Python 3 TESTS 32 420 16486400 1600

remove filters

Back to search problems