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 |
---|---|---|---|---|---|---|
1276 | Codeforces Round 606 (Div. 1, based on Technocup 2020 Elimination Round 4) | FINISHED | False | 7200 | 155501699 | Dec. 14, 2019, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 90 ) | E | Four Stones | PROGRAMMING | constructive algorithms | 3400 |
B'There are four stones on an infinite line in integer coordinates a_1, a_2, a_3, a_4 . The goal is to have the stones in coordinates b_1, b_2, b_3, b_4 . The order of the stones does not matter, that is, a stone from any position a_i can end up in at any position b_j , provided there is a required number of stones in each position (that is, if a coordinate x appears k times among numbers b_1, ldots, b_4 , there should be exactly k stones at x in the end). We are allowed to move stones with the following operation: choose two stones at distinct positions x and y with at least one stone each, and move one stone from x to 2y - x . In other words, the operation moves a stone to a symmetric position relative to some other stone. At any moment it is allowed to have any number of stones at the same position. Find any sequence of operations that achieves the goal, or determine that it is impossible. The sequence does not have to be shortest, but it may contain at most 1000 operations. The first line contains four integers a_1, ldots, a_4 ( -10^9 <= q a_i <= q 10^9 ) -- initial coordinates of the stones. There may be multiple stones sharing the same coordinate. The second line contains four integers b_1, ldots, b_4 ( -10^9 <= q b_i <= q 10^9 ) -- target coordinates of the stones. There may be multiple targets sharing the same coordinate. If there is no sequence of operations that achieves the goal, print a single integer -1 . Otherwise, on the first line print a single integer k ( 0 <= q k <= q 1000 ) -- the number of operations in your sequence. On the next k lines, describe the operations. The i -th of these lines should contain two integers x_i and y_i ( x_i neq y_i ) -- coordinates of the moved stone and the center of symmetry stone for the i -th operation. For each operation i , there should at least '... |
Technocup 2020 — Elimination Round 4 + Codeforces Round 606: Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
68494911 | zx2003 | E | Jan. 10, 2020, 1:05 p.m. | OK | GNU C++11 | TESTS | 26 | 15 | 0 | 3400 | |
67455260 | WZYYN | E | Dec. 23, 2019, 6:34 a.m. | OK | GNU C++11 | TESTS | 26 | 31 | 0 | 3400 | |
67417218 | yyf0309 | E | Dec. 22, 2019, 10:21 a.m. | OK | GNU C++11 | TESTS | 26 | 31 | 0 | 3400 | |
67949839 | yasugongshang | E | Dec. 30, 2019, 7:09 a.m. | OK | GNU C++14 | TESTS | 26 | 30 | 0 | 3400 | |
66985284 | SAAD | E | Dec. 15, 2019, 5:52 p.m. | OK | GNU C++14 | TESTS | 21 | 30 | 102400 | 3400 | |
68101771 | lzoiexplorer2004 | E | Jan. 3, 2020, 3:49 a.m. | OK | GNU C++14 | TESTS | 26 | 31 | 0 | 3400 | |
67130624 | Benq | E | Dec. 17, 2019, 11:36 p.m. | OK | GNU C++14 | TESTS | 23 | 31 | 204800 | 3400 | |
67749212 | Motarack | E | Dec. 27, 2019, 5:20 p.m. | OK | GNU C++14 | TESTS | 26 | 46 | 0 | 3400 | |
66880803 | ksun48 | E | Dec. 14, 2019, 4:29 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 102400 | 3400 | |
69454735 | gongsuidashen | E | Jan. 24, 2020, 8:03 a.m. | OK | GNU C++17 | TESTS | 26 | 31 | 0 | 3400 | |
68674666 | Shayan.P | E | Jan. 12, 2020, 6:06 p.m. | OK | GNU C++17 | TESTS | 26 | 31 | 0 | 3400 | |
67479208 | Nakagawa.Kanon | E | Dec. 23, 2019, 3:25 p.m. | OK | GNU C++17 | TESTS | 26 | 31 | 0 | 3400 | |
67443406 | paulica | E | Dec. 22, 2019, 8:31 p.m. | OK | GNU C++17 | TESTS | 26 | 31 | 0 | 3400 | |
67392598 | amethyst0 | E | Dec. 21, 2019, 8:36 p.m. | OK | GNU C++17 | TESTS | 26 | 31 | 0 | 3400 | |
67190434 | aid | E | Dec. 19, 2019, 6:50 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 0 | 3400 | |
67147470 | RNS_CUS | E | Dec. 18, 2019, 9:26 a.m. | OK | GNU C++17 | TESTS | 23 | 31 | 0 | 3400 | |
66896224 | user202729_ | E | Dec. 15, 2019, 1:58 a.m. | OK | GNU C++17 | TESTS | 20 | 31 | 0 | 3400 | |
66880634 | ksun48 | E | Dec. 14, 2019, 4:25 p.m. | OK | GNU C++17 | TESTS | 20 | 46 | 0 | 3400 | |
67939858 | Isomorphism | E | Dec. 29, 2019, 11:21 p.m. | OK | Python 3 | TESTS | 26 | 124 | 307200 | 3400 |
Back to search problems