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 |
---|---|---|---|---|---|---|
1788 | Codeforces Round 851 (Div. 2) | FINISHED | False | 7200 | 61313063 | Feb. 9, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 17699 ) | C | Matching Numbers | PROGRAMMING | constructive algorithms greedy math |
B'You are given an integer n . Pair the integers 1 to 2n (i.e. each integer should be in exactly one pair) so that each sum of matched pairs is consecutive and distinct. Formally, let (a_i, b_i) be the pairs that you matched. {a_1, b_1, a_2, b_2, ldots, a_n, b_n } should be a permutation of {1, 2, ldots, 2n } . Let the sorted list of {a_1+b_1, a_2+b_2, ldots, a_n+b_n } be s_1 < s_2 < ldots < s_n . We must have s_{i+1}-s_i = 1 for 1 <= i <= n - 1 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 500 ). The description of the test cases follows. For each test case, a single integer n ( 1 <= q n <= q 10^5 ) is given. It is guaranteed that the sum of n over all test cases doesn 't exceed 10^5 . For each test case, if it is impossible to make such a pairing, print "No". Otherwise, print "Yes" followed by n lines. At each line, print two integers that are paired. You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses. If there are multiple solutions, print any. For the third test case, each integer from 1 to 6 appears once. The sums of matched pairs are 4+2=6 , 1+6=7 , and 3+5=8 , which are consecutive and distinct. '... |
Codeforces Round #851 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
192997844 | PavolKoman | C | Feb. 9, 2023, 11:04 p.m. | OK | C# 10 | TESTS | 40 | 311 | 3276800 | ||
192997541 | PavolKoman | C | Feb. 9, 2023, 10:58 p.m. | OK | C# 10 | TESTS | 40 | 327 | 6041600 | ||
193002998 | Awesome3.14 | C | Feb. 10, 2023, 1:25 a.m. | OK | D | TESTS | 40 | 46 | 204800 | ||
192974632 | NenadDapic | C | Feb. 9, 2023, 6:12 p.m. | OK | FPC | TESTS | 40 | 311 | 0 | ||
192981642 | edwardnvv57k | C | Feb. 9, 2023, 7:12 p.m. | OK | GNU C11 | TESTS | 40 | 46 | 0 | ||
192973325 | keremdogan1 | C | Feb. 9, 2023, 6:03 p.m. | OK | GNU C11 | TESTS | 40 | 451 | 0 | ||
192971280 | sanjay77 | C | Feb. 9, 2023, 5:49 p.m. | OK | GNU C11 | TESTS | 40 | 452 | 0 | ||
192960860 | yash_barge | C | Feb. 9, 2023, 4:33 p.m. | OK | GNU C11 | TESTS | 40 | 499 | 409600 | ||
193012933 | ShiinaMahiru1 | C | Feb. 10, 2023, 4:27 a.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
193004251 | zixiangcode | C | Feb. 10, 2023, 1:58 a.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192984151 | seekdeep | C | Feb. 9, 2023, 7:37 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192970193 | vinayak_691 | C | Feb. 9, 2023, 5:41 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192965237 | nhho | C | Feb. 9, 2023, 5:17 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192960875 | Laserlight | C | Feb. 9, 2023, 4:33 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192959715 | yefriCruz | C | Feb. 9, 2023, 4:31 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
193014299 | LXH-cat | C | Feb. 10, 2023, 4:46 a.m. | OK | GNU C++14 | TESTS | 40 | 31 | 0 | ||
192958504 | cgz2006 | C | Feb. 9, 2023, 4:28 p.m. | OK | GNU C++14 | TESTS | 40 | 31 | 204800 | ||
193002414 | niyueshu | C | Feb. 10, 2023, 1:09 a.m. | OK | GNU C++14 | TESTS | 40 | 31 | 409600 | ||
193012147 | nmnsharma007 | C | Feb. 10, 2023, 4:15 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193011269 | mingJXM | C | Feb. 10, 2023, 4:02 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193009793 | zhi_fan | C | Feb. 10, 2023, 3:39 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193008252 | Sheber | C | Feb. 10, 2023, 3:14 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193005566 | salma_173 | C | Feb. 10, 2023, 2:26 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193003696 | Plabs | C | Feb. 10, 2023, 1:45 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193015738 | DoubleAS | C | Feb. 10, 2023, 5:05 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193015513 | Asterisk007 | C | Feb. 10, 2023, 5:02 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193015595 | nforget | C | Feb. 10, 2023, 5:03 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193012937 | sh1sh1maru | C | Feb. 10, 2023, 4:27 a.m. | OK | GNU C++17 | TESTS | 40 | 31 | 0 | ||
193003656 | ChroneZU | C | Feb. 10, 2023, 1:43 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193014376 | Ruturaj007 | C | Feb. 10, 2023, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193012494 | scotchtape13 | C | Feb. 10, 2023, 4:21 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193008768 | A5IR | C | Feb. 10, 2023, 3:22 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193006049 | xioachou | C | Feb. 10, 2023, 2:35 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193005732 | Buqiujun | C | Feb. 10, 2023, 2:29 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193003136 | wanghai673 | C | Feb. 10, 2023, 1:29 a.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
192991693 | ibrahim001 | C | Feb. 9, 2023, 9:10 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
192990942 | MarkIII | C | Feb. 9, 2023, 8:59 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
192988245 | KevinyWu | C | Feb. 9, 2023, 8:23 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 31 | 0 | ||
193006856 | New_DaVinci | C | Feb. 10, 2023, 2:49 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
193019728 | Yanz | C | Feb. 10, 2023, 5:50 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 0 | ||
192965235 | lifeadventurer | C | Feb. 9, 2023, 5:17 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 1126400 | ||
192965788 | flash0402 | C | Feb. 9, 2023, 5:19 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 15 | 1638400 | ||
193008839 | Ahmed_Salah7 | C | Feb. 10, 2023, 3:23 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
193020377 | Payxtl | C | Feb. 10, 2023, 5:58 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
193008395 | Drunkula | C | Feb. 10, 2023, 3:16 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
193015091 | Aestivate | C | Feb. 10, 2023, 4:56 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
193012102 | tiger_34 | C | Feb. 10, 2023, 4:15 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
193011519 | eson1p | C | Feb. 10, 2023, 4:06 a.m. | OK | GNU C++20 (64) | TESTS | 40 | 30 | 0 | ||
192992315 | Leenelmir | C | Feb. 9, 2023, 9:20 p.m. | OK | Java 11 | TESTS | 40 | 202 | 0 | ||
193004169 | wat2 | C | Feb. 10, 2023, 1:56 a.m. | OK | Java 11 | TESTS | 40 | 217 | 0 | ||
192970988 | dinosparton_013 | C | Feb. 9, 2023, 5:47 p.m. | OK | Java 11 | TESTS | 40 | 218 | 0 | ||
193019864 | meteoLdrago | C | Feb. 10, 2023, 5:52 a.m. | OK | Java 11 | TESTS | 40 | 233 | 0 | ||
192986965 | Vegeks | C | Feb. 9, 2023, 8:07 p.m. | OK | Java 11 | TESTS | 40 | 233 | 0 | ||
192968286 | WORTH | C | Feb. 9, 2023, 5:30 p.m. | OK | Java 11 | TESTS | 40 | 233 | 0 | ||
192980915 | Jagnath_Reddy | C | Feb. 9, 2023, 7:06 p.m. | OK | Java 11 | TESTS | 40 | 233 | 512000 | ||
193016908 | Reacher01 | C | Feb. 10, 2023, 5:18 a.m. | OK | Java 11 | TESTS | 40 | 233 | 40755200 | ||
192959378 | princeayush04 | C | Feb. 9, 2023, 4:30 p.m. | OK | Java 11 | TESTS | 40 | 249 | 0 | ||
192960091 | raktcharita2000 | C | Feb. 9, 2023, 4:31 p.m. | OK | Java 11 | TESTS | 40 | 265 | 0 | ||
192971741 | Danger_Don | C | Feb. 9, 2023, 5:52 p.m. | OK | Java 17 | TESTS | 40 | 218 | 819200 | ||
193004847 | kkz666 | C | Feb. 10, 2023, 2:11 a.m. | OK | Java 17 | TESTS | 40 | 233 | 614400 | ||
192961794 | MrOtter | C | Feb. 9, 2023, 4:34 p.m. | OK | Java 17 | TESTS | 40 | 234 | 1024000 | ||
193017392 | anubh4v | C | Feb. 10, 2023, 5:24 a.m. | OK | Java 17 | TESTS | 40 | 249 | 614400 | ||
192979608 | maurya.rahul682 | C | Feb. 9, 2023, 6:54 p.m. | OK | Java 17 | TESTS | 40 | 264 | 921600 | ||
193006963 | sarvesh_bawari | C | Feb. 10, 2023, 2:51 a.m. | OK | Java 17 | TESTS | 40 | 265 | 921600 | ||
192967977 | ManasR_2003 | C | Feb. 9, 2023, 5:28 p.m. | OK | Java 17 | TESTS | 40 | 280 | 921600 | ||
192981032 | AdityaGupta19 | C | Feb. 9, 2023, 7:07 p.m. | OK | Java 17 | TESTS | 40 | 311 | 18841600 | ||
192994835 | arpurush | C | Feb. 9, 2023, 10:02 p.m. | OK | Java 17 | TESTS | 40 | 483 | 1024000 | ||
192966076 | PrudhviRao15 | C | Feb. 9, 2023, 5:20 p.m. | OK | Java 17 | TESTS | 40 | 499 | 819200 | ||
192999760 | IanISam | C | Feb. 9, 2023, 11:58 p.m. | OK | Java 8 | TESTS | 40 | 109 | 0 | ||
193015553 | harry_122 | C | Feb. 10, 2023, 5:02 a.m. | OK | Java 8 | TESTS | 40 | 124 | 0 | ||
192999979 | IanISam | C | Feb. 10, 2023, 12:03 a.m. | OK | Java 8 | TESTS | 40 | 124 | 0 | ||
192959473 | ankit_0207 | C | Feb. 9, 2023, 4:30 p.m. | OK | Java 8 | TESTS | 40 | 124 | 0 | ||
192998056 | raj_shahh | C | Feb. 9, 2023, 11:10 p.m. | OK | Java 8 | TESTS | 40 | 139 | 0 | ||
192995379 | lpychemistry | C | Feb. 9, 2023, 10:12 p.m. | OK | Java 8 | TESTS | 40 | 139 | 0 | ||
193017045 | reputation_tv | C | Feb. 10, 2023, 5:20 a.m. | OK | Java 8 | TESTS | 40 | 140 | 0 | ||
192965157 | Blue_BEE | C | Feb. 9, 2023, 5:17 p.m. | OK | Java 8 | TESTS | 40 | 140 | 0 | ||
192960564 | mohamedhassan_c | C | Feb. 9, 2023, 4:32 p.m. | OK | Java 8 | TESTS | 40 | 140 | 0 | ||
192972143 | Koka | C | Feb. 9, 2023, 5:54 p.m. | OK | Java 8 | TESTS | 40 | 155 | 0 | ||
192961526 | reosfire | C | Feb. 9, 2023, 4:34 p.m. | OK | Kotlin 1.7 | TESTS | 40 | 779 | 11264000 | ||
192958974 | AnoK3 | C | Feb. 9, 2023, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 40 | 46 | 0 | ||
193010746 | tdawawd | C | Feb. 10, 2023, 3:54 a.m. | OK | MS C++ 2017 | TESTS | 40 | 61 | 102400 | ||
192959695 | 153floppa | C | Feb. 9, 2023, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 40 | 124 | 1024000 | ||
192962266 | balbeSitp | C | Feb. 9, 2023, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 40 | 140 | 2048000 | ||
193004455 | ishybee | C | Feb. 10, 2023, 2:03 a.m. | OK | MS C++ 2017 | TESTS | 40 | 436 | 0 | ||
192959791 | jurash | C | Feb. 9, 2023, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 40 | 451 | 0 | ||
193018664 | adesh123 | C | Feb. 10, 2023, 5:39 a.m. | OK | MS C++ 2017 | TESTS | 40 | 451 | 5120000 | ||
192968129 | lollollollll | C | Feb. 9, 2023, 5:29 p.m. | OK | Node.js | TESTS | 40 | 654 | 6553600 | ||
192967265 | franklidev | C | Feb. 9, 2023, 5:25 p.m. | OK | Node.js | TESTS | 40 | 670 | 6656000 | ||
192971568 | rsFalse | C | Feb. 9, 2023, 5:51 p.m. | OK | Perl | TESTS | 40 | 171 | 18534400 | ||
192966022 | shobonvip | C | Feb. 9, 2023, 5:19 p.m. | OK | PyPy 3 | TESTS | 40 | 139 | 6656000 | ||
192960775 | AadiS | C | Feb. 9, 2023, 4:32 p.m. | OK | PyPy 3 | TESTS | 40 | 202 | 7577600 | ||
192968867 | mihajlovskijr | C | Feb. 9, 2023, 5:33 p.m. | OK | PyPy 3 | TESTS | 40 | 296 | 9728000 | ||
192988406 | heat_007 | C | Feb. 9, 2023, 8:25 p.m. | OK | PyPy 3 | TESTS | 40 | 326 | 13209600 | ||
192969505 | Mohamed_Hamed | C | Feb. 9, 2023, 5:37 p.m. | OK | PyPy 3 | TESTS | 40 | 373 | 14233600 | ||
192991991 | ahmadelhajj | C | Feb. 9, 2023, 9:15 p.m. | OK | PyPy 3-64 | TESTS | 40 | 78 | 14745600 | ||
192977275 | SoleProprietor | C | Feb. 9, 2023, 6:33 p.m. | OK | PyPy 3-64 | TESTS | 40 | 93 | 14028800 | ||
193001174 | plevande | C | Feb. 10, 2023, 12:36 a.m. | OK | PyPy 3-64 | TESTS | 40 | 108 | 4403200 | ||
192976763 | SoleProprietor | C | Feb. 9, 2023, 6:28 p.m. | OK | PyPy 3-64 | TESTS | 40 | 108 | 16691200 | ||
193011207 | theRealChainman | C | Feb. 10, 2023, 4:01 a.m. | OK | PyPy 3-64 | TESTS | 40 | 109 | 12083200 | ||
193002024 | ItsDev | C | Feb. 10, 2023, 1:01 a.m. | OK | PyPy 3-64 | TESTS | 40 | 124 | 7782400 | ||
192977890 | NP_Prob | C | Feb. 9, 2023, 6:38 p.m. | OK | PyPy 3-64 | TESTS | 40 | 124 | 8294400 | ||
193002656 | Rockey | C | Feb. 10, 2023, 1:16 a.m. | OK | PyPy 3-64 | TESTS | 40 | 124 | 10547200 | ||
192996801 | EpicChadGamer | C | Feb. 9, 2023, 10:40 p.m. | OK | PyPy 3-64 | TESTS | 40 | 124 | 11366400 | ||
192968547 | rmr | C | Feb. 9, 2023, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 40 | 124 | 13414400 | ||
192993604 | adityamishra4727 | C | Feb. 9, 2023, 9:41 p.m. | OK | Python 3 | TESTS | 40 | 311 | 0 | ||
192981665 | Ysb04 | C | Feb. 9, 2023, 7:12 p.m. | OK | Python 3 | TESTS | 40 | 311 | 0 | ||
193015830 | RayZhang | C | Feb. 10, 2023, 5:06 a.m. | OK | Python 3 | TESTS | 40 | 327 | 0 | ||
193012222 | vedantmishra69 | C | Feb. 10, 2023, 4:17 a.m. | OK | Python 3 | TESTS | 40 | 327 | 0 | ||
192973689 | DonC | C | Feb. 9, 2023, 6:05 p.m. | OK | Python 3 | TESTS | 40 | 327 | 0 | ||
192966577 | jiaz | C | Feb. 9, 2023, 5:22 p.m. | OK | Python 3 | TESTS | 40 | 327 | 0 | ||
192972862 | Sakurama | C | Feb. 9, 2023, 5:59 p.m. | OK | Python 3 | TESTS | 40 | 342 | 4198400 | ||
193018295 | tariq05 | C | Feb. 10, 2023, 5:35 a.m. | OK | Python 3 | TESTS | 40 | 343 | 0 | ||
192973073 | sahil45 | C | Feb. 9, 2023, 6:01 p.m. | OK | Python 3 | TESTS | 40 | 358 | 4710400 | ||
192958782 | Nitin_Saini | C | Feb. 9, 2023, 4:29 p.m. | OK | Python 3 | TESTS | 40 | 358 | 5222400 | ||
192960906 | mfeds | C | Feb. 9, 2023, 4:33 p.m. | OK | Rust 2021 | TESTS | 40 | 779 | 0 | ||
192962257 | teak | C | Feb. 9, 2023, 4:34 p.m. | OK | Rust 2021 | TESTS | 40 | 810 | 0 |
Back to search problems