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 |
1610
|
Codeforces Global Round 17 |
FINISHED |
False |
10800 |
94145099 |
Nov. 23, 2021, 2:35 p.m. |
Problems
B"Keshi is throwing a party and he wants everybody in the party to be happy. He has n friends. His i -th friend has i dollars. If you invite the i -th friend to the party, he will be happy only if at most a_i people in the party are strictly richer than him and at most b_i people are strictly poorer than him. Keshi wants to invite as many people as possible. Find the maximum number of people he can invite to the party so that every invited person would be happy. The first line contains a single integer t (1 <= t <= 10^4) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n (1 <= n <= 2 cdot 10^5) -- the number of Keshi's friends. The i -th of the following n lines contains two integers a_i and b_i (0 <= a_i, b_i < n) . It is guaranteed that the sum of n over all test cases doesn't exceed 2 cdot 10^5 . For each test case print the maximum number of people Keshi can invite. In the first test case, he invites the first and the second person. If he invites all of them, the third person won't be happy because there will be more than 1 person poorer than him. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
136694773 |
gxlois |
C |
Nov. 23, 2021, 11:52 p.m. |
OK |
D |
TESTS |
11 |
62 |
6041600 |
|
|
136670528 |
iica |
C |
Nov. 23, 2021, 4:44 p.m. |
OK |
D |
TESTS |
11 |
483 |
54681600 |
|
|
136704096 |
Lao_Nan_Ren |
C |
Nov. 24, 2021, 4:41 a.m. |
OK |
GNU C11 |
TESTS |
11 |
62 |
1638400 |
|
|
136690581 |
Mrgglock |
C |
Nov. 23, 2021, 8:48 p.m. |
OK |
GNU C11 |
TESTS |
11 |
62 |
1638400 |
|
|
136700997 |
zxc190930 |
C |
Nov. 24, 2021, 3:31 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
46 |
3481600 |
|
|
136698498 |
stoorz |
C |
Nov. 24, 2021, 2:24 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136696980 |
Ximenana |
C |
Nov. 24, 2021, 1:32 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136682873 |
Grzmot |
C |
Nov. 23, 2021, 6:19 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136675799 |
Freedom |
C |
Nov. 23, 2021, 5:15 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136673961 |
Joler_ |
C |
Nov. 23, 2021, 5:04 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136669808 |
SQ333 |
C |
Nov. 23, 2021, 4:41 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136702675 |
Bananana. |
C |
Nov. 24, 2021, 4:09 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136705661 |
shengtongtong |
C |
Nov. 24, 2021, 5:11 a.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
1638400 |
|
|
136670127 |
pty6666 |
C |
Nov. 23, 2021, 4:42 p.m. |
OK |
GNU C++14 |
TESTS |
11 |
78 |
2457600 |
|
|
136661696 |
lrb666 |
C |
Nov. 23, 2021, 4:05 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
62 |
1638400 |
|
|
136666591 |
BUCT-English2001-YZH |
C |
Nov. 23, 2021, 4:25 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
77 |
1638400 |
|
|
136704754 |
ke_123 |
C |
Nov. 24, 2021, 4:55 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136702784 |
zxydwxh |
C |
Nov. 24, 2021, 4:12 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136699412 |
xiaoyuefan |
C |
Nov. 24, 2021, 2:51 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136697460 |
Ayanoto |
C |
Nov. 24, 2021, 1:49 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136695660 |
Linger233 |
C |
Nov. 24, 2021, 12:35 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136691926 |
shyyhsac |
C |
Nov. 23, 2021, 9:34 p.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136703445 |
Apx |
C |
Nov. 24, 2021, 4:26 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136704387 |
reverie71 |
C |
Nov. 24, 2021, 4:47 a.m. |
OK |
GNU C++17 |
TESTS |
11 |
78 |
1638400 |
|
|
136691293 |
jt.cheng26_orz |
C |
Nov. 23, 2021, 9:11 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
31 |
3584000 |
|
|
136660858 |
0xC0DEF |
C |
Nov. 23, 2021, 4:02 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
46 |
20070400 |
|
|
136687236 |
Bit_Master_2205 |
C |
Nov. 23, 2021, 7:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
61 |
3174400 |
|
|
136703524 |
mukim |
C |
Nov. 24, 2021, 4:27 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136683050 |
fugelarma |
C |
Nov. 23, 2021, 6:22 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136681961 |
yog_111 |
C |
Nov. 23, 2021, 6:08 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136706524 |
DioHERO |
C |
Nov. 24, 2021, 5:26 a.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136691237 |
AhmedTumeh |
C |
Nov. 23, 2021, 9:09 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136687410 |
captainxop |
C |
Nov. 23, 2021, 7:36 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136691933 |
lightseba |
C |
Nov. 23, 2021, 9:35 p.m. |
OK |
GNU C++17 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136680752 |
fatemetmhr |
C |
Nov. 23, 2021, 5:54 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
46 |
3993600 |
|
|
136695720 |
Mx. |
C |
Nov. 24, 2021, 12:37 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136706075 |
FlowRays |
C |
Nov. 24, 2021, 5:19 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136704561 |
fenyman |
C |
Nov. 24, 2021, 4:51 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136699686 |
Menos |
C |
Nov. 24, 2021, 2:58 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136668868 |
Amdadul |
C |
Nov. 23, 2021, 4:36 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136668837 |
sorry_dujinyvluori |
C |
Nov. 23, 2021, 4:36 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
1638400 |
|
|
136668066 |
hat |
C |
Nov. 23, 2021, 4:32 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
2457600 |
|
|
136675343 |
thisisfakelong |
C |
Nov. 23, 2021, 5:12 p.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
61 |
7987200 |
|
|
136707152 |
comseung18_ |
C |
Nov. 24, 2021, 5:36 a.m. |
OK |
GNU C++20 (64) |
TESTS |
11 |
62 |
1638400 |
|
|
136707442 |
solo07 |
C |
Nov. 24, 2021, 5:41 a.m. |
OK |
Java 11 |
TESTS |
11 |
202 |
0 |
|
|
136686422 |
_Body |
C |
Nov. 23, 2021, 7:17 p.m. |
OK |
Java 11 |
TESTS |
11 |
202 |
0 |
|
|
136661523 |
spiraljava |
C |
Nov. 23, 2021, 4:04 p.m. |
OK |
Java 11 |
TESTS |
11 |
248 |
4096000 |
|
|
136699811 |
Online_Engineer |
C |
Nov. 24, 2021, 3:01 a.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
0 |
|
|
136685908 |
chinmayajha |
C |
Nov. 23, 2021, 7:07 p.m. |
OK |
Java 11 |
TESTS |
11 |
249 |
0 |
|
|
136691980 |
mareshkau |
C |
Nov. 23, 2021, 9:37 p.m. |
OK |
Java 11 |
TESTS |
11 |
264 |
0 |
|
|
136683264 |
RadheKrishna1815 |
C |
Nov. 23, 2021, 6:24 p.m. |
OK |
Java 11 |
TESTS |
11 |
264 |
0 |
|
|
136690390 |
singhshivsm20001 |
C |
Nov. 23, 2021, 8:42 p.m. |
OK |
Java 11 |
TESTS |
11 |
265 |
0 |
|
|
136700773 |
sumitchavan |
C |
Nov. 24, 2021, 3:25 a.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
0 |
|
|
136669856 |
wphsucf |
C |
Nov. 23, 2021, 4:41 p.m. |
OK |
Java 11 |
TESTS |
11 |
280 |
0 |
|
|
136681484 |
anshulchou_123 |
C |
Nov. 23, 2021, 6:01 p.m. |
OK |
Java 8 |
TESTS |
11 |
155 |
14848000 |
|
|
136666371 |
Adi_7861 |
C |
Nov. 23, 2021, 4:24 p.m. |
OK |
Java 8 |
TESTS |
11 |
170 |
0 |
|
|
136684100 |
DarLam |
C |
Nov. 23, 2021, 6:37 p.m. |
OK |
Java 8 |
TESTS |
11 |
171 |
0 |
|
|
136670536 |
ZiadASadek |
C |
Nov. 23, 2021, 4:45 p.m. |
OK |
Java 8 |
TESTS |
11 |
171 |
0 |
|
|
136668193 |
invincible777 |
C |
Nov. 23, 2021, 4:33 p.m. |
OK |
Java 8 |
TESTS |
11 |
171 |
0 |
|
|
136667095 |
InANutshell |
C |
Nov. 23, 2021, 4:27 p.m. |
OK |
Java 8 |
TESTS |
11 |
186 |
0 |
|
|
136686420 |
nitinrishab2000 |
C |
Nov. 23, 2021, 7:17 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
0 |
|
|
136673486 |
pribic |
C |
Nov. 23, 2021, 5:01 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
0 |
|
|
136673024 |
pranayrana14 |
C |
Nov. 23, 2021, 4:58 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
0 |
|
|
136663013 |
naitikvarshney |
C |
Nov. 23, 2021, 4:10 p.m. |
OK |
Java 8 |
TESTS |
11 |
202 |
0 |
|
|
136678044 |
Claude1 |
C |
Nov. 23, 2021, 5:28 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
280 |
1638400 |
|
|
136663544 |
charleswang2001 |
C |
Nov. 23, 2021, 4:12 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
296 |
3174400 |
|
|
136669264 |
Damirca |
C |
Nov. 23, 2021, 4:38 p.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
312 |
1638400 |
|
|
136705063 |
serglag |
C |
Nov. 24, 2021, 5 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
327 |
1638400 |
|
|
136695895 |
fatant |
C |
Nov. 24, 2021, 12:45 a.m. |
OK |
MS C++ 2017 |
TESTS |
11 |
343 |
3174400 |
|
|
136680370 |
OLOGY |
C |
Nov. 23, 2021, 5:51 p.m. |
OK |
PyPy 2 |
TESTS |
11 |
358 |
19353600 |
|
|
136662495 |
vinay272001 |
C |
Nov. 23, 2021, 4:08 p.m. |
OK |
PyPy 2 |
TESTS |
11 |
670 |
13619200 |
|
|
136680474 |
hxu10 |
C |
Nov. 23, 2021, 5:52 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
202 |
9318400 |
|
|
136702692 |
sw_enthusiast |
C |
Nov. 24, 2021, 4:09 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
280 |
82022400 |
|
|
136667587 |
NecroSean38 |
C |
Nov. 23, 2021, 4:30 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
296 |
11161600 |
|
|
136700452 |
vdh_123 |
C |
Nov. 24, 2021, 3:18 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
296 |
18841600 |
|
|
136702541 |
zayn. |
C |
Nov. 24, 2021, 4:05 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
311 |
15872000 |
|
|
136665693 |
silentone |
C |
Nov. 23, 2021, 4:21 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
18841600 |
|
|
136678146 |
sahilrox |
C |
Nov. 23, 2021, 5:29 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
19660800 |
|
|
136706620 |
KeiTsukishima |
C |
Nov. 24, 2021, 5:28 a.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
21606400 |
|
|
136664458 |
AbnerShen |
C |
Nov. 23, 2021, 4:15 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
358 |
21811200 |
|
|
136691155 |
whatshisbucket |
C |
Nov. 23, 2021, 9:07 p.m. |
OK |
PyPy 3 |
TESTS |
11 |
405 |
10547200 |
|
|
136693163 |
oadey89 |
C |
Nov. 23, 2021, 10:26 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
233 |
20889600 |
|
|
136693922 |
mnkp |
C |
Nov. 23, 2021, 11:05 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
280 |
28876800 |
|
|
136688698 |
cmplx-xyttmt |
C |
Nov. 23, 2021, 8:02 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
342 |
14540800 |
|
|
136683363 |
newbie_for_ever |
C |
Nov. 23, 2021, 6:26 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
373 |
13926400 |
|
|
136699278 |
lucifer1004 |
C |
Nov. 24, 2021, 2:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
389 |
13619200 |
|
|
136684513 |
FlakeLCR |
C |
Nov. 23, 2021, 6:42 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
390 |
15769600 |
|
|
136683136 |
newbie_for_ever |
C |
Nov. 23, 2021, 6:23 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
420 |
13721600 |
|
|
136674868 |
punica |
C |
Nov. 23, 2021, 5:09 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
452 |
41369600 |
|
|
136687262 |
eepsilon |
C |
Nov. 23, 2021, 7:33 p.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
483 |
28672000 |
|
|
136707839 |
amanpro_grammer |
C |
Nov. 24, 2021, 5:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
11 |
499 |
35635200 |
|
|
136680580 |
OLOGY |
C |
Nov. 23, 2021, 5:53 p.m. |
OK |
Python 2 |
TESTS |
11 |
811 |
27136000 |
|
|
136692806 |
kumalimak |
C |
Nov. 23, 2021, 10:10 p.m. |
OK |
Rust |
TESTS |
11 |
31 |
4198400 |
|
|
136673718 |
kumalimak |
C |
Nov. 23, 2021, 5:02 p.m. |
OK |
Rust |
TESTS |
11 |
62 |
4198400 |
|
|
remove filters
Back to search problems