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 |
---|---|---|---|---|---|---|
1225 | Technocup 2020 - Elimination Round 2 | FINISHED | False | 7200 | 165351287 | Oct. 26, 2019, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 579 ) | G | To Make 1 | PROGRAMMING | bitmasks constructive algorithms dp greedy number theory | #69445515 | 3000 |
B'There are n positive integers written on the blackboard. Also, a positive number k geq 2 is chosen, and none of the numbers on the blackboard are divisible by k . In one operation, you can choose any two integers x and y , erase them and write one extra number f(x + y) , where f(x) is equal to x if x is not divisible by k , otherwise f(x) = f(x / k) . In the end, there will be a single number of the blackboard. Is it possible to make the final number equal to 1 ? If so, restore any sequence of operations to do so. The first line contains two integers n and k -- the initial number of integers on the blackboard, and the chosen number ( 2 <= q n <= q 16 , 2 <= q k <= q 2000 ). The second line contains n positive integers a_1, ldots, a_n initially written on the blackboard. It is guaranteed that none of the numbers a_i is divisible by k , and the sum of all a_i does not exceed 2000 . If it is impossible to obtain 1 as the final number, print "NO" in the only line. Otherwise, print "YES" on the first line, followed by n - 1 lines describing operations. The i -th of these lines has to contain two integers x_i and y_i to be erased and replaced with f(x_i + y_i) on the i -th operation. If there are several suitable ways, output any of them. In the second sample case: '... |
70898 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
64260496 | BeNoble | G | Nov. 4, 2019, 4:29 p.m. | OK | GNU C++11 | TESTS | 28 | 124 | 16588800 | 3000 | |
69905070 | Shiina_Mashiro19 | G | Jan. 31, 2020, 1:56 p.m. | OK | GNU C++11 | TESTS | 28 | 139 | 16691200 | 3000 | |
64226915 | BeNoble | G | Nov. 4, 2019, 1:50 p.m. | OK | GNU C++11 | TESTS | 28 | 139 | 17305600 | 3000 | |
69876007 | luogu_bot2 | G | Jan. 31, 2020, 4:03 a.m. | OK | GNU C++11 | TESTS | 28 | 140 | 16588800 | 3000 | |
68713366 | N-Zoth | G | Jan. 13, 2020, 1:40 p.m. | OK | GNU C++11 | TESTS | 28 | 140 | 16793600 | 3000 | |
64289430 | Dream-chasing_Juvenile | G | Nov. 5, 2019, 6:24 a.m. | OK | GNU C++11 | TESTS | 28 | 140 | 16793600 | 3000 | |
63992525 | Fister | G | Nov. 1, 2019, 1:35 p.m. | OK | GNU C++11 | TESTS | 28 | 140 | 16793600 | 3000 | |
65688308 | lzoiexplorer2004 | G | Nov. 25, 2019, 2:32 a.m. | OK | GNU C++11 | TESTS | 28 | 140 | 33689600 | 3000 | |
66523465 | ymz | G | Dec. 9, 2019, 2:06 a.m. | OK | GNU C++11 | TESTS | 28 | 155 | 16588800 | 3000 | |
64260224 | BeNoble | G | Nov. 4, 2019, 4:23 p.m. | OK | GNU C++11 | TESTS | 28 | 155 | 16588800 | 3000 | |
69565889 | iotang | G | Jan. 26, 2020, 12:24 p.m. | OK | GNU C++14 | TESTS | 28 | 139 | 16793600 | 3000 | |
69876050 | vjudge4 | G | Jan. 31, 2020, 4:05 a.m. | OK | GNU C++14 | TESTS | 28 | 140 | 16588800 | 3000 | |
69875995 | dsl2002 | G | Jan. 31, 2020, 4:03 a.m. | OK | GNU C++14 | TESTS | 28 | 140 | 16588800 | 3000 | |
64203763 | BeNoble | G | Nov. 4, 2019, 12:14 p.m. | OK | GNU C++14 | TESTS | 28 | 155 | 17305600 | 3000 | |
69445488 | HN-001 | G | Jan. 24, 2020, 2:29 a.m. | OK | GNU C++14 | TESTS | 28 | 187 | 16588800 | 3000 | |
65916147 | tmwilliamlin168 | G | Nov. 28, 2019, 2:39 p.m. | OK | GNU C++14 | TESTS | 28 | 295 | 16691200 | 3000 | |
69856046 | vjudge4 | G | Jan. 30, 2020, 4:59 p.m. | OK | GNU C++14 | TESTS | 28 | 405 | 16486400 | 3000 | |
63700383 | chenkuowen | G | Oct. 29, 2019, 7:07 a.m. | OK | GNU C++14 | TESTS | 28 | 577 | 205414400 | 3000 | |
69565912 | vjudge1 | G | Jan. 26, 2020, 12:25 p.m. | OK | GNU C++17 | TESTS | 28 | 124 | 16588800 | 3000 | |
69445512 | vjudge3 | G | Jan. 24, 2020, 2:30 a.m. | OK | GNU C++17 | TESTS | 28 | 171 | 16588800 | 3000 | |
63547698 | ffffxk | G | Oct. 27, 2019, 10:55 a.m. | OK | GNU C++17 | TESTS | 28 | 187 | 16588800 | 3000 | |
64331931 | seiko.iwasawa | G | Nov. 5, 2019, 7:44 p.m. | OK | GNU C++17 | TESTS | 28 | 187 | 16691200 | 3000 | |
66164121 | neal | G | Dec. 2, 2019, 6:35 a.m. | OK | GNU C++17 | TESTS | 28 | 265 | 16588800 | 3000 | |
63693360 | jiangly | G | Oct. 29, 2019, 4:06 a.m. | OK | GNU C++17 | TESTS | 28 | 296 | 16588800 | 3000 | |
66281211 | abc473848880 | G | Dec. 4, 2019, 5:19 p.m. | OK | GNU C++17 | TESTS | 28 | 358 | 281497600 | 3000 | |
66217319 | interestingLSY | G | Dec. 3, 2019, 9:30 a.m. | OK | GNU C++17 | TESTS | 28 | 421 | 18022400 | 3000 | |
66217347 | HatsuneMikuo | G | Dec. 3, 2019, 9:30 a.m. | OK | GNU C++17 | TESTS | 28 | 436 | 18022400 | 3000 | |
67594358 | wangxinbo | G | Dec. 25, 2019, 10:04 a.m. | OK | GNU C++17 | TESTS | 28 | 467 | 16588800 | 3000 |
Back to search problems