Codeforces Round 622 (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
1313 Codeforces Round 622 (Div. 2) FINISHED False 7200 154731263 Feb. 23, 2020, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6749 ) B Different Rules PROGRAMMING binary search constructive algorithms greedy implementation math 1700

B"Nikolay has only recently started in competitive programming, but already qualified to the finals of one prestigious olympiad. There going to be n participants, one of whom is Nikolay. Like any good olympiad, it consists of two rounds. Tired of the traditional rules, in which the participant who solved the largest number of problems wins, the organizers came up with different rules. Suppose in the first round participant A took x -th place and in the second round -- y -th place. Then the total score of the participant A is sum x + y . The overall place of the participant A is the number of participants (including A) having their total score less than or equal to the total score of A. Note, that some participants may end up having a common overall place. It is also important to note, that in both the first and the second round there were no two participants tying at a common place. In other words, for every i from 1 to n exactly one participant took i -th place in first round and exactly one participant took i -th place in second round. Right after the end of the Olympiad, Nikolay was informed that he got x -th place in first round and y -th place in the second round. Nikolay doesn't know the results of other participants, yet he wonders what is the minimum and maximum place he can take, if we consider the most favorable and unfavorable outcome for him. Please help Nikolay to find the answer to this question. The first line contains an integer t ( 1 <= t <= 100 ) -- the number of test cases to solve. Each of the following t lines contains integers n , x , y ( 1 <= q n <= q 10^9 , 1 <= x, y <= n ) -- the number of participants in the olympiad, the place that Nikolay took in the first round and the place that Nikolay took in the second round. Print two integers -- the minimum and maximum possible overall place Nikolay could take. Explanation for the"...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
71666345 daut-dlang B Feb. 23, 2020, 9:51 a.m. OK D TESTS 8 30 0 1700
71744604 ftiasch B Feb. 24, 2020, 5:24 a.m. OK D TESTS 8 30 0 1700
71684749 ruban B Feb. 23, 2020, 11:01 a.m. OK Delphi TESTS 8 31 13721600 1700
71758674 vjudge1 B Feb. 24, 2020, 11 a.m. OK FPC TESTS 8 31 0 1700
71661842 akash19jain B Feb. 23, 2020, 9:34 a.m. OK GNU C11 TESTS 8 15 0 1700
71684330 jschr B Feb. 23, 2020, 11 a.m. OK GNU C11 TESTS 8 15 0 1700
71673074 pdsu--mazh B Feb. 23, 2020, 10:16 a.m. OK GNU C11 TESTS 8 15 0 1700
71668762 755352046 B Feb. 23, 2020, 10 a.m. OK GNU C11 TESTS 8 15 0 1700
71670676 YOK B Feb. 23, 2020, 10:07 a.m. OK GNU C11 TESTS 8 30 0 1700
71727289 ARSLANNN B Feb. 23, 2020, 6:34 p.m. OK GNU C11 TESTS 8 31 0 1700
71675041 pengin_2000 B Feb. 23, 2020, 10:23 a.m. OK GNU C11 TESTS 8 31 0 1700
71874875 UshanGhosh B Feb. 25, 2020, 5:23 p.m. OK GNU C11 TESTS 8 31 0 1700
71740482 18120581074 B Feb. 24, 2020, 3:03 a.m. OK GNU C11 TESTS 8 31 0 1700
71957727 20191003176 B Feb. 27, 2020, 7:50 a.m. OK GNU C++11 TESTS 8 15 0 1700
71956548 YanXiaohan B Feb. 27, 2020, 7:21 a.m. OK GNU C++11 TESTS 8 15 0 1700
71949769 Desertico B Feb. 27, 2020, 4:22 a.m. OK GNU C++11 TESTS 8 15 0 1700
71945412 Pyqe B Feb. 27, 2020, 1:26 a.m. OK GNU C++11 TESTS 8 15 0 1700
71923471 coder370 B Feb. 26, 2020, 3:30 p.m. OK GNU C++11 TESTS 8 15 0 1700
71966186 LYFer B Feb. 27, 2020, 10:41 a.m. OK GNU C++11 TESTS 8 15 0 1700
71964057 mitsuku B Feb. 27, 2020, 9:59 a.m. OK GNU C++11 TESTS 8 15 0 1700
71963044 chenshouao B Feb. 27, 2020, 9:39 a.m. OK GNU C++11 TESTS 8 15 0 1700
71959386 luogu_bot2 B Feb. 27, 2020, 8:27 a.m. OK GNU C++11 TESTS 8 15 0 1700
71958640 zzy2333 B Feb. 27, 2020, 8:11 a.m. OK GNU C++11 TESTS 8 15 0 1700
71899203 vjudge1 B Feb. 26, 2020, 7:02 a.m. OK GNU C++14 TESTS 8 15 0 1700
71948756 Rational_Laic B Feb. 27, 2020, 3:44 a.m. OK GNU C++14 TESTS 8 15 0 1700
71951828 mjtai B Feb. 27, 2020, 5:27 a.m. OK GNU C++14 TESTS 8 15 0 1700
71957962 momoofhappiness B Feb. 27, 2020, 7:55 a.m. OK GNU C++14 TESTS 8 15 0 1700
71962932 ya_hossein B Feb. 27, 2020, 9:36 a.m. OK GNU C++14 TESTS 8 15 0 1700
71931524 ankur314 B Feb. 26, 2020, 5:53 p.m. OK GNU C++14 TESTS 8 15 0 1700
71929858 avinash.ac04 B Feb. 26, 2020, 5:20 p.m. OK GNU C++14 TESTS 8 15 0 1700
71912521 sharma235 B Feb. 26, 2020, 12:15 p.m. OK GNU C++14 TESTS 8 15 0 1700
71912448 linbinwu B Feb. 26, 2020, 12:14 p.m. OK GNU C++14 TESTS 8 15 0 1700
71910682 mqt2019 B Feb. 26, 2020, 11:37 a.m. OK GNU C++14 TESTS 8 15 0 1700
71949465 sushil123 B Feb. 27, 2020, 4:11 a.m. OK GNU C++17 TESTS 8 15 0 1700
71962218 keshav.maverick B Feb. 27, 2020, 9:21 a.m. OK GNU C++17 TESTS 8 15 0 1700
71957348 fsociety00 B Feb. 27, 2020, 7:41 a.m. OK GNU C++17 TESTS 8 15 0 1700
71955525 hello201999 B Feb. 27, 2020, 6:57 a.m. OK GNU C++17 TESTS 8 15 0 1700
71955061 balanda_135iq B Feb. 27, 2020, 6:46 a.m. OK GNU C++17 TESTS 8 15 0 1700
71952628 SummerMing B Feb. 27, 2020, 5:49 a.m. OK GNU C++17 TESTS 8 15 0 1700
71951930 Davidshx B Feb. 27, 2020, 5:30 a.m. OK GNU C++17 TESTS 8 15 0 1700
71951598 nomight B Feb. 27, 2020, 5:20 a.m. OK GNU C++17 TESTS 8 15 0 1700
71950584 Marckess B Feb. 27, 2020, 4:49 a.m. OK GNU C++17 TESTS 8 15 0 1700
71942244 code__forces B Feb. 26, 2020, 10:39 p.m. OK GNU C++17 TESTS 8 15 0 1700
71748823 synapse B Feb. 24, 2020, 7:15 a.m. OK Go TESTS 8 31 0 1700
71743590 synapse B Feb. 24, 2020, 4:50 a.m. OK Go TESTS 8 31 0 1700
71679920 u1s1reallycai B Feb. 23, 2020, 10:43 a.m. OK Go TESTS 8 31 0 1700
71684014 snow_bear_328 B Feb. 23, 2020, 10:59 a.m. OK Go TESTS 8 46 0 1700
71931284 Laurens B Feb. 26, 2020, 5:48 p.m. OK Haskell TESTS 8 46 102400 1700
71837123 Leewings B Feb. 25, 2020, 5:59 a.m. OK Java 11 TESTS 8 186 0 1700
71700026 gagangoel1994 B Feb. 23, 2020, 3:22 p.m. OK Java 11 TESTS 8 187 0 1700
71680606 Musin B Feb. 23, 2020, 10:46 a.m. OK Java 11 TESTS 8 187 0 1700
71837383 Leewings B Feb. 25, 2020, 6:06 a.m. OK Java 11 TESTS 8 202 0 1700
71745039 abhi123valani B Feb. 24, 2020, 5:40 a.m. OK Java 11 TESTS 8 202 0 1700
71743243 shamim_nik B Feb. 24, 2020, 4:38 a.m. OK Java 11 TESTS 8 202 0 1700
71681758 nick_301 B Feb. 23, 2020, 10:50 a.m. OK Java 11 TESTS 8 202 0 1700
71758703 EigenFunk B Feb. 24, 2020, 11:01 a.m. OK Java 11 TESTS 8 217 0 1700
71700495 xty123 B Feb. 23, 2020, 3:31 p.m. OK Java 11 TESTS 8 217 0 1700
71669672 aswals8991 B Feb. 23, 2020, 10:03 a.m. OK Java 11 TESTS 8 217 0 1700
71845556 1u_my_light B Feb. 25, 2020, 9:04 a.m. OK Java 8 TESTS 8 93 0 1700
71701707 nalin_1000101 B Feb. 23, 2020, 3:53 p.m. OK Java 8 TESTS 8 93 0 1700
71701547 Mahakarma B Feb. 23, 2020, 3:51 p.m. OK Java 8 TESTS 8 108 0 1700
71685395 aman28rwt B Feb. 23, 2020, 11:03 a.m. OK Java 8 TESTS 8 108 0 1700
71673029 Charlesna B Feb. 23, 2020, 10:15 a.m. OK Java 8 TESTS 8 108 0 1700
71669947 Tatsuyaaaa B Feb. 23, 2020, 10:04 a.m. OK Java 8 TESTS 8 108 0 1700
71661328 naam_me_kya_rakha_he B Feb. 23, 2020, 9:33 a.m. OK Java 8 TESTS 8 108 0 1700
71694491 adarsh000321 B Feb. 23, 2020, 1:37 p.m. OK Java 8 TESTS 8 109 0 1700
71755872 ZerooCool B Feb. 24, 2020, 9:58 a.m. OK Java 8 TESTS 8 109 0 1700
71711499 polyakoff B Feb. 23, 2020, 4:49 p.m. OK Java 8 TESTS 8 109 0 1700
71681043 vokesus B Feb. 23, 2020, 10:48 a.m. OK JavaScript TESTS 8 30 1024000 1700
71948318 Spheniscine B Feb. 27, 2020, 3:27 a.m. OK Kotlin TESTS 8 108 0 1700
71680958 SlavaG B Feb. 23, 2020, 10:47 a.m. OK Kotlin TESTS 8 109 0 1700
71700737 infoshoc42 B Feb. 23, 2020, 3:35 p.m. OK Kotlin TESTS 8 140 102400 1700
71699406 scnucjh B Feb. 23, 2020, 3:11 p.m. OK Kotlin TESTS 8 140 204800 1700
71669158 strelas B Feb. 23, 2020, 10:01 a.m. OK Kotlin TESTS 8 155 102400 1700
71681430 koboshi B Feb. 23, 2020, 10:49 a.m. OK Kotlin TESTS 8 171 102400 1700
71668700 seirion B Feb. 23, 2020, 10 a.m. OK Kotlin TESTS 8 171 102400 1700
71681670 eSeF_ B Feb. 23, 2020, 10:50 a.m. OK Mono C# TESTS 8 46 0 1700
71688238 mban259 B Feb. 23, 2020, 11:49 a.m. OK Mono C# TESTS 8 46 0 1700
71768287 plasma-effect B Feb. 24, 2020, 2:10 p.m. OK Mono C# TESTS 8 46 3584000 1700
71676523 riantkb B Feb. 23, 2020, 10:29 a.m. OK Mono C# TESTS 8 62 0 1700
71668215 songhaoran B Feb. 23, 2020, 9:58 a.m. OK MS C++ TESTS 8 15 0 1700
71698043 tarattata1 B Feb. 23, 2020, 2:45 p.m. OK MS C++ TESTS 8 15 0 1700
71948825 vjudge3 B Feb. 27, 2020, 3:47 a.m. OK MS C++ TESTS 8 15 0 1700
71859869 vjudge2 B Feb. 25, 2020, 1:18 p.m. OK MS C++ TESTS 8 30 0 1700
71891900 vjudge3 B Feb. 26, 2020, 2:57 a.m. OK MS C++ TESTS 8 30 0 1700
71737004 vjudge5 B Feb. 24, 2020, midnight OK MS C++ TESTS 8 30 0 1700
71669128 VagrantAC B Feb. 23, 2020, 10:01 a.m. OK MS C++ TESTS 8 30 0 1700
71915443 vjudge1 B Feb. 26, 2020, 1:08 p.m. OK MS C++ TESTS 8 31 0 1700
71944788 vjudge4 B Feb. 27, 2020, 12:52 a.m. OK MS C++ TESTS 8 31 0 1700
71851986 vjudge1 B Feb. 25, 2020, 11:13 a.m. OK MS C++ TESTS 8 31 0 1700
71664160 anylonger B Feb. 23, 2020, 9:43 a.m. OK MS C++ 2017 TESTS 8 15 0 1700
71699230 Ni123 B Feb. 23, 2020, 3:07 p.m. OK MS C++ 2017 TESTS 8 15 0 1700
71746398 WithYou0919 B Feb. 24, 2020, 6:16 a.m. OK MS C++ 2017 TESTS 8 15 0 1700
71840017 chuchothongminh_26 B Feb. 25, 2020, 7:04 a.m. OK MS C++ 2017 TESTS 8 15 0 1700
71681088 Yarema.st B Feb. 23, 2020, 10:48 a.m. OK MS C++ 2017 TESTS 8 30 0 1700
71679569 gyuho965 B Feb. 23, 2020, 10:42 a.m. OK MS C++ 2017 TESTS 8 30 0 1700
71907530 vjudge2 B Feb. 26, 2020, 10:35 a.m. OK MS C++ 2017 TESTS 8 30 0 1700
71842389 jdb0ss B Feb. 25, 2020, 7:55 a.m. OK MS C++ 2017 TESTS 8 30 0 1700
71694318 e.m.blagov B Feb. 23, 2020, 1:34 p.m. OK MS C++ 2017 TESTS 8 30 0 1700
71682420 DarkSun B Feb. 23, 2020, 10:53 a.m. OK MS C++ 2017 TESTS 8 30 0 1700
71676673 denchik007orel57 B Feb. 23, 2020, 10:29 a.m. OK PascalABC.NET TESTS 8 327 102400 1700
71682656 Mukundan314 B Feb. 23, 2020, 10:54 a.m. OK PyPy 2 TESTS 8 124 102400 1700
71687187 yamatoumi B Feb. 23, 2020, 11:36 a.m. OK PyPy 2 TESTS 8 139 0 1700
71676267 iamprayush B Feb. 23, 2020, 10:28 a.m. OK PyPy 2 TESTS 8 249 9420800 1700
71945944 sam997 B Feb. 27, 2020, 1:53 a.m. OK PyPy 3 TESTS 8 124 0 1700
71713720 UTMoonlight B Feb. 23, 2020, 5:02 p.m. OK PyPy 3 TESTS 8 124 0 1700
71669557 thxtech B Feb. 23, 2020, 10:03 a.m. OK PyPy 3 TESTS 8 124 0 1700
71815071 YPL_TAIWAN B Feb. 24, 2020, 5:40 p.m. OK PyPy 3 TESTS 8 139 0 1700
71752773 AvinashKartik B Feb. 24, 2020, 8:50 a.m. OK PyPy 3 TESTS 8 139 0 1700
71709763 thongnguyen050999 B Feb. 23, 2020, 4:40 p.m. OK PyPy 3 TESTS 8 139 0 1700
71683172 m.ni B Feb. 23, 2020, 10:56 a.m. OK PyPy 3 TESTS 8 139 0 1700
71677600 Ik_noom B Feb. 23, 2020, 10:33 a.m. OK PyPy 3 TESTS 8 139 0 1700
71670639 BarryFam B Feb. 23, 2020, 10:07 a.m. OK PyPy 3 TESTS 8 139 0 1700
71670607 addammy B Feb. 23, 2020, 10:07 a.m. OK PyPy 3 TESTS 8 139 0 1700
71675328 ashashwat B Feb. 23, 2020, 10:24 a.m. OK Python 2 TESTS 8 265 5324800 1700
71916270 MinecraftFuns B Feb. 26, 2020, 1:23 p.m. OK Python 3 TESTS 8 93 0 1700
71698739 SinKing B Feb. 23, 2020, 2:58 p.m. OK Python 3 TESTS 8 93 0 1700
71678253 hiraku B Feb. 23, 2020, 10:36 a.m. OK Python 3 TESTS 8 93 0 1700
71700874 bdomokos B Feb. 23, 2020, 3:38 p.m. OK Python 3 TESTS 8 108 0 1700
71687915 sapna_tomar B Feb. 23, 2020, 11:45 a.m. OK Python 3 TESTS 8 108 0 1700
71668152 akar_ B Feb. 23, 2020, 9:57 a.m. OK Python 3 TESTS 8 108 0 1700
71666998 XMR B Feb. 23, 2020, 9:53 a.m. OK Python 3 TESTS 8 108 0 1700
71945077 breno B Feb. 27, 2020, 1:08 a.m. OK Python 3 TESTS 8 108 307200 1700
71945068 breno B Feb. 27, 2020, 1:07 a.m. OK Python 3 TESTS 8 108 307200 1700
71945012 breno B Feb. 27, 2020, 1:04 a.m. OK Python 3 TESTS 8 108 307200 1700
71696906 Jughead B Feb. 23, 2020, 2:23 p.m. OK Ruby TESTS 8 62 0 1700
71683362 sheep0x B Feb. 23, 2020, 10:57 a.m. OK Ruby TESTS 8 77 0 1700
71671335 simanman B Feb. 23, 2020, 10:09 a.m. OK Ruby TESTS 8 109 102400 1700
71747879 togatoga B Feb. 24, 2020, 6:52 a.m. OK Rust TESTS 8 30 204800 1700
71704062 akiradeveloper B Feb. 23, 2020, 4:14 p.m. OK Rust TESTS 8 30 204800 1700
71799907 Lvl999Noob B Feb. 24, 2020, 3:56 p.m. OK Rust TESTS 8 31 0 1700
71666564 sansen B Feb. 23, 2020, 9:52 a.m. OK Rust TESTS 8 31 0 1700
71662321 terraformer B Feb. 23, 2020, 9:36 a.m. OK Rust TESTS 8 31 0 1700
71747827 togatoga B Feb. 24, 2020, 6:51 a.m. OK Rust TESTS 8 31 204800 1700

remove filters

Back to search problems