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 |
---|---|---|---|---|---|---|
457 | MemSQL Start[c]UP 2.0 - Round 2 | FINISHED | False | 10800 | 329922004 | Aug. 10, 2014, 5 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 109 ) | F | An easy problem about trees | PROGRAMMING | dp games greedy trees | 3000 |
B'Pieguy and Piegirl are playing a game. They have a rooted binary tree, that has a property that each node is either a leaf or has exactly two children. Each leaf has a number associated with it. On his/her turn a player can choose any two leafs that share their immediate parent, remove them, and associate either of their values with their parent, that now became a leaf (the player decides which of the two values to associate). The game ends when only one node (the one that was the root of the tree) is left. Pieguy goes first, and his goal is to maximize the value that will be associated with the root when the game ends. Piegirl wants to minimize that value. Assuming that both players are playing optimally, what number will be associated with the root when the game ends? First line contains a single integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- number of test cases. Then t test cases follow. Each test case begins with an empty line, followed by a line with a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89250), followed by n lines describing n nodes of the tree. Each of those n lines either contains a non-negative number ai, indicating a leaf node with value ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) associated with it, or xe2 x80 x89- xe2 x80 x891 followed by integers l and r, indicating a non-leaf node with children l and r (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l, xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89- xe2 x80 x891). Nodes are numbered from 0 to n xe2 x80 x89- xe2 x80 x891. The root is always node 0. For each test case print one line with one integer on it -- the number that will be associated with the root when the game ends.'... |
MemSQL Start[c]UP 2.0 Round 1 and 2 Editorials |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
16304188 | vjudge2 | F | Feb. 24, 2016, 7:01 a.m. | OK | GNU C++ | TESTS | 129 | 15 | 0 | 3000 | |
25566799 | yhy | F | March 17, 2017, 8:08 a.m. | OK | GNU C++ | TESTS | 129 | 15 | 1945600 | 3000 | |
35767274 | Maniac_Wallnut | F | Feb. 27, 2018, 3:25 p.m. | OK | GNU C++ | TESTS | 129 | 15 | 2048000 | 3000 | |
16308387 | jiaqiyang | F | Feb. 24, 2016, 12:22 p.m. | OK | GNU C++ | TESTS | 129 | 30 | 0 | 3000 | |
16304845 | jiaqiyang | F | Feb. 24, 2016, 7:57 a.m. | OK | GNU C++ | TESTS | 129 | 30 | 0 | 3000 | |
9441620 | suxrib | F | Jan. 16, 2015, 8:47 a.m. | OK | GNU C++ | TESTS | 129 | 30 | 0 | 3000 | |
25500021 | shuaige123 | F | March 15, 2017, 1:55 p.m. | OK | GNU C++ | TESTS | 129 | 30 | 2150400 | 3000 | |
40988124 | ReaLNero1 | F | July 30, 2018, 9:45 p.m. | OK | GNU C++ | TESTS | 129 | 31 | 0 | 3000 | |
16304167 | vjudge4 | F | Feb. 24, 2016, 6:59 a.m. | OK | GNU C++ | TESTS | 129 | 31 | 0 | 3000 | |
10182984 | BestTrollEver | F | March 6, 2015, 8:47 p.m. | OK | GNU C++ | TESTS | 129 | 31 | 0 | 3000 | |
10021180 | misterfourtytwo | F | Feb. 25, 2015, 2:48 p.m. | OK | GNU C++0x | TESTS | 129 | 30 | 0 | 3000 | |
7687485 | Marcin_smu | F | Sept. 5, 2014, 10:42 a.m. | OK | GNU C++0x | TESTS | 129 | 30 | 0 | 3000 | |
10228577 | Franklyn_W | F | March 10, 2015, 4:23 p.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
8701754 | _NM | F | Nov. 15, 2014, 10:46 a.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
8106400 | konstantanter | F | Oct. 6, 2014, 1:21 p.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
8106375 | konstantanter | F | Oct. 6, 2014, 1:18 p.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
8106362 | vjudge4 | F | Oct. 6, 2014, 1:17 p.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
7687762 | konstantanter | F | Sept. 5, 2014, 11:53 a.m. | OK | GNU C++0x | TESTS | 129 | 31 | 0 | 3000 | |
25341955 | lizhidan | F | March 8, 2017, 1:19 p.m. | OK | GNU C++11 | TESTS | 129 | 15 | 2150400 | 3000 | |
15330687 | ilia12345 | F | Jan. 13, 2016, 12:34 p.m. | OK | GNU C++11 | TESTS | 129 | 30 | 0 | 3000 | |
14696714 | Grizzly.Bear | F | Dec. 8, 2015, 10:53 a.m. | OK | GNU C++11 | TESTS | 129 | 30 | 0 | 3000 | |
14341671 | giorgu.jaiani | F | Nov. 19, 2015, 12:32 p.m. | OK | GNU C++11 | TESTS | 129 | 30 | 0 | 3000 | |
57889055 | lopare | F | July 28, 2019, 11:08 a.m. | OK | GNU C++11 | TESTS | 129 | 31 | 0 | 3000 | |
13138334 | Afrouz_Jabal | F | Sept. 22, 2015, 9:50 a.m. | OK | GNU C++11 | TESTS | 129 | 31 | 0 | 3000 | |
43176958 | sagitta_luminis | F | Sept. 21, 2018, 11:50 a.m. | OK | GNU C++11 | TESTS | 129 | 31 | 6758400 | 3000 | |
59907865 | 2016wudi | F | Sept. 2, 2019, 4:04 p.m. | OK | GNU C++11 | TESTS | 129 | 46 | 0 | 3000 | |
57819081 | py_ultron | F | July 26, 2019, 9:38 p.m. | OK | GNU C++11 | TESTS | 129 | 46 | 0 | 3000 | |
41008351 | zhouyuyang | F | July 31, 2018, 11:12 a.m. | OK | GNU C++11 | TESTS | 129 | 46 | 0 | 3000 | |
35873582 | ______u______ | F | March 3, 2018, 7:34 a.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35873330 | ______n______ | F | March 3, 2018, 7:28 a.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35872736 | _____k_____ | F | March 3, 2018, 7:16 a.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35872699 | _____i_____ | F | March 3, 2018, 7:16 a.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35863704 | ______k______ | F | March 2, 2018, 10:52 p.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35863683 | ______h______ | F | March 2, 2018, 10:52 p.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35863183 | ______i______ | F | March 2, 2018, 10:40 p.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
35861684 | ______M______ | F | March 2, 2018, 10:09 p.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1843200 | 3000 | |
25566717 | yhy | F | March 17, 2017, 8:02 a.m. | OK | GNU C++14 | TESTS | 129 | 31 | 1945600 | 3000 | |
59795205 | cz_xuyixuan | F | Aug. 31, 2019, 8:26 a.m. | OK | GNU C++14 | TESTS | 129 | 46 | 0 | 3000 | |
60741366 | Benq | F | Sept. 17, 2019, 8:22 p.m. | OK | GNU C++17 | TESTS | 129 | 31 | 0 | 3000 |
Back to search problems