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 |
---|---|---|---|---|---|---|
444 | Codeforces Round 254 (Div. 1) | FINISHED | False | 7200 | 327171299 | July 6, 2014, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1069 ) | B | DZY Loves FFT | PROGRAMMING | probabilities | 2400 |
B"DZY loves Fast Fourier Transformation, and he enjoys using it. Fast Fourier Transformation is an algorithm used to calculate convolution. Specifically, if a, b and c are sequences with length n, which are indexed from 0 to n xe2 x80 x89- xe2 x80 x891, and We can calculate c fast using Fast Fourier Transformation. DZY made a little change on this formula. Now To make things easier, a is a permutation of integers from 1 to n, and b is a sequence only containing 0 and 1. Given a and b, DZY needs your help to calculate c. Because he is naughty, DZY provides a special way to get a and b. What you need is only three integers n, d, x. After getting them, use the code below to generate a and b. Operation x % y denotes remainder after division x by y. Function swap(x, y) swaps two values x and y. The only line of input contains three space-separated integers n, xe2 x80 x89d, xe2 x80 x89x (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100000; 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000000006). Because DZY is naughty, x can't be equal to 27777500. Output n lines, the i-th line should contain an integer ci xe2 x80 x89- xe2 x80 x891. In the first sample, a is [1 3 2], b is [1 0 0], so c0 xe2 x80 x89= xe2 x80 x89max(1 xc2 xb71) xe2 x80 x89= xe2 x80 x891, c1 xe2 x80 x89= xe2 x80 x89max(1 xc2 xb70, xe2 x80 x893 xc2 xb71) xe2 x80 x89= xe2 x80 x893, c2 xe2 x80 x89= xe2 x80 x89max(1 xc2 xb70, xe2 x80 x893 xc2 xb70, xe2 x80 x892 xc2 xb71) xe2 x80 x89= xe2 x80 x892. In the second sample, a is [2 1 4 5 3], b is [1 1 1 0 1]. In the third sample, a is [5 2 1 4 3], b is [1 1 1 1 0]."... |
Codeforces Round #254 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
7425482 | hos.lyric | B | Aug. 11, 2014, 9:10 a.m. | OK | D | TESTS | 68 | 171 | 3686400 | 2400 | |
7032495 | vilcheuski | B | July 6, 2014, 3:16 p.m. | OK | Delphi | TESTS | 68 | 904 | 4505600 | 2400 | |
7030025 | Alex_2oo8 | B | July 6, 2014, 2:32 p.m. | OK | FPC | TESTS | 68 | 374 | 1740800 | 2400 | |
7273550 | vjudge3 | B | July 28, 2014, 3:08 a.m. | OK | GNU C | TESTS | 68 | 124 | 1638400 | 2400 | |
7273539 | aa1jj54 | B | July 28, 2014, 3:07 a.m. | OK | GNU C | TESTS | 68 | 124 | 1638400 | 2400 | |
7816615 | cq_phqg | B | Sept. 17, 2014, 10:10 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 1638400 | 2400 | |
7036990 | kutengine | B | July 7, 2014, 3:02 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 1740800 | 2400 | |
7274684 | vjudge1 | B | July 28, 2014, 6:33 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 1945600 | 2400 | |
7039543 | kereo | B | July 7, 2014, 9:24 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 1945600 | 2400 | |
7027657 | foreseeable | B | July 6, 2014, 2:01 p.m. | OK | GNU C++ | TESTS | 68 | 46 | 2048000 | 2400 | |
42072969 | Scut82 | B | Aug. 25, 2018, 2:27 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 3072000 | 2400 | |
7035255 | Maxim | B | July 6, 2014, 8:09 p.m. | OK | GNU C++ | TESTS | 68 | 46 | 3174400 | 2400 | |
7035238 | Maxim | B | July 6, 2014, 8:03 p.m. | OK | GNU C++ | TESTS | 68 | 46 | 3174400 | 2400 | |
19924787 | SoiMae | B | Aug. 17, 2016, 10:34 a.m. | OK | GNU C++ | TESTS | 68 | 46 | 3686400 | 2400 | |
28005431 | Scut82 | B | June 24, 2017, 12:47 p.m. | OK | GNU C++ | TESTS | 68 | 46 | 4300800 | 2400 | |
7035262 | yakitori | B | July 6, 2014, 8:13 p.m. | OK | GNU C++0x | TESTS | 68 | 46 | 1536000 | 2400 | |
7026894 | andreihh | B | July 6, 2014, 1:52 p.m. | OK | GNU C++0x | TESTS | 68 | 61 | 2252800 | 2400 | |
8215802 | zhj | B | Oct. 13, 2014, 8:31 a.m. | OK | GNU C++0x | TESTS | 68 | 62 | 2252800 | 2400 | |
7071938 | bill125 | B | July 13, 2014, 4:20 a.m. | OK | GNU C++0x | TESTS | 68 | 62 | 2662400 | 2400 | |
8871954 | anatolat | B | Nov. 27, 2014, 4:18 p.m. | OK | GNU C++0x | TESTS | 68 | 62 | 3174400 | 2400 | |
7110420 | __math | B | July 15, 2014, 3:36 p.m. | OK | GNU C++0x | TESTS | 68 | 62 | 3891200 | 2400 | |
7026184 | Arterm | B | July 6, 2014, 1:45 p.m. | OK | GNU C++0x | TESTS | 68 | 62 | 4812800 | 2400 | |
7094774 | Zuza | B | July 13, 2014, 10:18 p.m. | OK | GNU C++0x | TESTS | 68 | 77 | 2252800 | 2400 | |
9981056 | hnust_zhouchaoyuan | B | Feb. 24, 2015, 1:52 p.m. | OK | GNU C++0x | TESTS | 68 | 77 | 7987200 | 2400 | |
8933549 | niklasb | B | Dec. 2, 2014, 2:58 p.m. | OK | GNU C++0x | TESTS | 68 | 78 | 2252800 | 2400 | |
25870563 | rajat1603 | B | March 28, 2017, 10:26 a.m. | OK | GNU C++11 | TESTS | 68 | 61 | 3788800 | 2400 | |
25870524 | rajat1603 | B | March 28, 2017, 10:24 a.m. | OK | GNU C++11 | TESTS | 68 | 61 | 3788800 | 2400 | |
47359074 | RobeZH | B | Dec. 22, 2018, 7:44 a.m. | OK | GNU C++11 | TESTS | 68 | 62 | 2252800 | 2400 | |
48185824 | YaoBIG | B | Jan. 10, 2019, 2:59 p.m. | OK | GNU C++11 | TESTS | 68 | 62 | 2662400 | 2400 | |
22356416 | likecs | B | Nov. 20, 2016, 10:33 a.m. | OK | GNU C++11 | TESTS | 68 | 78 | 2252800 | 2400 | |
17297839 | darry140 | B | April 13, 2016, 5:42 a.m. | OK | GNU C++11 | TESTS | 68 | 78 | 2662400 | 2400 | |
11662280 | fqw | B | June 19, 2015, 5:49 a.m. | OK | GNU C++11 | TESTS | 68 | 78 | 2662400 | 2400 | |
11980023 | polequoll | B | July 9, 2015, 4:34 a.m. | OK | GNU C++11 | TESTS | 68 | 78 | 8601600 | 2400 | |
19183788 | Wanderflyle | B | July 17, 2016, 4:24 a.m. | OK | GNU C++11 | TESTS | 68 | 93 | 1638400 | 2400 | |
12585005 | carabet.cosmin | B | Aug. 18, 2015, 6:59 a.m. | OK | GNU C++11 | TESTS | 68 | 93 | 1843200 | 2400 | |
31192513 | FallDream | B | Oct. 10, 2017, 2:30 p.m. | OK | GNU C++14 | TESTS | 68 | 46 | 2764800 | 2400 | |
64659520 | alimagde | B | Nov. 10, 2019, 8:24 p.m. | OK | GNU C++14 | TESTS | 68 | 77 | 2662400 | 2400 | |
47619992 | nitishk24 | B | Dec. 28, 2018, 12:22 p.m. | OK | GNU C++14 | TESTS | 68 | 77 | 4300800 | 2400 | |
33809712 | Soroosh | B | Dec. 30, 2017, 1:06 p.m. | OK | GNU C++14 | TESTS | 68 | 77 | 4300800 | 2400 | |
39122363 | OmarHashim | B | June 10, 2018, 1:32 p.m. | OK | GNU C++14 | TESTS | 68 | 78 | 2662400 | 2400 | |
40453806 | Ahmed_Abdellah | B | July 16, 2018, 8:49 p.m. | OK | GNU C++14 | TESTS | 68 | 78 | 3481600 | 2400 | |
46672690 | KATATONIA | B | Dec. 6, 2018, 7:52 a.m. | OK | GNU C++14 | TESTS | 68 | 93 | 2252800 | 2400 | |
40453813 | Ahmed_Abdellah | B | July 16, 2018, 8:50 p.m. | OK | GNU C++14 | TESTS | 68 | 93 | 3481600 | 2400 | |
47526311 | Anachor | B | Dec. 26, 2018, 4:05 p.m. | OK | GNU C++14 | TESTS | 68 | 93 | 4198400 | 2400 | |
31495893 | boook | B | Oct. 19, 2017, 1:38 a.m. | OK | GNU C++14 | TESTS | 68 | 93 | 7065600 | 2400 | |
46417765 | m1sch3f | B | Nov. 30, 2018, 8:21 p.m. | OK | GNU C++17 | TESTS | 68 | 61 | 5427200 | 2400 | |
60451253 | HeRaNO | B | Sept. 12, 2019, 4:01 p.m. | OK | GNU C++17 | TESTS | 68 | 78 | 1638400 | 2400 | |
59374063 | benmirt | B | Aug. 23, 2019, 8:35 p.m. | OK | GNU C++17 | TESTS | 68 | 78 | 1945600 | 2400 | |
66782083 | yeeeet | B | Dec. 13, 2019, 12:23 p.m. | OK | GNU C++17 | TESTS | 68 | 78 | 13107200 | 2400 | |
59907911 | xzt220 | B | Sept. 2, 2019, 4:05 p.m. | OK | GNU C++17 | TESTS | 68 | 93 | 1638400 | 2400 | |
50561670 | nimphy | B | Feb. 27, 2019, 11:23 a.m. | OK | GNU C++17 | TESTS | 68 | 93 | 3993600 | 2400 | |
59068371 | ruo | B | Aug. 19, 2019, 3:09 a.m. | OK | GNU C++17 | TESTS | 68 | 108 | 2252800 | 2400 | |
50561653 | nimphy | B | Feb. 27, 2019, 11:23 a.m. | OK | GNU C++17 | TESTS | 68 | 108 | 3993600 | 2400 | |
50561839 | vjudge2 | B | Feb. 27, 2019, 11:29 a.m. | OK | GNU C++17 | TESTS | 68 | 109 | 3993600 | 2400 | |
58487204 | UnstoppableChillMachine | B | Aug. 9, 2019, 8:08 a.m. | OK | GNU C++17 | TESTS | 68 | 124 | 4812800 | 2400 | |
7111256 | ronaflx | B | July 15, 2014, 6:38 p.m. | OK | Go | TESTS | 68 | 343 | 24985600 | 2400 | |
7111261 | ronaflx | B | July 15, 2014, 6:38 p.m. | OK | Go | TESTS | 68 | 358 | 1331200 | 2400 | |
7031051 | Thomas_Ahle | B | July 6, 2014, 2:48 p.m. | OK | Go | TESTS | 68 | 452 | 2355200 | 2400 | |
7111267 | ronaflx | B | July 15, 2014, 6:39 p.m. | OK | Go | TESTS | 68 | 623 | 2560000 | 2400 | |
7034593 | cojna | B | July 6, 2014, 6:06 p.m. | OK | Haskell | TESTS | 68 | 592 | 2355200 | 2400 | |
7497466 | miguelmaurizio | B | Aug. 18, 2014, 4:44 a.m. | OK | Java 7 | TESTS | 68 | 140 | 1024000 | 2400 | |
7031645 | uwi | B | July 6, 2014, 2:57 p.m. | OK | Java 7 | TESTS | 68 | 171 | 0 | 2400 | |
7034998 | sugim48 | B | July 6, 2014, 7:13 p.m. | OK | Java 7 | TESTS | 68 | 311 | 102400 | 2400 | |
7102247 | owenomar | B | July 14, 2014, 3:44 p.m. | OK | Java 7 | TESTS | 68 | 326 | 102400 | 2400 | |
7040099 | qwerty787788 | B | July 7, 2014, 10:49 a.m. | OK | Java 7 | TESTS | 68 | 405 | 0 | 2400 | |
7040063 | qwerty787788 | B | July 7, 2014, 10:43 a.m. | OK | Java 7 | TESTS | 68 | 405 | 0 | 2400 | |
7440661 | Armenoid | B | Aug. 13, 2014, 8:52 a.m. | OK | Java 7 | TESTS | 68 | 436 | 0 | 2400 | |
7053852 | wadissimo | B | July 9, 2014, 2:56 p.m. | OK | Java 7 | TESTS | 68 | 436 | 0 | 2400 | |
7040075 | qwerty787788 | B | July 7, 2014, 10:46 a.m. | OK | Java 7 | TESTS | 68 | 436 | 0 | 2400 | |
15589349 | alibaba | B | Jan. 26, 2016, 8:33 a.m. | OK | Java 7 | TESTS | 68 | 483 | 4403200 | 2400 | |
14242890 | Sumeet.Varma | B | Nov. 13, 2015, 6:55 p.m. | OK | Java 8 | TESTS | 68 | 187 | 0 | 2400 | |
11439047 | old_arysson | B | June 5, 2015, 2:13 a.m. | OK | Java 8 | TESTS | 68 | 296 | 0 | 2400 | |
11438957 | Pimpom | B | June 5, 2015, 2:01 a.m. | OK | Java 8 | TESTS | 68 | 296 | 0 | 2400 | |
23490826 | sweiss | B | Jan. 1, 2017, 10:11 p.m. | OK | Java 8 | TESTS | 68 | 312 | 21504000 | 2400 | |
7497470 | miguelmaurizio | B | Aug. 18, 2014, 4:45 a.m. | OK | Java 8 | TESTS | 68 | 420 | 2355200 | 2400 | |
38314488 | Golmol | B | May 16, 2018, 8:47 a.m. | OK | Java 8 | TESTS | 68 | 421 | 20787200 | 2400 | |
7033188 | fetetriste | B | July 6, 2014, 3:41 p.m. | OK | Java 8 | TESTS | 68 | 483 | 2150400 | 2400 | |
7191183 | burger | B | July 21, 2014, 5:52 a.m. | OK | Java 8 | TESTS | 68 | 483 | 3481600 | 2400 | |
33008891 | alexrcoleman | B | Dec. 7, 2017, 7:29 p.m. | OK | Java 8 | TESTS | 68 | 514 | 20787200 | 2400 | |
12323195 | hama-du | B | Aug. 3, 2015, 8:28 a.m. | OK | Java 8 | TESTS | 68 | 623 | 0 | 2400 | |
7109690 | veckal | B | July 15, 2014, 2:01 p.m. | OK | MS C++ | TESTS | 68 | 62 | 2048000 | 2400 | |
7025666 | BalloonphiliaR | B | July 6, 2014, 1:40 p.m. | OK | MS C++ | TESTS | 68 | 62 | 2867200 | 2400 | |
7037370 | _TMB_ | B | July 7, 2014, 4:12 a.m. | OK | MS C++ | TESTS | 68 | 93 | 2662400 | 2400 | |
7037240 | I_dont_have_girlfriend | B | July 7, 2014, 3:45 a.m. | OK | MS C++ | TESTS | 68 | 93 | 2662400 | 2400 | |
7040493 | Lelby | B | July 7, 2014, 11:51 a.m. | OK | MS C++ | TESTS | 68 | 93 | 3788800 | 2400 | |
7040485 | Lelby | B | July 7, 2014, 11:51 a.m. | OK | MS C++ | TESTS | 68 | 93 | 3788800 | 2400 | |
7040487 | Lelby | B | July 7, 2014, 11:51 a.m. | OK | MS C++ | TESTS | 68 | 108 | 3788800 | 2400 | |
7033155 | fjm | B | July 6, 2014, 3:40 p.m. | OK | MS C++ | TESTS | 68 | 109 | 1638400 | 2400 | |
7040471 | Lelby | B | July 7, 2014, 11:49 a.m. | OK | MS C++ | TESTS | 68 | 155 | 3788800 | 2400 | |
7036660 | NUOUN | B | July 7, 2014, 2:09 a.m. | OK | MS C++ | TESTS | 68 | 156 | 3993600 | 2400 | |
7180167 | Darooha | B | July 19, 2014, 10:21 p.m. | OK | Ocaml | TESTS | 68 | 452 | 3174400 | 2400 |
Back to search problems