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 |
---|---|---|---|---|---|---|
1857 | Codeforces Round 891 (Div. 3) | FINISHED | False | 8100 | 45761063 | Aug. 7, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20729 ) | D | Strong Vertices | PROGRAMMING | math sortings trees |
B'Given two arrays a and b , both of length n . Elements of both arrays indexed from 1 to n . You are constructing a directed graph, where edge from u to v ( u neq v ) exists if a_u-a_v ge b_u-b_v . A vertex V is called strong if there exists a path from V to all other vertices. A path in a directed graph is a chain of several vertices, connected by edges, such that moving from the vertex u , along the directions of the edges, the vertex v can be reached. Your task is to find all strong vertices. For example, if a=[3,1,2,4] and b=[4,3,2,1] , the graph will look like this: The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains an integer n ( 2 <= n <= 2 cdot 10^5 ) -- the length of a and b . The second line of each test case contains n integers a_1,a_2 ... a_n ( -10^9 <= a_i <= 10^9 ) -- the array a . The third line of each test case contains n integers b_1,b_2 ... b_n ( -10^9 <= b_i <= 10^9 ) -- the array b . It is guaranteed that the sum of n for all test cases does not exceed 2 cdot 10^5 . For each test case, output two lines: in the first line, output the number of strong vertices, and in the second line, output all strong vertices in ascending order. The first sample is covered in the problem statement. For the second sample, the graph looks like this: In the third sample, the vertices are connected by a single directed edge from vertex 2 to vertex 1 , so the only strong vertex is 2 . In the fourth sample, all vertices are connected to each other by bidirectional edges, so there is a path from every vertex to any other vertex. '... |
119134 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
217750833 | NenadDapic | D | Aug. 7, 2023, 6:03 p.m. | OK | FPC | TESTS | 11 | 624 | 2457600 | ||
217742241 | supto07 | D | Aug. 7, 2023, 5:10 p.m. | OK | GNU C11 | TESTS | 11 | 873 | 2457600 | ||
217747404 | cry | D | Aug. 7, 2023, 5:39 p.m. | OK | GNU C11 | TESTS | 11 | 1013 | 102400000 | ||
217748180 | cry | D | Aug. 7, 2023, 5:45 p.m. | OK | GNU C11 | TESTS | 11 | 1029 | 110899200 | ||
217782907 | zhangzhimo | D | Aug. 8, 2023, 1:55 a.m. | OK | GNU C++14 | TESTS | 12 | 31 | 20070400 | ||
217743822 | qi_qing | D | Aug. 7, 2023, 5:18 p.m. | OK | GNU C++14 | TESTS | 11 | 124 | 1638400 | ||
217755080 | G_H_Turtle | D | Aug. 7, 2023, 6:37 p.m. | OK | GNU C++14 | TESTS | 11 | 124 | 2457600 | ||
217799813 | zltzlt | D | Aug. 8, 2023, 3:31 a.m. | OK | GNU C++14 | TESTS | 12 | 124 | 3174400 | ||
217741074 | _ArIsu | D | Aug. 7, 2023, 5:05 p.m. | OK | GNU C++14 | TESTS | 11 | 124 | 3993600 | ||
217800378 | khanhdungtrinh | D | Aug. 8, 2023, 3:37 a.m. | OK | GNU C++14 | TESTS | 12 | 124 | 3993600 | ||
217800534 | eggome | D | Aug. 8, 2023, 3:38 a.m. | OK | GNU C++14 | TESTS | 12 | 139 | 2457600 | ||
217773368 | zltzlt | D | Aug. 7, 2023, 11:03 p.m. | OK | GNU C++14 | TESTS | 12 | 139 | 3174400 | ||
217783329 | lmkae | D | Aug. 8, 2023, 2 a.m. | OK | GNU C++14 | TESTS | 12 | 139 | 3993600 | ||
217800560 | kebold | D | Aug. 8, 2023, 3:39 a.m. | OK | GNU C++14 | TESTS | 12 | 139 | 3993600 | ||
217763856 | CSHwang | D | Aug. 7, 2023, 8:01 p.m. | OK | GNU C++17 | TESTS | 11 | 124 | 1638400 | ||
217763460 | Laxia_von_Roswell | D | Aug. 7, 2023, 7:56 p.m. | OK | GNU C++17 | TESTS | 11 | 124 | 1638400 | ||
217786889 | Thorfinn_Karlsefni | D | Aug. 8, 2023, 2:41 a.m. | OK | GNU C++17 | TESTS | 12 | 124 | 2457600 | ||
217747816 | Kinan | D | Aug. 7, 2023, 5:42 p.m. | OK | GNU C++17 | TESTS | 11 | 124 | 3174400 | ||
217798377 | r-a-j | D | Aug. 8, 2023, 3:14 a.m. | OK | GNU C++17 | TESTS | 12 | 124 | 3174400 | ||
217796527 | snowice | D | Aug. 8, 2023, 2:55 a.m. | OK | GNU C++17 | TESTS | 12 | 124 | 3174400 | ||
217761440 | AC_sahER | D | Aug. 7, 2023, 7:36 p.m. | OK | GNU C++17 | TESTS | 11 | 124 | 3174400 | ||
217778868 | DUNKITO | D | Aug. 8, 2023, 1:05 a.m. | OK | GNU C++17 | TESTS | 12 | 124 | 3481600 | ||
217784172 | yan.silva | D | Aug. 8, 2023, 2:11 a.m. | OK | GNU C++17 | TESTS | 12 | 139 | 819200 | ||
217778037 | SugarT | D | Aug. 8, 2023, 12:52 a.m. | OK | GNU C++17 | TESTS | 12 | 139 | 1638400 | ||
217774456 | danielvitor23 | D | Aug. 7, 2023, 11:30 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 92 | 5017600 | ||
217781316 | LXH-cat | D | Aug. 8, 2023, 1:38 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 93 | 1638400 | ||
217744473 | Mhamad_aboaljood | D | Aug. 7, 2023, 5:21 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 2150400 | ||
217741419 | hypereagle113 | D | Aug. 7, 2023, 5:07 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 2457600 | ||
217773883 | enslaved | D | Aug. 7, 2023, 11:16 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 93 | 2969600 | ||
217746891 | _97suummiit | D | Aug. 7, 2023, 5:36 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 3788800 | ||
217751727 | OEENRS_ | D | Aug. 7, 2023, 6:09 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 3788800 | ||
217743882 | s_h_e_p_l | D | Aug. 7, 2023, 5:18 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 3788800 | ||
217805959 | vikash1807 | D | Aug. 8, 2023, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 93 | 7475200 | ||
217741729 | anvy26 | D | Aug. 7, 2023, 5:08 p.m. | OK | GNU C++17 (64) | TESTS | 11 | 93 | 7475200 | ||
217779125 | cmk666 | D | Aug. 8, 2023, 1:09 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 31 | 4198400 | ||
217745933 | ibrm | D | Aug. 7, 2023, 5:30 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 46 | 3788800 | ||
217781530 | ieeqwq | D | Aug. 8, 2023, 1:40 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 61 | 2457600 | ||
217801783 | battle_sky | D | Aug. 8, 2023, 3:53 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 61 | 2969600 | ||
217768484 | Ahmed__Khalil | D | Aug. 7, 2023, 9:09 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 61 | 3788800 | ||
217757552 | AmateurCode | D | Aug. 7, 2023, 6:58 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 61 | 4505600 | ||
217754391 | EshBiz | D | Aug. 7, 2023, 6:30 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 62 | 2969600 | ||
217805691 | czhang2718 | D | Aug. 8, 2023, 4:43 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 62 | 2969600 | ||
217787351 | Muhammad11 | D | Aug. 8, 2023, 2:46 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 62 | 2969600 | ||
217761735 | LipArcanjo | D | Aug. 7, 2023, 7:38 p.m. | OK | GNU C++20 (64) | TESTS | 11 | 62 | 2969600 | ||
217796251 | hzEnv | D | Aug. 8, 2023, 2:53 a.m. | OK | Go | TESTS | 12 | 218 | 10649600 | ||
217811706 | Pranav_Sharda | D | Aug. 8, 2023, 5:49 a.m. | OK | Java 11 | TESTS | 12 | 311 | 7680000 | ||
217776342 | Edge_Tree | D | Aug. 8, 2023, 12:19 a.m. | OK | Java 11 | TESTS | 12 | 327 | 74956800 | ||
217809917 | Harwinvanak | D | Aug. 8, 2023, 5:30 a.m. | OK | Java 11 | TESTS | 12 | 343 | 7884800 | ||
217810512 | Harwinvanak | D | Aug. 8, 2023, 5:36 a.m. | OK | Java 11 | TESTS | 12 | 358 | 7884800 | ||
217811303 | Harwinvanak | D | Aug. 8, 2023, 5:45 a.m. | OK | Java 11 | TESTS | 12 | 358 | 7987200 | ||
217799238 | henrychenOutlook | D | Aug. 8, 2023, 3:24 a.m. | OK | Java 11 | TESTS | 12 | 389 | 10035200 | ||
217753692 | Domokunx | D | Aug. 7, 2023, 6:24 p.m. | OK | Java 11 | TESTS | 11 | 764 | 0 | ||
217751698 | minibin | D | Aug. 7, 2023, 6:09 p.m. | OK | Java 11 | TESTS | 11 | 810 | 7884800 | ||
217783930 | dan1024 | D | Aug. 8, 2023, 2:08 a.m. | OK | Java 11 | TESTS | 12 | 1356 | 0 | ||
217798309 | not_just_rr | D | Aug. 8, 2023, 3:13 a.m. | OK | Java 17 | TESTS | 12 | 312 | 10854400 | ||
217804723 | rdhakar246 | D | Aug. 8, 2023, 4:31 a.m. | OK | Java 17 | TESTS | 12 | 342 | 7782400 | ||
217752997 | KIRA_p01 | D | Aug. 7, 2023, 6:19 p.m. | OK | Java 17 | TESTS | 11 | 343 | 8294400 | ||
217756767 | TruongCongQuocTrieu | D | Aug. 7, 2023, 6:51 p.m. | OK | Java 17 | TESTS | 11 | 343 | 15360000 | ||
217776364 | InfinitePath | D | Aug. 8, 2023, 12:19 a.m. | OK | Java 17 | TESTS | 12 | 343 | 76390400 | ||
217743382 | woodyiiiiiii | D | Aug. 7, 2023, 5:16 p.m. | OK | Java 17 | TESTS | 11 | 389 | 6963200 | ||
217743230 | Eslam_Ahmed | D | Aug. 7, 2023, 5:15 p.m. | OK | Java 17 | TESTS | 11 | 389 | 8089600 | ||
217810368 | KhadijaBadrawy | D | Aug. 8, 2023, 5:35 a.m. | OK | Java 17 | TESTS | 12 | 390 | 9113600 | ||
217806546 | GaleStarr | D | Aug. 8, 2023, 4:54 a.m. | OK | Java 17 | TESTS | 12 | 826 | 4300800 | ||
217804441 | tsabbir007 | D | Aug. 8, 2023, 4:27 a.m. | OK | Java 17 | TESTS | 12 | 1372 | 819200 | ||
217786285 | chuquwan9964 | D | Aug. 8, 2023, 2:34 a.m. | OK | Java 8 | TESTS | 12 | 170 | 0 | ||
217811264 | UltimateST | D | Aug. 8, 2023, 5:44 a.m. | OK | Java 8 | TESTS | 12 | 217 | 60108800 | ||
217765168 | ADust | D | Aug. 7, 2023, 8:17 p.m. | OK | Java 8 | TESTS | 11 | 249 | 16793600 | ||
217780468 | bleach__ | D | Aug. 8, 2023, 1:27 a.m. | OK | Java 8 | TESTS | 12 | 326 | 100454400 | ||
217812528 | chandu33 | D | Aug. 8, 2023, 5:57 a.m. | OK | Java 8 | TESTS | 12 | 327 | 19148800 | ||
217803688 | SilveryZz | D | Aug. 8, 2023, 4:16 a.m. | OK | Java 8 | TESTS | 12 | 327 | 19148800 | ||
217762706 | hamossa | D | Aug. 7, 2023, 7:48 p.m. | OK | Java 8 | TESTS | 11 | 826 | 16793600 | ||
217766304 | hamossa | D | Aug. 7, 2023, 8:31 p.m. | OK | Java 8 | TESTS | 11 | 841 | 16793600 | ||
217749753 | lakshay.sharma.ug21 | D | Aug. 7, 2023, 5:55 p.m. | OK | Java 8 | TESTS | 11 | 998 | 29491200 | ||
217807170 | Katoch | D | Aug. 8, 2023, 5 a.m. | OK | Java 8 | TESTS | 12 | 1247 | 2048000 | ||
217743964 | minhtanpham379 | D | Aug. 7, 2023, 5:19 p.m. | OK | MS C++ 2017 | TESTS | 11 | 405 | 2457600 | ||
217773753 | maxK99 | D | Aug. 7, 2023, 11:13 p.m. | OK | MS C++ 2017 | TESTS | 12 | 405 | 6041600 | ||
217785754 | exilesome | D | Aug. 8, 2023, 2:28 a.m. | OK | MS C++ 2017 | TESTS | 12 | 421 | 3072000 | ||
217750219 | sharmavishek2000 | D | Aug. 7, 2023, 5:58 p.m. | OK | MS C++ 2017 | TESTS | 11 | 483 | 8704000 | ||
217764181 | alexpods | D | Aug. 7, 2023, 8:05 p.m. | OK | Node.js | TESTS | 11 | 248 | 50995200 | ||
217764020 | alexpods | D | Aug. 7, 2023, 8:03 p.m. | OK | Node.js | TESTS | 11 | 249 | 50995200 | ||
217764103 | alexpods | D | Aug. 7, 2023, 8:04 p.m. | OK | Node.js | TESTS | 11 | 265 | 50892800 | ||
217743696 | xiaowuc1 | D | Aug. 7, 2023, 5:17 p.m. | OK | PyPy 3 | TESTS | 11 | 576 | 25088000 | ||
217774420 | grente | D | Aug. 7, 2023, 11:29 p.m. | OK | PyPy 3 | TESTS | 12 | 608 | 24780800 | ||
217741098 | dylan1006498 | D | Aug. 7, 2023, 5:05 p.m. | OK | PyPy 3 | TESTS | 11 | 639 | 23756800 | ||
217741415 | tu144x | D | Aug. 7, 2023, 5:07 p.m. | OK | PyPy 3 | TESTS | 11 | 654 | 25088000 | ||
217758172 | Imeon | D | Aug. 7, 2023, 7:03 p.m. | OK | PyPy 3 | TESTS | 11 | 1014 | 28569600 | ||
217757614 | rmr | D | Aug. 7, 2023, 6:58 p.m. | OK | PyPy 3-64 | TESTS | 11 | 171 | 31539200 | ||
217800008 | b-baka | D | Aug. 8, 2023, 3:33 a.m. | OK | PyPy 3-64 | TESTS | 12 | 171 | 38297600 | ||
217751393 | bergus | D | Aug. 7, 2023, 6:07 p.m. | OK | PyPy 3-64 | TESTS | 11 | 171 | 42393600 | ||
217756970 | l0stempl3 | D | Aug. 7, 2023, 6:53 p.m. | OK | PyPy 3-64 | TESTS | 11 | 171 | 44851200 | ||
217762927 | Alex239 | D | Aug. 7, 2023, 7:51 p.m. | OK | PyPy 3-64 | TESTS | 11 | 202 | 34406400 | ||
217741403 | vedantmishra69 | D | Aug. 7, 2023, 5:06 p.m. | OK | PyPy 3-64 | TESTS | 11 | 202 | 52224000 | ||
217750435 | Mohamed_Hamed | D | Aug. 7, 2023, 6 p.m. | OK | PyPy 3-64 | TESTS | 11 | 218 | 32870400 | ||
217751914 | Kustov_Vadim_533 | D | Aug. 7, 2023, 6:11 p.m. | OK | PyPy 3-64 | TESTS | 11 | 218 | 36044800 | ||
217756291 | gardengnome | D | Aug. 7, 2023, 6:47 p.m. | OK | PyPy 3-64 | TESTS | 11 | 233 | 37376000 | ||
217746306 | sorcerer_21 | D | Aug. 7, 2023, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 11 | 249 | 36352000 | ||
217755964 | My_Name123 | D | Aug. 7, 2023, 6:44 p.m. | OK | Python 3 | TESTS | 11 | 389 | 36966400 | ||
217780334 | Ig_light | D | Aug. 8, 2023, 1:25 a.m. | OK | Python 3 | TESTS | 12 | 389 | 37580800 | ||
217763094 | alexpods | D | Aug. 7, 2023, 7:52 p.m. | OK | Python 3 | TESTS | 11 | 389 | 53555200 | ||
217745325 | 21wh1a05j4 | D | Aug. 7, 2023, 5:26 p.m. | OK | Python 3 | TESTS | 11 | 451 | 50380800 | ||
217747202 | ImagineTime | D | Aug. 7, 2023, 5:38 p.m. | OK | Python 3 | TESTS | 11 | 467 | 36761600 | ||
217799140 | ZhewenYu | D | Aug. 8, 2023, 3:23 a.m. | OK | Python 3 | TESTS | 12 | 530 | 47308800 | ||
217754050 | cody_anna | D | Aug. 7, 2023, 6:27 p.m. | OK | Python 3 | TESTS | 11 | 561 | 54886400 | ||
217784579 | Hitesh_6291 | D | Aug. 8, 2023, 2:16 a.m. | OK | Python 3 | TESTS | 12 | 654 | 50995200 | ||
217747907 | bony_always | D | Aug. 7, 2023, 5:43 p.m. | OK | Python 3 | TESTS | 11 | 701 | 68198400 | ||
217748587 | ihnaqi | D | Aug. 7, 2023, 5:47 p.m. | OK | Rust 2021 | TESTS | 11 | 140 | 10444800 | ||
217743081 | Suxton | D | Aug. 7, 2023, 5:14 p.m. | OK | Rust 2021 | TESTS | 11 | 171 | 25190400 | ||
217750172 | MenezesDM | D | Aug. 7, 2023, 5:58 p.m. | OK | Rust 2021 | TESTS | 11 | 186 | 16793600 |
Back to search problems