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 |
---|---|---|---|---|---|---|
1915 | Codeforces Round 918 (Div. 4) | FINISHED | False | 9000 | 33405863 | Dec. 28, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 14841 ) | F | Greetings | PROGRAMMING | data structures divide and conquer sortings |
B'There are n people on the number line; the i -th person is at point a_i and wants to go to point b_i . For each person, a_i < b_i , and the starting and ending points of all people are distinct. (That is, all of the 2n numbers a_1, a_2, ... , a_n, b_1, b_2, ... , b_n are distinct.) All the people will start moving simultaneously at a speed of 1 unit per second until they reach their final point b_i . When two people meet at the same point, they will greet each other once. How many greetings will there be? Note that a person can still greet other people even if they have reached their final point. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of people. Then n lines follow, the i -th of which contains two integers a_i and b_i ( -10^9 <= q a_i < b_i <= q 10^9 ) -- the starting and ending positions of each person. For each test case, all of the 2n numbers a_1, a_2, ... , a_n, b_1, b_2, ... , b_n are distinct. The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer denoting the number of greetings that will happen. In the first test case, the two people will meet at point 3 and greet each other. '... |
123952 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
239425683 | 0x81 | F | Dec. 28, 2023, 10:16 p.m. | OK | GNU C11 | TESTS | 24 | 93 | 5529600 | ||
239422088 | 0x81 | F | Dec. 28, 2023, 9:02 p.m. | OK | GNU C11 | TESTS | 10 | 108 | 7987200 | ||
239442698 | cgy2022 | F | Dec. 29, 2023, 4:40 a.m. | OK | GNU C++14 | TESTS | 33 | 156 | 5836800 | ||
239438346 | Anderw_ | F | Dec. 29, 2023, 3:40 a.m. | OK | GNU C++14 | TESTS | 33 | 171 | 4300800 | ||
239428640 | Briaares | F | Dec. 28, 2023, 11:40 p.m. | OK | GNU C++14 | TESTS | 24 | 171 | 10649600 | ||
239444999 | Bai_xiaobo | F | Dec. 29, 2023, 5:08 a.m. | OK | GNU C++14 | TESTS | 33 | 171 | 13824000 | ||
239449630 | Kyte | F | Dec. 29, 2023, 5:59 a.m. | OK | GNU C++14 | TESTS | 33 | 186 | 4300800 | ||
239408583 | manishkumar123 | F | Dec. 28, 2023, 6:14 p.m. | OK | GNU C++14 | TESTS | 10 | 186 | 11673600 | ||
239438154 | Reimp | F | Dec. 29, 2023, 3:37 a.m. | OK | GNU C++14 | TESTS | 33 | 186 | 24473600 | ||
239439268 | 111111qqqqqq | F | Dec. 29, 2023, 3:54 a.m. | OK | GNU C++14 | TESTS | 33 | 187 | 5120000 | ||
239428019 | Linneal | F | Dec. 28, 2023, 11:20 p.m. | OK | GNU C++14 | TESTS | 24 | 187 | 7475200 | ||
239445306 | Rombing | F | Dec. 29, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 33 | 202 | 7475200 | ||
239411023 | m_bezrutchka | F | Dec. 28, 2023, 6:36 p.m. | OK | GNU C++17 | TESTS | 10 | 155 | 7475200 | ||
239411427 | temporary1 | F | Dec. 28, 2023, 6:39 p.m. | OK | GNU C++17 | TESTS | 10 | 156 | 5017600 | ||
239433331 | BobyQi | F | Dec. 29, 2023, 1:58 a.m. | OK | GNU C++17 | TESTS | 33 | 171 | 4300800 | ||
239423373 | littlemartha | F | Dec. 28, 2023, 9:28 p.m. | OK | GNU C++17 | TESTS | 24 | 171 | 5120000 | ||
239417558 | Shadow_00 | F | Dec. 28, 2023, 7:52 p.m. | OK | GNU C++17 | TESTS | 10 | 187 | 4300800 | ||
239427263 | SIMON826 | F | Dec. 28, 2023, 10:59 p.m. | OK | GNU C++17 | TESTS | 24 | 187 | 4608000 | ||
239433227 | KleiberXD | F | Dec. 29, 2023, 1:56 a.m. | OK | GNU C++17 | TESTS | 33 | 187 | 4915200 | ||
239403330 | anfanite396 | F | Dec. 28, 2023, 5:34 p.m. | OK | GNU C++17 | TESTS | 10 | 187 | 7475200 | ||
239415733 | Yuan_Li | F | Dec. 28, 2023, 7:29 p.m. | OK | GNU C++17 | TESTS | 10 | 202 | 7475200 | ||
239434543 | lsh_algorithm | F | Dec. 29, 2023, 2:29 a.m. | OK | GNU C++17 | TESTS | 33 | 202 | 7475200 | ||
239403718 | Br1zeEnder | F | Dec. 28, 2023, 5:37 p.m. | OK | GNU C++17 (64) | TESTS | 10 | 93 | 23142400 | ||
239429988 | jackylova | F | Dec. 29, 2023, 12:24 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 109 | 12492800 | ||
239440691 | Traceless | F | Dec. 29, 2023, 4:13 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 109 | 49356800 | ||
239434362 | Sempr_ | F | Dec. 29, 2023, 2:25 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 124 | 3788800 | ||
239447340 | Dog_E | F | Dec. 29, 2023, 5:35 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 124 | 5222400 | ||
239434440 | Dr.killer | F | Dec. 29, 2023, 2:26 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 124 | 6860800 | ||
239433215 | qiao_bo_shi | F | Dec. 29, 2023, 1:56 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 124 | 7680000 | ||
239446980 | ethening | F | Dec. 29, 2023, 5:31 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 124 | 10547200 | ||
239432348 | songke123 | F | Dec. 29, 2023, 1:34 a.m. | OK | GNU C++17 (64) | TESTS | 29 | 124 | 43724800 | ||
239440145 | wqb | F | Dec. 29, 2023, 4:06 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 139 | 13312000 | ||
239436430 | Repeater111 | F | Dec. 29, 2023, 3:06 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 93 | 4505600 | ||
239449014 | str3ss | F | Dec. 29, 2023, 5:53 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 93 | 4505600 | ||
239420731 | gabriel88766 | F | Dec. 28, 2023, 8:39 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 93 | 4505600 | ||
239407740 | l3eibit | F | Dec. 28, 2023, 6:08 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 93 | 4505600 | ||
239414147 | NEUQorW | F | Dec. 28, 2023, 7:09 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 93 | 6041600 | ||
239421536 | akirakira | F | Dec. 28, 2023, 8:52 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 93 | 6348800 | ||
239410615 | _wh | F | Dec. 28, 2023, 6:32 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 93 | 33382400 | ||
239446048 | n1cknamezz | F | Dec. 29, 2023, 5:20 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 108 | 4505600 | ||
239432807 | DewanshK | F | Dec. 29, 2023, 1:45 a.m. | OK | GNU C++20 (64) | TESTS | 33 | 108 | 6348800 | ||
239409016 | Prakul_Agrawal | F | Dec. 28, 2023, 6:18 p.m. | OK | GNU C++20 (64) | TESTS | 10 | 108 | 6451200 | ||
239448787 | goodluck-ccq | F | Dec. 29, 2023, 5:51 a.m. | OK | Go | TESTS | 33 | 483 | 65740800 | ||
239404212 | brandonmejia | F | Dec. 28, 2023, 5:41 p.m. | OK | Java 11 | TESTS | 10 | 858 | 41062400 | ||
239436128 | chuquwan9964 | F | Dec. 29, 2023, 3:01 a.m. | OK | Java 11 | TESTS | 33 | 1778 | 250880000 | ||
239415457 | shaili17 | F | Dec. 28, 2023, 7:26 p.m. | OK | Java 11 | TESTS | 10 | 1887 | 32665600 | ||
239415517 | shaili17 | F | Dec. 28, 2023, 7:26 p.m. | OK | Java 11 | TESTS | 10 | 3509 | 32665600 | ||
239445148 | not_just_rr | F | Dec. 29, 2023, 5:10 a.m. | OK | Java 17 | TESTS | 33 | 655 | 60006400 | ||
239438544 | Liiii | F | Dec. 29, 2023, 3:43 a.m. | OK | Java 17 | TESTS | 33 | 858 | 76390400 | ||
239448370 | arpita010 | F | Dec. 29, 2023, 5:47 a.m. | OK | Java 17 | TESTS | 33 | 2557 | 54886400 | ||
239444926 | jai_hanumant | F | Dec. 29, 2023, 5:07 a.m. | OK | Java 17 | TESTS | 33 | 3431 | 65536000 | ||
239407810 | coderr112 | F | Dec. 28, 2023, 6:08 p.m. | OK | Java 21 | TESTS | 10 | 514 | 45363200 | ||
239426881 | MrSharpedge | F | Dec. 28, 2023, 10:47 p.m. | OK | Java 21 | TESTS | 24 | 732 | 62361600 | ||
239418727 | sarthakmanna | F | Dec. 28, 2023, 8:08 p.m. | OK | Java 21 | TESTS | 10 | 1060 | 76185600 | ||
239416347 | kundankumardec16 | F | Dec. 28, 2023, 7:36 p.m. | OK | Java 21 | TESTS | 10 | 1684 | 48435200 | ||
239438016 | CV23 | F | Dec. 29, 2023, 3:35 a.m. | OK | Java 21 | TESTS | 33 | 2527 | 56115200 | ||
239409069 | vinay_panwar | F | Dec. 28, 2023, 6:18 p.m. | OK | Java 8 | TESTS | 10 | 405 | 36044800 | ||
239447362 | coderman2004 | F | Dec. 29, 2023, 5:36 a.m. | OK | Java 8 | TESTS | 33 | 779 | 47616000 | ||
239424238 | NerfThis | F | Dec. 28, 2023, 9:45 p.m. | OK | Java 8 | TESTS | 24 | 1013 | 80179200 | ||
239448320 | 1091857051 | F | Dec. 29, 2023, 5:46 a.m. | OK | Java 8 | TESTS | 33 | 1076 | 64307200 | ||
239410794 | yadavDipesh | F | Dec. 28, 2023, 6:34 p.m. | OK | Java 8 | TESTS | 10 | 4897 | 50073600 | ||
239408105 | PixelCat | F | Dec. 28, 2023, 6:10 p.m. | OK | Kotlin 1.9 | TESTS | 10 | 2464 | 240844800 | ||
239434947 | HiddenMoon | F | Dec. 29, 2023, 2:39 a.m. | OK | MS C++ 2017 | TESTS | 33 | 421 | 3584000 | ||
239429964 | D2009 | F | Dec. 29, 2023, 12:23 a.m. | OK | MS C++ 2017 | TESTS | 29 | 4554 | 5939200 | ||
239415802 | Keval_78 | F | Dec. 28, 2023, 7:30 p.m. | OK | PyPy 3 | TESTS | 10 | 1201 | 46284800 | ||
239431864 | hxu10 | F | Dec. 29, 2023, 1:20 a.m. | OK | PyPy 3-64 | TESTS | 29 | 685 | 90009600 | ||
239414328 | ashmit-453 | F | Dec. 28, 2023, 7:11 p.m. | OK | PyPy 3-64 | TESTS | 10 | 842 | 67891200 | ||
239403005 | jatloe | F | Dec. 28, 2023, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 10 | 873 | 59699200 | ||
239408313 | theRealChainman | F | Dec. 28, 2023, 6:12 p.m. | OK | PyPy 3-64 | TESTS | 10 | 935 | 73728000 | ||
239417742 | gardengnome | F | Dec. 28, 2023, 7:55 p.m. | OK | PyPy 3-64 | TESTS | 10 | 935 | 73830400 | ||
239412385 | andrei_rc | F | Dec. 28, 2023, 6:49 p.m. | OK | PyPy 3-64 | TESTS | 10 | 998 | 65638400 | ||
239435848 | kelzzin2_fan | F | Dec. 29, 2023, 2:55 a.m. | OK | PyPy 3-64 | TESTS | 33 | 1013 | 74956800 | ||
239410612 | gardengnome | F | Dec. 28, 2023, 6:32 p.m. | OK | PyPy 3-64 | TESTS | 10 | 1028 | 75161600 | ||
239409165 | andrei_rc | F | Dec. 28, 2023, 6:19 p.m. | OK | PyPy 3-64 | TESTS | 10 | 1044 | 62361600 | ||
239409921 | Alex239 | F | Dec. 28, 2023, 6:26 p.m. | OK | PyPy 3-64 | TESTS | 10 | 1060 | 66969600 | ||
239430815 | jtsuited | F | Dec. 29, 2023, 12:50 a.m. | OK | Python 3 | TESTS | 29 | 1247 | 38297600 | ||
239431306 | torresos | F | Dec. 29, 2023, 1:04 a.m. | OK | Python 3 | TESTS | 29 | 1388 | 36249600 | ||
239415628 | v1ncent2 | F | Dec. 28, 2023, 7:28 p.m. | OK | Python 3 | TESTS | 10 | 1918 | 41369600 | ||
239415561 | vincent2 | F | Dec. 28, 2023, 7:27 p.m. | OK | Python 3 | TESTS | 10 | 1918 | 41369600 | ||
239419743 | mohamedhosnimissaoui | F | Dec. 28, 2023, 8:23 p.m. | OK | Python 3 | TESTS | 10 | 2745 | 92979200 | ||
239405321 | _a253 | F | Dec. 28, 2023, 5:49 p.m. | OK | Rust 2021 | TESTS | 10 | 186 | 7577600 | ||
239435943 | liut | F | Dec. 29, 2023, 2:57 a.m. | OK | Rust 2021 | TESTS | 33 | 218 | 32460800 |
Back to search problems