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 |
---|---|---|---|---|---|---|
1899 | Codeforces Round 909 (Div. 3) | FINISHED | False | 8100 | 36948263 | Nov. 17, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3365 ) | G | Unusual Entertainment | PROGRAMMING | data structures dfs and similar ds shortest paths sortings trees |
B"A tree is a connected graph without cycles. A permutation is an array consisting of n distinct integers from 1 to n in any order. For example, [5, 1, 3, 2, 4] is a permutation, but [2, 1, 1] is not a permutation (as 1 appears twice in the array) and [1, 3, 2, 5] is also not a permutation (as n = 4 , but 5 is present in the array). After a failed shoot in the BrMeast video, Alex fell into depression. Even his birthday did not make him happy. However, after receiving a gift from Timofey, Alex's mood suddenly improved. Now he spent days playing with the gifted constructor. Recently, he came up with an unusual entertainment. Alex builds a tree from his constructor, consisting of n vertices numbered from 1 to n , with the root at vertex 1 . Then he writes down each integer from 1 to n in some order, obtaining a permutation p . After that, Alex comes up with q triples of integers l, r, x . For each triple, he tries to determine if there is at least one descendant of vertex x among the vertices p_l, p_{l+1}, ldots, p_r . A vertex u is a descendant of vertex v if and only if mathrm{dist}(1, v) + mathrm{dist}(v, u) = mathrm{dist}(1, u) , where mathrm{dist}(a, b) is the distance between vertices a and b . In other words, vertex v must be on the path from the root to vertex u . Alex told Zakhar about this entertainment. Now Alex tells his friend q triples as described above, hoping that Zakhar can check for the presence of a descendant. Zakhar is very sleepy, so he turned to you for help. Help Zakhar answer all of Alex's questions and finally go to sleep. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n, q ( 1 <= n, q <= 10^5 ) -- the number of vertices in the tr"... |
Разбор Codeforces Round 909 (Div. 3) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
233202864 | garrafa | G | Nov. 17, 2023, 5:26 p.m. | OK | Clang++17 Diagnostics | TESTS | 32 | 2995 | 26726400 | ||
233229328 | Gassa | G | Nov. 17, 2023, 11:39 p.m. | OK | D | TESTS | 32 | 327 | 25702400 | ||
233248165 | China_Wmq | G | Nov. 18, 2023, 5:36 a.m. | OK | GNU C++14 | TESTS | 32 | 249 | 18534400 | ||
233191806 | kotoyose | G | Nov. 17, 2023, 4:44 p.m. | OK | GNU C++14 | TESTS | 30 | 295 | 11161600 | ||
233229656 | omeganot | G | Nov. 17, 2023, 11:51 p.m. | OK | GNU C++14 | TESTS | 32 | 296 | 14745600 | ||
233196374 | Yzk_CF | G | Nov. 17, 2023, 4:53 p.m. | OK | GNU C++14 | TESTS | 30 | 296 | 20889600 | ||
233202060 | Ron_Chen | G | Nov. 17, 2023, 5:21 p.m. | OK | GNU C++14 | TESTS | 32 | 296 | 27545600 | ||
233215349 | rohit2593 | G | Nov. 17, 2023, 7:18 p.m. | OK | GNU C++14 | TESTS | 32 | 405 | 18841600 | ||
233199522 | Dream54188 | G | Nov. 17, 2023, 5:07 p.m. | OK | GNU C++14 | TESTS | 30 | 436 | 16691200 | ||
233193855 | Dream54188 | G | Nov. 17, 2023, 4:47 p.m. | OK | GNU C++14 | TESTS | 30 | 436 | 16691200 | ||
233226111 | Kartik1508 | G | Nov. 17, 2023, 10:05 p.m. | OK | GNU C++14 | TESTS | 32 | 452 | 25600000 | ||
233225141 | Pranjal_Singh_1702 | G | Nov. 17, 2023, 9:43 p.m. | OK | GNU C++14 | TESTS | 32 | 545 | 33792000 | ||
233201061 | pi_3.1416 | G | Nov. 17, 2023, 5:16 p.m. | OK | GNU C++17 | TESTS | 32 | 171 | 24780800 | ||
233221911 | patou | G | Nov. 17, 2023, 8:47 p.m. | OK | GNU C++17 | TESTS | 32 | 186 | 8396800 | ||
233232123 | ngaycaudenvoicuocdoitoi | G | Nov. 18, 2023, 1:18 a.m. | OK | GNU C++17 | TESTS | 32 | 186 | 9728000 | ||
233249914 | yumingsk | G | Nov. 18, 2023, 5:54 a.m. | OK | GNU C++17 | TESTS | 32 | 186 | 11161600 | ||
233236309 | Mag1sk | G | Nov. 18, 2023, 2:48 a.m. | OK | GNU C++17 | TESTS | 32 | 186 | 11878400 | ||
233201811 | rolandpetrean | G | Nov. 17, 2023, 5:19 p.m. | OK | GNU C++17 | TESTS | 32 | 202 | 8806400 | ||
233248177 | Hyojin | G | Nov. 18, 2023, 5:36 a.m. | OK | GNU C++17 | TESTS | 32 | 202 | 10956800 | ||
233203026 | yunipoke | G | Nov. 17, 2023, 5:27 p.m. | OK | GNU C++17 | TESTS | 32 | 202 | 10956800 | ||
233192913 | MCuong | G | Nov. 17, 2023, 4:46 p.m. | OK | GNU C++17 | TESTS | 30 | 202 | 11980800 | ||
233215170 | pemguimn | G | Nov. 17, 2023, 7:16 p.m. | OK | GNU C++17 | TESTS | 32 | 202 | 12800000 | ||
233240766 | module998244353 | G | Nov. 18, 2023, 4:02 a.m. | OK | GNU C++17 (64) | TESTS | 32 | 171 | 15564800 | ||
233207593 | AINgray | G | Nov. 17, 2023, 6:02 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 187 | 173875200 | ||
233233360 | caomuyilin | G | Nov. 18, 2023, 1:48 a.m. | OK | GNU C++17 (64) | TESTS | 32 | 202 | 19660800 | ||
233244359 | Cosysl | G | Nov. 18, 2023, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 32 | 202 | 21299200 | ||
233225503 | madlogic | G | Nov. 17, 2023, 9:51 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 249 | 24371200 | ||
233233751 | fs20091003 | G | Nov. 18, 2023, 1:57 a.m. | OK | GNU C++17 (64) | TESTS | 32 | 264 | 25190400 | ||
233222552 | camc | G | Nov. 17, 2023, 8:57 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 265 | 42188800 | ||
233201853 | q1436177712 | G | Nov. 17, 2023, 5:20 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 265 | 50073600 | ||
233226068 | madlogic | G | Nov. 17, 2023, 10:04 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 280 | 24780800 | ||
233219120 | Liudas | G | Nov. 17, 2023, 8:05 p.m. | OK | GNU C++17 (64) | TESTS | 32 | 280 | 38604800 | ||
233197854 | magnus.hegdahl | G | Nov. 17, 2023, 4:59 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 108 | 25907200 | ||
233197934 | btac | G | Nov. 17, 2023, 4:59 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 124 | 15155200 | ||
233196538 | magnus.hegdahl | G | Nov. 17, 2023, 4:54 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 124 | 28364800 | ||
233234219 | floweria | G | Nov. 18, 2023, 2:07 a.m. | OK | GNU C++20 (64) | TESTS | 32 | 140 | 14233600 | ||
233237308 | wzihan | G | Nov. 18, 2023, 3:06 a.m. | OK | GNU C++20 (64) | TESTS | 32 | 140 | 14540800 | ||
233217701 | lucifer223 | G | Nov. 17, 2023, 7:47 p.m. | OK | GNU C++20 (64) | TESTS | 32 | 140 | 14745600 | ||
233217638 | lucifer223 | G | Nov. 17, 2023, 7:46 p.m. | OK | GNU C++20 (64) | TESTS | 32 | 140 | 14745600 | ||
233218698 | XHYMathematics | G | Nov. 17, 2023, 7:59 p.m. | OK | GNU C++20 (64) | TESTS | 32 | 140 | 22528000 | ||
233205597 | FlowRays | G | Nov. 17, 2023, 5:46 p.m. | OK | GNU C++20 (64) | TESTS | 32 | 155 | 12185600 | ||
233198829 | Code_Hard10 | G | Nov. 17, 2023, 5:04 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 155 | 17510400 | ||
233192777 | profchi | G | Nov. 17, 2023, 4:45 p.m. | OK | Java 11 | TESTS | 30 | 904 | 60518400 | ||
233204569 | TCchen | G | Nov. 17, 2023, 5:38 p.m. | OK | Java 17 | TESTS | 32 | 560 | 31334400 | ||
233246656 | optimus1369 | G | Nov. 18, 2023, 5:20 a.m. | OK | Java 17 | TESTS | 32 | 748 | 38400000 | ||
233205861 | Mamimi | G | Nov. 17, 2023, 5:48 p.m. | OK | Java 17 | TESTS | 32 | 966 | 43827200 | ||
233210143 | dusty.and.rusty | G | Nov. 17, 2023, 6:23 p.m. | OK | Java 21 | TESTS | 32 | 1014 | 27033600 | ||
233222578 | NerfThis | G | Nov. 17, 2023, 8:57 p.m. | OK | Java 8 | TESTS | 32 | 420 | 15667200 | ||
233226569 | Piashy | G | Nov. 17, 2023, 10:16 p.m. | OK | MS C++ 2017 | TESTS | 32 | 1294 | 79462400 | ||
233233633 | RobinFromTheHood | G | Nov. 18, 2023, 1:54 a.m. | OK | PyPy 3-64 | TESTS | 32 | 764 | 52838400 | ||
233204112 | liupengsay | G | Nov. 17, 2023, 5:35 p.m. | OK | PyPy 3-64 | TESTS | 32 | 811 | 54476800 | ||
233230770 | YMSeah | G | Nov. 18, 2023, 12:32 a.m. | OK | PyPy 3-64 | TESTS | 32 | 967 | 64000000 | ||
233216183 | SoleProprietor | G | Nov. 17, 2023, 7:28 p.m. | OK | PyPy 3-64 | TESTS | 32 | 1341 | 117862400 | ||
233246532 | gardengnome | G | Nov. 18, 2023, 5:18 a.m. | OK | PyPy 3-64 | TESTS | 32 | 1668 | 71987200 | ||
233221920 | gardengnome | G | Nov. 17, 2023, 8:47 p.m. | OK | PyPy 3-64 | TESTS | 32 | 1902 | 104652800 | ||
233231530 | yupooh | G | Nov. 18, 2023, 12:58 a.m. | OK | PyPy 3-64 | TESTS | 32 | 2012 | 110387200 | ||
233231443 | yupooh | G | Nov. 18, 2023, 12:55 a.m. | OK | PyPy 3-64 | TESTS | 32 | 2137 | 110592000 | ||
233227488 | gardengnome | G | Nov. 17, 2023, 10:40 p.m. | OK | PyPy 3-64 | TESTS | 32 | 2167 | 98304000 | ||
233192497 | Navier_boltzmann | G | Nov. 17, 2023, 4:45 p.m. | OK | PyPy 3-64 | TESTS | 30 | 2698 | 69120000 | ||
233212441 | matheusdacach | G | Nov. 17, 2023, 6:46 p.m. | OK | Rust 2021 | TESTS | 32 | 140 | 28876800 | ||
233217024 | OneSadKid | G | Nov. 17, 2023, 7:38 p.m. | OK | Rust 2021 | TESTS | 32 | 155 | 18944000 | ||
233207134 | PugachAG | G | Nov. 17, 2023, 5:58 p.m. | OK | Rust 2021 | TESTS | 32 | 170 | 31129600 | ||
233205618 | haihamabossu | G | Nov. 17, 2023, 5:46 p.m. | OK | Rust 2021 | TESTS | 32 | 202 | 42188800 | ||
233221747 | nikgaevoy | G | Nov. 17, 2023, 8:44 p.m. | OK | Rust 2021 | TESTS | 32 | 997 | 22118400 |
Back to search problems