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 |
---|---|---|---|---|---|---|
1575 | COMPFEST 13 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 103998263 | Oct. 2, 2021, 1:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 929 ) | I | Illusions of the Desert | PROGRAMMING | data structures trees |
B'Chanek Jones is back, helping his long-lost relative Indiana Jones, to find a secret treasure in a maze buried below a desert full of illusions. The map of the labyrinth forms a tree with n rooms numbered from 1 to n and n - 1 tunnels connecting them such that it is possible to travel between each pair of rooms through several tunnels. The i -th room ( 1 <= q i <= q n ) has a_i illusion rate. To go from the x -th room to the y -th room, there must exist a tunnel between x and y , and it takes max(|a_x + a_y|, |a_x - a_y|) energy. |z| denotes the absolute value of z . To prevent grave robbers, the maze can change the illusion rate of any room in it. Chanek and Indiana would ask q queries. There are two types of queries to be done: Help them, so you can get a portion of the treasure! The first line contains two integers n and q ( 2 <= q n <= q 10^5 , 1 <= q q <= q 10^5 ) -- the number of rooms in the maze and the number of queries. The second line contains n integers a_1, a_2, ldots, a_n ( 0 <= q |a_i| <= q 10^9 ) -- inital illusion rate of each room. The i -th of the next n-1 lines contains two integers s_i and t_i ( 1 <= q s_i, t_i <= q n ), meaning there is a tunnel connecting s_i -th room and t_i -th room. The given edges form a tree. The next q lines contain the query as described. The given queries are valid. For each type 2 query, output a line containing an integer -- the minimum sum of energy needed for Chanek and Indiana to take the secret treasure. In the first query, their movement from the 1 -st to the 2 -nd room is as follows. In the second query, the illusion rate of the 1 -st room changes from 10 to -3 . In the third query, their movement from the 1 -st to the 2 -nd room is as follows. Now, it takes 32 energy. '... |
COMPFEST 13 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
130585947 | tokitsukaze | I | Oct. 2, 2021, 5:10 p.m. | OK | GNU C++14 | TESTS | 18 | 109 | 15360000 | ||
130583844 | xuanquang1999 | I | Oct. 2, 2021, 4:41 p.m. | OK | GNU C++14 | TESTS | 18 | 202 | 10752000 | ||
130618431 | Lylova amokrousov Timonnable | I | Oct. 3, 2021, 5:59 a.m. | OK | GNU C++14 | TESTS | 18 | 217 | 24166400 | ||
130583015 | nwi | I | Oct. 2, 2021, 4:30 p.m. | OK | GNU C++14 | TESTS | 18 | 249 | 18432000 | ||
130581822 | Melania ttee | I | Oct. 2, 2021, 4:15 p.m. | OK | GNU C++14 | TESTS | 18 | 249 | 18739200 | ||
130595106 | star_city | I | Oct. 2, 2021, 7:27 p.m. | OK | GNU C++14 | TESTS | 18 | 265 | 11571200 | ||
130576047 | JXZhou ludan0414 | I | Oct. 2, 2021, 3:10 p.m. | OK | GNU C++14 | TESTS | 18 | 265 | 34816000 | ||
130578659 | Prince_Kassad | I | Oct. 2, 2021, 3:39 p.m. | OK | GNU C++14 | TESTS | 18 | 280 | 38604800 | ||
130616981 | Alan233 | I | Oct. 3, 2021, 5:34 a.m. | OK | GNU C++14 | TESTS | 18 | 327 | 18739200 | ||
130582809 | chenjb shb123 FrostStar | I | Oct. 2, 2021, 4:28 p.m. | OK | GNU C++14 | TESTS | 18 | 327 | 27852800 | ||
130581689 | islingr tamajitbuba | I | Oct. 2, 2021, 4:14 p.m. | OK | GNU C++17 | TESTS | 18 | 233 | 20480000 | ||
130615471 | ash_98 | I | Oct. 3, 2021, 5:06 a.m. | OK | GNU C++17 | TESTS | 18 | 249 | 23347200 | ||
130598996 | ShJ | I | Oct. 2, 2021, 8:46 p.m. | OK | GNU C++17 | TESTS | 18 | 264 | 16588800 | ||
130579686 | aarr afterall Amoo_Safar | I | Oct. 2, 2021, 3:50 p.m. | OK | GNU C++17 | TESTS | 18 | 265 | 20582400 | ||
130583689 | wiwitrifai Luqman | I | Oct. 2, 2021, 4:39 p.m. | OK | GNU C++17 | TESTS | 18 | 265 | 30208000 | ||
130583561 | maspy | I | Oct. 2, 2021, 4:38 p.m. | OK | GNU C++17 | TESTS | 18 | 280 | 29286400 | ||
130570287 | Retired_MiFaFaOvO TLE Miracle03 | I | Oct. 2, 2021, 2:13 p.m. | OK | GNU C++17 | TESTS | 18 | 295 | 20582400 | ||
130587656 | Basilhijaz | I | Oct. 2, 2021, 5:32 p.m. | OK | GNU C++17 | TESTS | 18 | 295 | 55808000 | ||
130586009 | old_player | I | Oct. 2, 2021, 5:11 p.m. | OK | GNU C++17 | TESTS | 18 | 296 | 25190400 | ||
130568994 | atodo VELJAODI viovlo | I | Oct. 2, 2021, 2:02 p.m. | OK | GNU C++17 | TESTS | 18 | 296 | 57548800 | ||
130584147 | SampsonYW | I | Oct. 2, 2021, 4:45 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 62 | 15155200 | ||
130580003 | risujiroh | I | Oct. 2, 2021, 3:53 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 108 | 20582400 | ||
130609003 | Mitsukasa_Ayase | I | Oct. 3, 2021, 2:31 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 109 | 35635200 | ||
130580617 | Heltion | I | Oct. 2, 2021, 4:01 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 171 | 17612800 | ||
130580911 | SSerxhs fr200110217102 | I | Oct. 2, 2021, 4:04 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 171 | 20377600 | ||
130599201 | new_doubleh | I | Oct. 2, 2021, 8:50 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 186 | 20889600 | ||
130581305 | pachico | I | Oct. 2, 2021, 4:09 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 187 | 25804800 | ||
130578997 | .I. -is-this-fft- | I | Oct. 2, 2021, 3:43 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 202 | 16793600 | ||
130577298 | yatuba rniya Rubikun | I | Oct. 2, 2021, 3:24 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 202 | 17612800 | ||
130585370 | .-O_O-. shashankagrawal | I | Oct. 2, 2021, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 202 | 19660800 | ||
130579007 | sansen | I | Oct. 2, 2021, 3:43 p.m. | OK | Rust | TESTS | 18 | 109 | 18944000 |
Back to search problems