Codeforces Round 453 (Div. 1)

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
901 Codeforces Round 453 (Div. 1) FINISHED False 7200 223827923 Dec. 19, 2017, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 88 ) E Cyclic Cipher PROGRAMMING fft math 3300

B"Senor Vorpal Kickass'o invented an innovative method to encrypt integer sequences of length n. To encrypt a sequence, one has to choose a secret sequence , that acts as a key. Vorpal is very selective, so the key should be such a sequence bi, that its cyclic shifts are linearly independent, that is, there is no non-zero set of coefficients x0, xe2 x80 x89x1, xe2 x80 x89..., xe2 x80 x89xn xe2 x80 x89- xe2 x80 x891, such that for all k at the same time. After that for a sequence you should build the following cipher: In other words, you are to compute the quadratic deviation between each cyclic shift of bi and the sequence ai. The resulting sequence is the Kickass's cipher. The cipher is in development right now and Vorpal wants to decipher a sequence after it has been encrypted. You are to solve this problem for him. You are given sequences ci and bi. You are to find all suitable sequences ai. The first line contains a single integer n (). The second line contains n integers b0, xe2 x80 x89b1, xe2 x80 x89..., xe2 x80 x89bn xe2 x80 x89- xe2 x80 x891 (). The third line contains n integers c0, xe2 x80 x89c1, xe2 x80 x89..., xe2 x80 x89cn xe2 x80 x89- xe2 x80 x891 (). It is guaranteed that all cyclic shifts of sequence bi are linearly independent. In the first line print a single integer k -- the number of sequences ai, such that after encrypting them with key bi you get the sequence ci. After that in each of k next lines print n integers a0, xe2 x80 x89a1, xe2 x80 x89..., xe2 x80 x89an xe2 x80 x89- xe2 x80 x891. Print the sequences in lexicographical order. Note that k could be equal to 0. "...

Tutorials

Codeforces Round #453 (Div. 1 & Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53304958 alonefight E April 26, 2019, 1:51 a.m. OK GNU C++11 TESTS 70 1216 60108800 3300
36988410 FizzyDavid E April 5, 2018, 5:21 a.m. OK GNU C++11 TESTS 70 1216 83456000 3300
33759468 krijgertje E Dec. 29, 2017, 12:26 p.m. OK GNU C++11 TESTS 70 1263 17920000 3300
34065981 matthew99 E Jan. 10, 2018, 9:45 a.m. OK GNU C++11 TESTS 70 1482 24166400 3300
34838028 Georgia_001 E Feb. 2, 2018, 12:37 p.m. OK GNU C++11 TESTS 70 1637 112640000 3300
33467823 rxdoi E Dec. 20, 2017, 11:47 p.m. OK GNU C++11 TESTS 70 1637 112640000 3300
33822588 Hank2006 E Dec. 30, 2017, 11:40 p.m. OK GNU C++11 TESTS 70 1653 112640000 3300
57872184 lopare E July 28, 2019, 2:39 a.m. OK GNU C++11 TESTS 70 2152 23552000 3300
57768432 py_ultron E July 25, 2019, 10:21 p.m. OK GNU C++11 TESTS 70 2261 23552000 3300
33458270 rxdoi E Dec. 20, 2017, 2:31 p.m. OK GNU C++11 TESTS 70 2838 112640000 3300
59832611 Scut82 E Sept. 1, 2019, 12:57 a.m. OK GNU C++14 TESTS 70 639 38912000 3300
37594618 Troywar E April 25, 2018, 11:14 a.m. OK GNU C++14 TESTS 70 1466 56524800 3300
37594682 Troywar E April 25, 2018, 11:17 a.m. OK GNU C++14 TESTS 70 1575 56524800 3300
33828322 nicecoder37 E Dec. 31, 2017, 9:16 a.m. OK GNU C++14 TESTS 70 1668 112537600 3300
33657000 Ali_P E Dec. 26, 2017, 8:21 p.m. OK GNU C++14 TESTS 70 1668 112537600 3300
34734988 andronos E Jan. 31, 2018, 11:17 a.m. OK GNU C++14 TESTS 70 1669 112537600 3300
34177964 ABDbek E Jan. 14, 2018, 2:48 p.m. OK GNU C++14 TESTS 70 1669 112537600 3300
34295279 jslijin E Jan. 19, 2018, 7:32 a.m. OK GNU C++14 TESTS 70 1700 152166400 3300
34295707 jslijin E Jan. 19, 2018, 7:50 a.m. OK GNU C++14 TESTS 70 1793 152166400 3300
37598689 handsomeIvan E April 25, 2018, 1:32 p.m. OK GNU C++14 TESTS 70 2589 26931200 3300
63687024 xgcxgc E Oct. 28, 2019, 11:25 p.m. OK GNU C++17 TESTS 70 935 17920000 3300
69652089 gongsuidashen E Jan. 28, 2020, 5:47 a.m. OK GNU C++17 TESTS 70 1528 110592000 3300
63780866 AryssonFigueiredo E Oct. 30, 2019, 10:59 a.m. OK GNU C++17 TESTS 70 1575 42598400 3300
63756899 AryssonFigueiredo E Oct. 30, 2019, 12:16 a.m. OK GNU C++17 TESTS 70 1606 42598400 3300
57465257 Benq E July 21, 2019, 3:19 p.m. OK GNU C++17 TESTS 70 1902 54067200 3300
62612027 I_love_motos E Oct. 15, 2019, 10:09 a.m. OK GNU C++17 TESTS 70 1964 54067200 3300
63874928 AryssonFigueiredo E Oct. 30, 2019, 6:40 p.m. OK GNU C++17 TESTS 70 2011 52838400 3300
63875831 AryssonFigueiredo E Oct. 30, 2019, 6:58 p.m. OK GNU C++17 TESTS 70 2027 52531200 3300
63875341 AryssonFigueiredo E Oct. 30, 2019, 6:49 p.m. OK GNU C++17 TESTS 70 2043 52838400 3300
63874844 AryssonFigueiredo E Oct. 30, 2019, 6:39 p.m. OK GNU C++17 TESTS 70 2043 52838400 3300
62595138 I_love_motos E Oct. 15, 2019, 1:04 a.m. OK Java 8 TESTS 70 794 82227200 3300
40978873 ReaLNero1 E July 30, 2018, 4:50 p.m. OK Java 8 TESTS 70 920 96972800 3300
36732651 mmaxio E March 29, 2018, 8:20 p.m. OK Java 8 TESTS 70 951 119705600 3300
33467694 mmaxio E Dec. 20, 2017, 11:27 p.m. OK Java 8 TESTS 70 1029 148480000 3300

remove filters

Back to search problems