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.
Problems
B'After the success of the basketball teams formed and trained by Pak Chanek last year (Basketball Together), Pak Chanek wants to measure the performance of each player that is considered as a superstar. There are N superstar players that have been trained by Pak Chanek. At the end of the season, some calculations will be made on the performance of the N players using an international method. Each player has two values A_i and B_i where each represents the offensive and defensive value of that player. Define text{RankA}(i) as the offensive ranking of the i -th player, whose value is c+1 with c here representing the number of j ( 1 <= q j <= q N ) such that A_j>A_i . Define text{RankB}(i) as the defensive ranking of the i -th player, whose value is c+1 with c here representing the number of j ( 1 <= q j <= q N ) such that B_j>B_i . Define text{RankOverall}(i) as the overall ranking of the i -th player, whose value is c+1 with c here representing the number of j ( 1 <= q j <= q N ) such that text{RankA}(j)+ text{RankB}(j)< text{RankA}(i)+ text{RankB}(i) . During the next Q days, exactly one event will happen on each day. Each event is one of the three following possibilities: The first line contains a single integer N ( 1 <= q N <= q10^5 ) -- the number of superstar players. The second line contains N integers A_1, A_2, A_3 ldots, A_N ( 1 <= q A_i <= q 10^5 ) -- the offensive value of each player. The third line contains N integers B_1, B_2, B_3 ldots, B_N ( 1 <= q B_i <= q 10^5 ) -- the defensive value of each player. The fourth line contains a single integer Q ( 1 <= q Q <= q10^5 ) -- the number of events. The j -th of the next Q lines contains the j -th event as described. At any moment, each value of A_i and B_i is always between '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
221752284 |
huntermarchi1703 |
F |
Sept. 3, 2023, 9:34 p.m. |
OK |
GNU C++14 |
TESTS |
33 |
2807 |
65945600 |
|
|
221775078 |
Pyqe |
F |
Sept. 4, 2023, 5:46 a.m. |
OK |
GNU C++17 |
TESTS |
33 |
1996 |
602726400 |
|
|
221767818 |
K-H |
F |
Sept. 4, 2023, 3:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
2012 |
25395200 |
|
|
221767658 |
K-H |
F |
Sept. 4, 2023, 3:48 a.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
2448 |
25395200 |
|
|
221718166 |
noimi SSRS_ |
F |
Sept. 3, 2023, 4:02 p.m. |
OK |
GNU C++17 (64) |
TESTS |
33 |
2527 |
12288000 |
|
|
221758434 |
njwrz |
F |
Sept. 4, 2023, 12:19 a.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
1419 |
597708800 |
|
|
221729654 |
njwrz |
F |
Sept. 3, 2023, 5:31 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
1731 |
435200000 |
|
|
221696065 |
red-stone LXH-cat wsyear |
F |
Sept. 3, 2023, 1:48 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
1762 |
6553600 |
|
|
221729602 |
njwrz |
F |
Sept. 3, 2023, 5:30 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
1887 |
435200000 |
|
|
221769608 |
srivathsava_337 |
F |
Sept. 4, 2023, 4:21 a.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2230 |
2048000 |
|
|
221709337 |
imle Kevin114514 GeZhiyuan |
F |
Sept. 3, 2023, 3:03 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2246 |
2048000 |
|
|
221724230 |
zhangjianjuncd Imakf -14 |
F |
Sept. 3, 2023, 4:48 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2371 |
4403200 |
|
|
221765350 |
qiuzx |
F |
Sept. 4, 2023, 3:08 a.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2371 |
8294400 |
|
|
221725659 |
qiuzx njwrz sjcsjcsjc |
F |
Sept. 3, 2023, 4:58 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2496 |
137011200 |
|
|
221725428 |
qiuzx njwrz sjcsjcsjc |
F |
Sept. 3, 2023, 4:56 p.m. |
OK |
GNU C++20 (64) |
TESTS |
33 |
2605 |
148275200 |
|
|
remove filters
Back to search problems