Codeforces Round 919 (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
1920 Codeforces Round 919 (Div. 2) FINISHED False 7200 32023463 Jan. 13, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 28176 ) A Satisfying Constraints PROGRAMMING brute force greedy math schedules

B'Alex is solving a problem. He has n constraints on what the integer k can be. There are three types of constraints: Help Alex find the number of integers k that satisfy all n constraints. It is guaranteed that the answer is finite (there exists at least one constraint of type 1 and at least one constraint of type 2 ). Also, it is guaranteed that no two constraints are the exact same. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 100 ) -- the number of constraints. The following n lines describe the constraints. Each line contains two integers a and x ( a in {1,2,3 }, , 1 <= q x <= q 10^9 ). a denotes the type of constraint. If a=1 , k must be greater than or equal to x . If a=2 , k must be less than or equal to x . If a=3 , k must be not equal to x . It is guaranteed that there is a finite amount of integers satisfying all n constraints (there exists at least one constraint of type 1 and at least one constraint of type 2 ). It is also guaranteed that no two constraints are the exact same (in other words, all pairs (a, x) are distinct). For each test case, output a single integer -- the number of integers k that satisfy all n constraints. In the first test case, k geq 3 and k <= q 10 . Furthermore, k neq 1 and k neq 5 . The possible integers k that satisfy the constraints are 3,4,6,7,8,9,10 . So the answer is 7 . In the second test case, k ge 5 and k <= 4 , which is impossible. So the answer is 0 . '...

Tutorials

