Codeforces Round 264 (Div. 2)

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
463 Codeforces Round 264 (Div. 2) FINISHED False 7200 328228204 Aug. 30, 2014, 7:30 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1630 ) E Caisa and Tree PROGRAMMING brute force dfs and similar math number theory trees 2400

B'Caisa is now at home and his son has a simple task for him. Given a rooted tree with n vertices, numbered from 1 to n (vertex 1 is the root). Each vertex of the tree has a value. You should answer q queries. Each query is one of the following: You are given all the queries, help Caisa to solve the problem. The first line contains two space-separated integers n, q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7106), where ai represent the value of node i. Each of the next n xe2 x80 x89- xe2 x80 x891 lines contains two integers xi and yi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; xi xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89yi), denoting the edge of the tree between vertices xi and yi. Each of the next q lines contains a query in the format that is given above. For each query the following inequalities hold: 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89v xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n and 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89w xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7106. Note that: there are no more than 50 queries that changes the value of a vertex. For each query of the first type output the result of the query. gcd(x, xe2 x80 x89y) is greatest common divisor of two integers x and y.'...

Tutorials

CF 264 Div 2 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10564226 AHTuTTuTyX E April 3, 2015, 8:43 p.m. OK Delphi TESTS 51 889 66764800 2400
11567304 igdor99 E June 13, 2015, 11:34 a.m. OK FPC TESTS 51 1590 6041600 2400
24540044 tungtinhoctre126 E Feb. 9, 2017, 3:01 a.m. OK FPC TESTS 51 2074 114995200 2400
9603912 wangyurzee7 E Jan. 28, 2015, 2:34 p.m. OK FPC TESTS 51 6130 45772800 2400
40988038 ReaLNero1 E July 30, 2018, 9:42 p.m. OK GNU C++ TESTS 51 202 40652800 2400
12324641 nguyenvu9405 E Aug. 3, 2015, 10:32 a.m. OK GNU C++ TESTS 51 327 50892800 2400
14572583 hiThere23 E Nov. 30, 2015, 3:17 p.m. OK GNU C++ TESTS 51 545 32051200 2400
13246184 kkksc03 E Sept. 27, 2015, 8:14 a.m. OK GNU C++ TESTS 51 920 21708800 2400
13139823 HJWJBSR E Sept. 22, 2015, 11:42 a.m. OK GNU C++ TESTS 51 935 92160000 2400
13926850 130705009 E Oct. 29, 2015, 4:52 a.m. OK GNU C++ TESTS 51 982 8396800 2400
17399430 vjudge4 E April 20, 2016, 12:44 p.m. OK GNU C++ TESTS 51 1014 8089600 2400
9438486 ParsaT E Jan. 15, 2015, 6:54 p.m. OK GNU C++ TESTS 51 1138 52940800 2400
10863612 K_D_M E April 25, 2015, 7:25 p.m. OK GNU C++ TESTS 51 1185 10444800 2400
11726759 afc_03 E June 23, 2015, 5:40 p.m. OK GNU C++ TESTS 51 1248 8396800 2400
9397829 hkglly E Jan. 10, 2015, 2:13 p.m. OK GNU C++0x TESTS 51 405 13414400 2400
9744080 No_Use_Anymore E Feb. 7, 2015, 10:58 a.m. OK GNU C++0x TESTS 51 935 6041600 2400
9623818 kblack E Jan. 30, 2015, 8:35 a.m. OK GNU C++0x TESTS 51 1450 3584000 2400
9623763 Subconscious E Jan. 30, 2015, 8:29 a.m. OK GNU C++0x TESTS 51 1450 3584000 2400
9662350 sherlock_holms E Feb. 1, 2015, 7:01 a.m. OK GNU C++0x TESTS 51 1544 8806400 2400
10095871 nitrousoxide E March 1, 2015, 12:22 p.m. OK GNU C++0x TESTS 51 1544 25600000 2400
10012005 itytwt E Feb. 25, 2015, 2:14 a.m. OK GNU C++0x TESTS 51 2839 79155200 2400
9292923 kefaa E Dec. 28, 2014, 4:51 p.m. OK GNU C++0x TESTS 51 2917 154419200 2400
10139738 zlzmsrhak E March 4, 2015, 1:49 a.m. OK GNU C++0x TESTS 51 4274 218931200 2400
9870613 cr.rusucosmin E Feb. 16, 2015, 11:54 a.m. OK GNU C++0x TESTS 51 9999 23449600 2400
61292416 rainboy E Sept. 25, 2019, 9:40 p.m. OK GNU C11 TESTS 51 1201 88576000 2400
12353184 Archer_C E Aug. 5, 2015, 3:40 p.m. OK GNU C11 TESTS 51 1840 3584000 2400
11826236 last_one E June 28, 2015, 4:50 p.m. OK GNU C++11 TESTS 51 265 43724800 2400
11134696 darry140 E May 18, 2015, 12:28 p.m. OK GNU C++11 TESTS 51 358 47513600 2400
15178821 heheniyilian E Jan. 4, 2016, 8:34 a.m. OK GNU C++11 TESTS 51 389 12492800 2400
15178841 heheniyilian E Jan. 4, 2016, 8:37 a.m. OK GNU C++11 TESTS 51 420 12492800 2400
11020393 Kmcode E May 7, 2015, 12:01 p.m. OK GNU C++11 TESTS 51 451 32972800 2400
11134740 darry140 E May 18, 2015, 12:33 p.m. OK GNU C++11 TESTS 51 467 47923200 2400
12576647 huantwofat E Aug. 17, 2015, 2:36 p.m. OK GNU C++11 TESTS 51 530 46489600 2400
56371137 xgzc E July 1, 2019, 3:42 a.m. OK GNU C++11 TESTS 51 779 6860800 2400
56375130 vjudge5 E July 1, 2019, 6:12 a.m. OK GNU C++11 TESTS 51 779 6860800 2400
11455186 LivelpoolFC_is_my_heart E June 6, 2015, 6:46 a.m. OK GNU C++11 TESTS 51 780 62566400 2400
37575619 rawatds E April 24, 2018, 2:32 p.m. OK GNU C++14 TESTS 51 405 64512000 2400
51455707 luowentao E March 18, 2019, 4:58 p.m. OK GNU C++14 TESTS 51 452 12185600 2400
36682050 Jeffrey E March 28, 2018, 2:44 a.m. OK GNU C++14 TESTS 51 545 12697600 2400
23524823 Ali.Pi E Jan. 3, 2017, 9:40 p.m. OK GNU C++14 TESTS 51 608 87859200 2400
32855994 Big_black_jujube E Dec. 2, 2017, 11:16 a.m. OK GNU C++14 TESTS 51 670 14745600 2400
39586590 shivsharmastr E June 24, 2018, 2:11 a.m. OK GNU C++14 TESTS 51 967 8601600 2400
21509111 _Saitama_ E Oct. 17, 2016, 12:50 a.m. OK GNU C++14 TESTS 51 982 10444800 2400
35907182 Zxyelf E March 4, 2018, 5:09 a.m. OK GNU C++14 TESTS 51 1029 73318400 2400
27952931 Vicennial E June 21, 2017, 9:08 p.m. OK GNU C++14 TESTS 51 1169 17715200 2400
67672699 hemant1729 E Dec. 26, 2019, 9:43 p.m. OK GNU C++14 TESTS 51 1309 46796800 2400
60575808 senthil28 E Sept. 14, 2019, 4:39 p.m. OK GNU C++17 TESTS 51 483 14540800 2400
56305676 vjudge2 E June 30, 2019, 11:40 a.m. OK GNU C++17 TESTS 51 842 8601600 2400
69881843 MrRotex E Jan. 31, 2020, 6:39 a.m. OK GNU C++17 TESTS 51 1387 50790400 2400
51435600 SnowLove E March 18, 2019, 6:09 a.m. OK GNU C++17 TESTS 51 1450 3584000 2400
54442606 hongzhiyin E May 21, 2019, 9:30 a.m. OK GNU C++17 TESTS 51 1466 26624000 2400
46896514 roll_no_1 E Dec. 11, 2018, 9:33 a.m. OK GNU C++17 TESTS 51 1668 106803200 2400
60365680 Phortox E Sept. 10, 2019, 8:42 p.m. OK GNU C++17 TESTS 51 1746 35635200 2400
69734731 DimmyT E Jan. 29, 2020, 2:20 p.m. OK GNU C++17 TESTS 51 1746 180326400 2400
45507381 shado_w E Nov. 10, 2018, 11:19 a.m. OK GNU C++17 TESTS 51 1747 36454400 2400
52027490 ivan100sic E March 30, 2019, 3:42 p.m. OK GNU C++17 TESTS 51 1809 48435200 2400
13258274 alibaba E Sept. 28, 2015, 6:49 a.m. OK Java 7 TESTS 51 858 91955200 2400
9093443 sweiss E Dec. 12, 2014, 4:31 p.m. OK Java 7 TESTS 51 1154 177254400 2400
10924977 OmniSliver E April 29, 2015, 4:42 a.m. OK Java 7 TESTS 51 1669 58163200 2400
14335048 Sumeet.Varma E Nov. 18, 2015, 11:48 p.m. OK Java 7 TESTS 51 4290 69836800 2400
10924941 OmniSliver E April 29, 2015, 4:32 a.m. OK Java 7 TESTS 51 6817 58265600 2400
9740938 stan E Feb. 6, 2015, 11:30 p.m. OK Java 8 TESTS 51 576 71680000 2400
31237364 coderbond007 E Oct. 12, 2017, 10:02 a.m. OK Java 8 TESTS 51 1574 0 2400
39538482 ViciousCoder E June 23, 2018, 10:24 a.m. OK Java 8 TESTS 51 2526 57344000 2400
61292415 Dukkha E Sept. 25, 2019, 9:40 p.m. OK Java 8 TESTS 51 2683 175411200 2400
15141587 HappyNewYearMike E Dec. 31, 2015, 9:41 p.m. OK Java 8 TESTS 51 3134 67072000 2400
14335044 Sumeet.Varma E Nov. 18, 2015, 11:48 p.m. OK Java 8 TESTS 51 3977 67072000 2400
14335021 Sumeet.Varma E Nov. 18, 2015, 11:42 p.m. OK Java 8 TESTS 51 5100 180940800 2400
31237414 coderbond007 E Oct. 12, 2017, 10:05 a.m. OK Java 8 TESTS 51 5459 141721600 2400
14582245 ilyoan E Dec. 1, 2015, 10:19 a.m. OK Java 8 TESTS 51 5615 140595200 2400
33843956 Kharouba E Jan. 1, 2018, 8:51 a.m. OK Java 8 TESTS 51 6458 234291200 2400
12901652 NVAL E Sept. 8, 2015, 6:11 p.m. OK MS C++ TESTS 51 2480 28467200 2400
12021762 AU.Bahosain E July 12, 2015, 5:46 p.m. OK MS C++ TESTS 51 2776 65433600 2400
12021731 AU.Bahosain E July 12, 2015, 5:42 p.m. OK MS C++ TESTS 51 3275 65433600 2400
12261639 vjudge3 E July 29, 2015, 8:08 a.m. OK MS C++ TESTS 51 3603 117657600 2400
12264905 sister_what_hate_most E July 29, 2015, 1:10 p.m. OK MS C++ TESTS 51 3868 117555200 2400
18514951 Denisson E June 16, 2016, 7:51 a.m. OK MS C++ TESTS 51 4368 114585600 2400
10220101 Auster E March 9, 2015, 5:39 p.m. OK MS C++ TESTS 51 8330 151654400 2400
11325387 dr.ikros E May 27, 2015, 8:17 p.m. OK PyPy 2 TESTS 51 5038 186060800 2400
11325368 dr.ikros E May 27, 2015, 8:14 p.m. OK PyPy 3 TESTS 51 5568 208281600 2400

remove filters

Back to search problems