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 |
---|---|---|---|---|---|---|
840 | Codeforces Round 429 (Div. 1) | FINISHED | False | 7200 | 228754499 | Aug. 18, 2017, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1782 ) | C | On the Bench | PROGRAMMING | combinatorics dp | 2600 |
B'A year ago on the bench in public park Leha found an array of n numbers. Leha believes that permutation p is right if for all 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89< xe2 x80 x89n condition, that api xc2 xb7api xe2 x80 x89+ xe2 x80 x891 is not perfect square, holds. Leha wants to find number of right permutations modulo 109 xe2 x80 x89+ xe2 x80 x897. First line of input data contains single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89300) -- length of the array. Next line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89... , xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- found array. Output single integer -- number of right permutations modulo 109 xe2 x80 x89+ xe2 x80 x897. For first example: [1, xe2 x80 x892, xe2 x80 x894] -- right permutation, because 2 and 8 are not perfect squares. [1, xe2 x80 x894, xe2 x80 x892] -- wrong permutation, because 4 is square of 2. [2, xe2 x80 x891, xe2 x80 x894] -- wrong permutation, because 4 is square of 2. [2, xe2 x80 x894, xe2 x80 x891] -- wrong permutation, because 4 is square of 2. [4, xe2 x80 x891, xe2 x80 x892] -- wrong permutation, because 4 is square of 2. [4, xe2 x80 x892, xe2 x80 x891] -- right permutation, because 8 and 2 are not perfect squares. '... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
29639090 | Out_of_Cage | C | Aug. 21, 2017, 8:46 a.m. | OK | GNU C++ | TESTS | 103 | 15 | 409600 | 2600 | |
29589847 | newCEA | C | Aug. 19, 2017, 6:07 a.m. | OK | GNU C++ | TESTS | 103 | 15 | 1331200 | 2600 | |
29638961 | Out_of_Cage | C | Aug. 21, 2017, 8:39 a.m. | OK | GNU C++ | TESTS | 103 | 30 | 409600 | 2600 | |
29579952 | 1919810 | C | Aug. 18, 2017, 5:02 p.m. | OK | GNU C++ | TESTS | 103 | 31 | 0 | 2600 | |
29576039 | HbFS- | C | Aug. 18, 2017, 4:27 p.m. | OK | GNU C++ | TESTS | 103 | 31 | 102400 | 2600 | |
41139911 | JiangYutong | C | Aug. 3, 2018, 1:57 a.m. | OK | GNU C++ | TESTS | 103 | 31 | 409600 | 2600 | |
29682733 | gjghfd | C | Aug. 22, 2017, 12:38 p.m. | OK | GNU C++ | TESTS | 103 | 31 | 409600 | 2600 | |
29638943 | Out_of_Cage | C | Aug. 21, 2017, 8:38 a.m. | OK | GNU C++ | TESTS | 103 | 31 | 409600 | 2600 | |
29574612 | __W__ | C | Aug. 18, 2017, 4:16 p.m. | OK | GNU C++ | TESTS | 103 | 31 | 716800 | 2600 | |
29827112 | vjudge2 | C | Aug. 27, 2017, 1:09 p.m. | OK | GNU C++ | TESTS | 103 | 31 | 819200 | 2600 | |
29672697 | rajat1603 | C | Aug. 22, 2017, 3:21 a.m. | OK | GNU C++11 | TESTS | 103 | 15 | 0 | 2600 | |
29583529 | ftiasch | C | Aug. 18, 2017, 11:36 p.m. | OK | GNU C++11 | TESTS | 103 | 15 | 409600 | 2600 | |
29804307 | rqgao2014 | C | Aug. 26, 2017, 10:53 a.m. | OK | GNU C++11 | TESTS | 103 | 15 | 819200 | 2600 | |
34297643 | cyz666 | C | Jan. 19, 2018, 9:14 a.m. | OK | GNU C++11 | TESTS | 103 | 15 | 2969600 | 2600 | |
29596932 | Megumi_ | C | Aug. 19, 2017, 11:36 a.m. | OK | GNU C++11 | TESTS | 103 | 30 | 716800 | 2600 | |
29577530 | 248926 | C | Aug. 18, 2017, 4:39 p.m. | OK | GNU C++11 | TESTS | 103 | 30 | 27340800 | 2600 | |
64454982 | wh_bestwyj | C | Nov. 7, 2019, 8:26 a.m. | OK | GNU C++11 | TESTS | 103 | 31 | 204800 | 2600 | |
61974365 | ycdfwzy | C | Oct. 6, 2019, 10:04 a.m. | OK | GNU C++11 | TESTS | 103 | 31 | 204800 | 2600 | |
67057409 | atoiz | C | Dec. 17, 2019, 7:31 a.m. | OK | GNU C++11 | TESTS | 103 | 31 | 409600 | 2600 | |
63625713 | Vexoben | C | Oct. 28, 2019, 3:32 a.m. | OK | GNU C++11 | TESTS | 103 | 31 | 409600 | 2600 | |
29600777 | Kaban-5 | C | Aug. 19, 2017, 2:24 p.m. | OK | GNU C++14 | TESTS | 103 | 15 | 204800 | 2600 | |
29570074 | SmallBoy | C | Aug. 18, 2017, 3:50 p.m. | OK | GNU C++14 | TESTS | 103 | 15 | 6144000 | 2600 | |
29575088 | jtnydv25 | C | Aug. 18, 2017, 4:19 p.m. | OK | GNU C++14 | TESTS | 103 | 30 | 1024000 | 2600 | |
64191625 | idxcalcal | C | Nov. 4, 2019, 7:58 a.m. | OK | GNU C++14 | TESTS | 103 | 31 | 409600 | 2600 | |
29706497 | -Morass- | C | Aug. 23, 2017, 12:08 p.m. | OK | GNU C++14 | TESTS | 103 | 31 | 512000 | 2600 | |
29586258 | kiiiiii | C | Aug. 19, 2017, 2:46 a.m. | OK | GNU C++14 | TESTS | 103 | 31 | 512000 | 2600 | |
29590632 | namai | C | Aug. 19, 2017, 6:43 a.m. | OK | GNU C++14 | TESTS | 103 | 31 | 716800 | 2600 | |
29571887 | zeliboba | C | Aug. 18, 2017, 3:59 p.m. | OK | GNU C++14 | TESTS | 103 | 31 | 716800 | 2600 | |
29567872 | anta | C | Aug. 18, 2017, 3:40 p.m. | OK | GNU C++14 | TESTS | 103 | 31 | 716800 | 2600 | |
39007653 | cen | C | June 7, 2018, 3:11 a.m. | OK | GNU C++14 | TESTS | 103 | 31 | 819200 | 2600 | |
57448895 | square1001 | C | July 21, 2019, 9:04 a.m. | OK | GNU C++17 | TESTS | 103 | 31 | 204800 | 2600 | |
57444403 | vjudge2 | C | July 21, 2019, 7:46 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 204800 | 2600 | |
66086098 | ngfam | C | Dec. 1, 2019, 4:48 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 512000 | 2600 | |
44102061 | Toptree | C | Oct. 11, 2018, 6:31 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 614400 | 2600 | |
69655851 | Koosha_Mv | C | Jan. 28, 2020, 7:25 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 819200 | 2600 | |
44168492 | zjp_shadow | C | Oct. 12, 2018, 3:51 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 819200 | 2600 | |
44097731 | Toptree | C | Oct. 11, 2018, 2:58 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 819200 | 2600 | |
49939018 | yypurpose12345 | C | Feb. 15, 2019, 8:42 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 921600 | 2600 | |
59439900 | Alpha_2019 | C | Aug. 25, 2019, 10:43 a.m. | OK | GNU C++17 | TESTS | 103 | 46 | 1536000 | 2600 | |
53291701 | VEGAnn | C | April 25, 2019, 3:55 p.m. | OK | GNU C++17 | TESTS | 103 | 46 | 2252800 | 2600 | |
29597138 | uwi | C | Aug. 19, 2017, 11:45 a.m. | OK | Java 8 | TESTS | 103 | 140 | 0 | 2600 | |
35714110 | roberto_firmino | C | Feb. 25, 2018, 10:05 p.m. | OK | Java 8 | TESTS | 103 | 140 | 20684800 | 2600 | |
29670149 | gpita | C | Aug. 21, 2017, 11:42 p.m. | OK | Java 8 | TESTS | 103 | 171 | 0 | 2600 | |
29582695 | fetetriste | C | Aug. 18, 2017, 10:38 p.m. | OK | Java 8 | TESTS | 103 | 171 | 4915200 | 2600 | |
29597573 | uwi | C | Aug. 19, 2017, 12:04 p.m. | OK | Java 8 | TESTS | 103 | 187 | 0 | 2600 | |
29565150 | Petr | C | Aug. 18, 2017, 3:29 p.m. | OK | Java 8 | TESTS | 103 | 187 | 0 | 2600 | |
29742751 | alexrcoleman | C | Aug. 24, 2017, 5:03 p.m. | OK | Java 8 | TESTS | 103 | 202 | 0 | 2600 | |
29597711 | uwi | C | Aug. 19, 2017, 12:10 p.m. | OK | Java 8 | TESTS | 103 | 202 | 0 | 2600 | |
29574969 | AndreiNet | C | Aug. 18, 2017, 4:18 p.m. | OK | Java 8 | TESTS | 103 | 202 | 0 | 2600 | |
29578224 | fetetriste | C | Aug. 18, 2017, 4:46 p.m. | OK | Java 8 | TESTS | 103 | 202 | 4915200 | 2600 | |
29577762 | riantkb | C | Aug. 18, 2017, 4:42 p.m. | OK | Mono C# | TESTS | 103 | 109 | 3993600 | 2600 | |
29596477 | leign | C | Aug. 19, 2017, 11:14 a.m. | OK | Mono C# | TESTS | 103 | 701 | 217395200 | 2600 | |
29609299 | Taube | C | Aug. 19, 2017, 10:15 p.m. | OK | MS C++ | TESTS | 103 | 46 | 921600 | 2600 | |
59594350 | vjudge4 | C | Aug. 27, 2019, 11:53 p.m. | OK | MS C++ | TESTS | 103 | 61 | 1536000 | 2600 | |
59594332 | vjudge1 | C | Aug. 27, 2019, 11:52 p.m. | OK | MS C++ | TESTS | 103 | 62 | 1536000 | 2600 | |
39954580 | Ali_Pi | C | July 4, 2018, 12:15 p.m. | OK | PyPy 2 | TESTS | 103 | 202 | 2150400 | 2600 | |
29574126 | kevinsogo | C | Aug. 18, 2017, 4:12 p.m. | OK | PyPy 2 | TESTS | 103 | 810 | 47104000 | 2600 | |
29591131 | nwi | C | Aug. 19, 2017, 7:06 a.m. | OK | Python 2 | TESTS | 103 | 233 | 307200 | 2600 |
Back to search problems