Editorial for Codeforces Round #919 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
241517491 sh_arman A Jan. 14, 2024, 1:11 a.m. OK C# 10 TESTS 9 46 3276800
241511600 ansergeyg A Jan. 13, 2024, 9:31 p.m. OK C# 10 TESTS 9 61 3481600
241496313 mohamedmmdouh226 A Jan. 13, 2024, 6:03 p.m. OK C# 8 TESTS 9 140 4096000
241513761 bluemegane A Jan. 13, 2024, 10:37 p.m. OK C# 8 TESTS 9 170 3379200
241502559 Nikhil73995 A Jan. 13, 2024, 7:05 p.m. OK Clang++17 Diagnostics TESTS 9 436 5222400
241524814 Tigerwood A Jan. 14, 2024, 4:11 a.m. OK Clang++17 Diagnostics TESTS 9 436 5324800
241496704 vijay9005442298 A Jan. 13, 2024, 6:06 p.m. OK Clang++17 Diagnostics TESTS 9 545 17920000
241498408 sasta_coderr A Jan. 13, 2024, 6:21 p.m. OK Clang++20 Diagnostics TESTS 9 421 1024000
241501757 PaRaDoX_CSTU A Jan. 13, 2024, 6:55 p.m. OK Clang++20 Diagnostics TESTS 9 436 5222400
241497529 Arittra202 A Jan. 13, 2024, 6:13 p.m. OK Clang++20 Diagnostics TESTS 9 499 2150400
241480788 CS23B036 A Jan. 13, 2024, 4:24 p.m. OK GNU C11 TESTS 9 15 307200
241482452 Utkarsh.iitkgp A Jan. 13, 2024, 4:27 p.m. OK GNU C11 TESTS 9 31 0
241499074 lakshminarasimha.y22 A Jan. 13, 2024, 6:27 p.m. OK GNU C11 TESTS 9 31 0
241500204 pratikjaiswal808 A Jan. 13, 2024, 6:38 p.m. OK GNU C11 TESTS 9 31 0
241521749 kylin370 A Jan. 14, 2024, 3:03 a.m. OK GNU C11 TESTS 9 31 0
241497845 sloguy69 A Jan. 13, 2024, 6:16 p.m. OK GNU C11 TESTS 9 31 0
241498387 jblinfinity810 A Jan. 13, 2024, 6:21 p.m. OK GNU C11 TESTS 9 31 0
241482252 hemantchandel1122 A Jan. 13, 2024, 4:27 p.m. OK GNU C11 TESTS 9 31 204800
241480995 Sujal_715 A Jan. 13, 2024, 4:24 p.m. OK GNU C11 TESTS 9 31 204800
241527775 Abinnn A Jan. 14, 2024, 5:04 a.m. OK GNU C11 TESTS 9 31 307200
241523951 xuan13853715014 A Jan. 14, 2024, 3:53 a.m. OK GNU C++14 TESTS 9 15 0
241517704 White_Sun A Jan. 14, 2024, 1:19 a.m. OK GNU C++14 TESTS 9 15 0
241518723 Mars_Dingdang A Jan. 14, 2024, 1:50 a.m. OK GNU C++14 TESTS 9 15 2252800
241517517 XHZJZ A Jan. 14, 2024, 1:12 a.m. OK GNU C++14 TESTS 9 30 0
241491370 anand__code A Jan. 13, 2024, 5:28 p.m. OK GNU C++14 TESTS 9 30 102400
241484118 Ags1 A Jan. 13, 2024, 4:31 p.m. OK GNU C++14 TESTS 9 30 102400
241518325 jcai972 A Jan. 14, 2024, 1:39 a.m. OK GNU C++14 TESTS 9 30 102400
241509183 coder.iam A Jan. 13, 2024, 8:42 p.m. OK GNU C++14 TESTS 9 30 102400
241503183 Silverfox459 A Jan. 13, 2024, 7:13 p.m. OK GNU C++14 TESTS 9 30 204800
241524909 zltzlt A Jan. 14, 2024, 4:13 a.m. OK GNU C++14 TESTS 9 31 0
241489887 why1 A Jan. 13, 2024, 5:21 p.m. OK GNU C++17 TESTS 9 15 102400
241515238 flandre.scarlet A Jan. 13, 2024, 11:34 p.m. OK GNU C++17 TESTS 9 15 102400
241498708 nada_27 A Jan. 13, 2024, 6:24 p.m. OK GNU C++17 TESTS 9 30 0
241502450 LOGAN.X A Jan. 13, 2024, 7:04 p.m. OK GNU C++17 TESTS 9 30 0
241523157 Halal_Hacker A Jan. 14, 2024, 3:34 a.m. OK GNU C++17 TESTS 9 30 0
241520086 keshav1303 A Jan. 14, 2024, 2:25 a.m. OK GNU C++17 TESTS 9 30 102400
241523499 Mobilizesxd A Jan. 14, 2024, 3:42 a.m. OK GNU C++17 TESTS 9 30 102400
241523417 wink A Jan. 14, 2024, 3:41 a.m. OK GNU C++17 TESTS 9 30 102400
241524486 Lakshi4h A Jan. 14, 2024, 4:04 a.m. OK GNU C++17 TESTS 9 30 102400
241530607 Tyellow A Jan. 14, 2024, 5:41 a.m. OK GNU C++17 TESTS 9 30 102400
241499133 heisenberg_007 A Jan. 13, 2024, 6:28 p.m. OK GNU C++17 (64) TESTS 9 15 0
241525054 Wild-WL A Jan. 14, 2024, 4:16 a.m. OK GNU C++17 (64) TESTS 9 15 0
241520493 xiaoqi132 A Jan. 14, 2024, 2:35 a.m. OK GNU C++17 (64) TESTS 9 15 0
241517242 youthPaul A Jan. 14, 2024, 1:03 a.m. OK GNU C++17 (64) TESTS 9 15 0
241517181 Souture A Jan. 14, 2024, 1:01 a.m. OK GNU C++17 (64) TESTS 9 15 0
241516981 LiShunSheng A Jan. 14, 2024, 12:54 a.m. OK GNU C++17 (64) TESTS 9 15 0
241501983 Tanjim.100 A Jan. 13, 2024, 6:58 p.m. OK GNU C++17 (64) TESTS 9 15 0
241499682 AliRezA_ A Jan. 13, 2024, 6:33 p.m. OK GNU C++17 (64) TESTS 9 15 0
241490796 M.I.H.Maruf A Jan. 13, 2024, 5:25 p.m. OK GNU C++17 (64) TESTS 9 15 102400
241518090 Drmeng A Jan. 14, 2024, 1:32 a.m. OK GNU C++17 (64) TESTS 9 15 1638400
241527526 Madeline_qwq A Jan. 14, 2024, 5 a.m. OK GNU C++20 (64) TESTS 9 15 0
241527698 ydv_s A Jan. 14, 2024, 5:03 a.m. OK GNU C++20 (64) TESTS 9 15 0
241528439 mittalshivam_2709 A Jan. 14, 2024, 5:13 a.m. OK GNU C++20 (64) TESTS 9 15 0
241528491 Umar_Sk A Jan. 14, 2024, 5:14 a.m. OK GNU C++20 (64) TESTS 9 15 0
241526914 Anant2961 A Jan. 14, 2024, 4:49 a.m. OK GNU C++20 (64) TESTS 9 15 0
241529340 Parthiv2P A Jan. 14, 2024, 5:26 a.m. OK GNU C++20 (64) TESTS 9 15 0
241531609 conqueror_of_ocortez A Jan. 14, 2024, 5:53 a.m. OK GNU C++20 (64) TESTS 9 15 0
241532109 talver A Jan. 14, 2024, 6 a.m. OK GNU C++20 (64) TESTS 9 15 0
241528644 3bd_allah_alali A Jan. 14, 2024, 5:17 a.m. OK GNU C++20 (64) TESTS 9 15 0
241527310 crankyYC A Jan. 14, 2024, 4:56 a.m. OK GNU C++20 (64) TESTS 9 15 0
241491237 shojin_pro A Jan. 13, 2024, 5:27 p.m. OK Java 11 TESTS 9 171 0
241527738 ycnetsisnoc A Jan. 14, 2024, 5:03 a.m. OK Java 11 TESTS 9 171 0
241513458 vijender_8601 A Jan. 13, 2024, 10:28 p.m. OK Java 11 TESTS 9 186 0
241504056 vaibye7 A Jan. 13, 2024, 7:24 p.m. OK Java 11 TESTS 9 187 0
241516445 nitish_0201 A Jan. 14, 2024, 12:29 a.m. OK Java 11 TESTS 9 217 0
241492808 Nick A Jan. 13, 2024, 5:37 p.m. OK Java 11 TESTS 9 218 0
241504836 shashankskb18700 A Jan. 13, 2024, 7:35 p.m. OK Java 11 TESTS 9 296 0
241496693 rajneesh.osho A Jan. 13, 2024, 6:06 p.m. OK Java 11 TESTS 9 296 0
241530796 kalabaiaman06 A Jan. 14, 2024, 5:44 a.m. OK Java 11 TESTS 9 311 0
241527493 rohitrokz29 A Jan. 14, 2024, 5 a.m. OK Java 11 TESTS 9 311 0
241509371 yashvardhan3 A Jan. 13, 2024, 8:46 p.m. OK Java 17 TESTS 9 217 409600
241513512 FierteDeCeylan A Jan. 13, 2024, 10:29 p.m. OK Java 17 TESTS 9 248 512000
241514985 snowyrsb A Jan. 13, 2024, 11:23 p.m. OK Java 17 TESTS 9 264 204800
241495693 ChrizzyB47 A Jan. 13, 2024, 5:57 p.m. OK Java 17 TESTS 9 265 512000
241527380 Jagnath_Reddy A Jan. 14, 2024, 4:58 a.m. OK Java 17 TESTS 9 296 307200
241496983 param_101204 A Jan. 13, 2024, 6:08 p.m. OK Java 17 TESTS 9 358 102400
241482386 Eagle__ A Jan. 13, 2024, 4:27 p.m. OK Java 17 TESTS 9 358 204800
241519521 vansh_ag A Jan. 14, 2024, 2:12 a.m. OK Java 17 TESTS 9 358 409600
241493588 Ragavendhiran_S A Jan. 13, 2024, 5:42 p.m. OK Java 17 TESTS 9 358 614400
241503667 phoeni_x A Jan. 13, 2024, 7:20 p.m. OK Java 17 TESTS 9 373 614400
241508622 gearsoft A Jan. 13, 2024, 8:33 p.m. OK Java 21 TESTS 9 295 0
241502885 chess_nf3 A Jan. 13, 2024, 7:09 p.m. OK Java 21 TESTS 9 295 102400
241516245 goalboy A Jan. 14, 2024, 12:19 a.m. OK Java 21 TESTS 9 421 921600
241498828 dk_g A Jan. 13, 2024, 6:25 p.m. OK Java 21 TESTS 9 436 614400
241518706 HuParry A Jan. 14, 2024, 1:50 a.m. OK Java 21 TESTS 9 451 102400
241503356 lerp A Jan. 13, 2024, 7:15 p.m. OK Java 21 TESTS 9 451 512000
241482804 VarunSahoo A Jan. 13, 2024, 4:28 p.m. OK Java 21 TESTS 9 452 204800
241483766 sefro102 A Jan. 13, 2024, 4:30 p.m. OK Java 21 TESTS 9 452 307200
241520549 CosmicCipher A Jan. 14, 2024, 2:37 a.m. OK Java 21 TESTS 9 452 409600
241501729 mnb_code A Jan. 13, 2024, 6:55 p.m. OK Java 21 TESTS 9 452 614400
241506818 Kuuuuuuuuu A Jan. 13, 2024, 8:03 p.m. OK Java 8 TESTS 9 108 0
241512965 Yousef_Badr A Jan. 13, 2024, 10:10 p.m. OK Java 8 TESTS 9 109 0
241498731 kunwar123 A Jan. 13, 2024, 6:24 p.m. OK Java 8 TESTS 9 109 0
241494521 vijay_panwar12 A Jan. 13, 2024, 5:48 p.m. OK Java 8 TESTS 9 109 0
241513353 malekelkassas A Jan. 13, 2024, 10:23 p.m. OK Java 8 TESTS 9 124 0
241508096 SecondThread A Jan. 13, 2024, 8:24 p.m. OK Java 8 TESTS 9 124 0
241498903 gdax A Jan. 13, 2024, 6:26 p.m. OK Java 8 TESTS 9 124 0
241515022 sourav2999 A Jan. 13, 2024, 11:24 p.m. OK Java 8 TESTS 9 139 0
241505380 __SSB__ A Jan. 13, 2024, 7:43 p.m. OK Java 8 TESTS 9 139 0
241488766 iamdimonis A Jan. 13, 2024, 5:16 p.m. OK Java 8 TESTS 9 139 0
241496553 ce20026 A Jan. 13, 2024, 6:05 p.m. OK Kotlin 1.9 TESTS 9 514 58675200
241483718 shakib A Jan. 13, 2024, 4:30 p.m. OK Kotlin 1.9 TESTS 9 748 129228800
241525909 maple19out A Jan. 14, 2024, 4:32 a.m. OK MS C++ 2017 TESTS 9 46 0
241507167 Elsa3dy__74__ A Jan. 13, 2024, 8:09 p.m. OK MS C++ 2017 TESTS 9 78 0
241510569 pranjal15195gaur A Jan. 13, 2024, 9:08 p.m. OK MS C++ 2017 TESTS 9 93 0
241505229 ds_25 A Jan. 13, 2024, 7:41 p.m. OK MS C++ 2017 TESTS 9 93 0
241501037 dhruvagrawal2205 A Jan. 13, 2024, 6:47 p.m. OK MS C++ 2017 TESTS 9 93 0
241492088 DmacOP A Jan. 13, 2024, 5:32 p.m. OK MS C++ 2017 TESTS 9 93 0
241480837 Aditya_hckr A Jan. 13, 2024, 4:24 p.m. OK MS C++ 2017 TESTS 9 93 0
241481007 RudakovNikita A Jan. 13, 2024, 4:24 p.m. OK MS C++ 2017 TESTS 9 93 102400
241481703 satyam_1909 A Jan. 13, 2024, 4:26 p.m. OK MS C++ 2017 TESTS 9 93 204800
241530757 kainat.mansha A Jan. 14, 2024, 5:43 a.m. OK MS C++ 2017 TESTS 9 93 409600
241524645 chuflay A Jan. 14, 2024, 4:07 a.m. OK Node.js TESTS 9 124 15769600
241515363 crapcode A Jan. 13, 2024, 11:39 p.m. OK PHP TESTS 9 46 0
241481572 brunocalza A Jan. 13, 2024, 4:26 p.m. OK PyPy 2 TESTS 9 264 2662400
241502139 Ayushman_123 A Jan. 13, 2024, 7 p.m. OK PyPy 3 TESTS 9 342 8396800
241508881 monji A Jan. 13, 2024, 8:37 p.m. OK PyPy 3 TESTS 9 530 7782400
241506993 LeaderLuther A Jan. 13, 2024, 8:06 p.m. OK PyPy 3 TESTS 9 530 7987200
241516052 kennyleet A Jan. 14, 2024, 12:10 a.m. OK PyPy 3 TESTS 9 530 8089600
241493063 binijamin_et A Jan. 13, 2024, 5:38 p.m. OK PyPy 3 TESTS 9 530 8192000
241480432 kaby1112 A Jan. 13, 2024, 4:23 p.m. OK PyPy 3 TESTS 9 560 8089600
241520514 porker2008 A Jan. 14, 2024, 2:36 a.m. OK PyPy 3 TESTS 9 561 8908800
241493328 adityamehrotra A Jan. 13, 2024, 5:40 p.m. OK PyPy 3 TESTS 9 592 8499200
241481992 cristian0692 A Jan. 13, 2024, 4:26 p.m. OK PyPy 3 TESTS 9 592 8601600
241489073 chandralohit1234 A Jan. 13, 2024, 5:17 p.m. OK PyPy 3 TESTS 9 592 10137600
241509215 gardengnome A Jan. 13, 2024, 8:43 p.m. OK PyPy 3-64 TESTS 9 108 3686400
241530514 My_skiff_passed_WChShan A Jan. 14, 2024, 5:40 a.m. OK PyPy 3-64 TESTS 9 108 4608000
241504278 VitalyKo A Jan. 13, 2024, 7:27 p.m. OK PyPy 3-64 TESTS 9 108 4608000
241489969 master_JD A Jan. 13, 2024, 5:21 p.m. OK PyPy 3-64 TESTS 9 108 4812800
241504682 AndreiZherder A Jan. 13, 2024, 7:33 p.m. OK PyPy 3-64 TESTS 9 108 6144000
241499672 jvatsal0709 A Jan. 13, 2024, 6:33 p.m. OK PyPy 3-64 TESTS 9 109 5939200
241500015 _aadiupadhyay_ A Jan. 13, 2024, 6:37 p.m. OK PyPy 3-64 TESTS 9 124 4812800
241520445 Wizard_of_Orz A Jan. 14, 2024, 2:34 a.m. OK PyPy 3-64 TESTS 9 124 4915200
241500863 daniil.gerchik A Jan. 13, 2024, 6:45 p.m. OK PyPy 3-64 TESTS 9 124 5324800
241493189 gardengnome A Jan. 13, 2024, 5:39 p.m. OK PyPy 3-64 TESTS 9 124 5836800
241524554 pennymagic156 A Jan. 14, 2024, 4:05 a.m. OK Python 3 TESTS 9 77 0
241510236 elistark A Jan. 13, 2024, 9:01 p.m. OK Python 3 TESTS 9 78 204800
241531947 virCS A Jan. 14, 2024, 5:58 a.m. OK Python 3 TESTS 9 93 409600
241514531 harekrisna101 A Jan. 13, 2024, 11:04 p.m. OK Python 3 TESTS 9 108 102400
241510095 Thinking09 A Jan. 13, 2024, 8:59 p.m. OK Python 3 TESTS 9 108 102400
241497107 Winter4 A Jan. 13, 2024, 6:09 p.m. OK Python 3 TESTS 9 108 102400
241493655 mankifg A Jan. 13, 2024, 5:42 p.m. OK Python 3 TESTS 9 109 0
241492329 karatel_rai A Jan. 13, 2024, 5:34 p.m. OK Python 3 TESTS 9 109 0
241480410 zekomadred159 A Jan. 13, 2024, 4:23 p.m. OK Python 3 TESTS 9 109 0
241529646 bilguunt A Jan. 14, 2024, 5:30 a.m. OK Python 3 TESTS 9 109 102400
241519284 0x81 A Jan. 14, 2024, 2:05 a.m. OK Ruby 3 TESTS 9 514 921600
241519822 jyom A Jan. 14, 2024, 2:19 a.m. OK Rust 2021 TESTS 9 30 0
241491946 emanuele-em A Jan. 13, 2024, 5:32 p.m. OK Rust 2021 TESTS 9 31 0
241491312 dragonwarrior A Jan. 13, 2024, 5:28 p.m. OK Rust 2021 TESTS 9 46 0

remove filters

Back to search problems