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 |
---|---|---|---|---|---|---|
1251 | Educational Codeforces Round 75 (Rated for Div. 2) | FINISHED | False | 7200 | 165509687 | Oct. 24, 2019, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 840 ) | F | Red-White Fence | PROGRAMMING | combinatorics fft | 2600 |
B"Polycarp wants to build a fence near his house. He has n white boards and k red boards he can use to build it. Each board is characterised by its length, which is an integer. A good fence should consist of exactly one red board and several (possibly zero) white boards. The red board should be the longest one in the fence (every white board used in the fence should be strictly shorter), and the sequence of lengths of boards should be ascending before the red board and descending after it. Formally, if m boards are used, and their lengths are l_1 , l_2 , ..., l_m in the order they are placed in the fence, from left to right (let's call this array [l_1, l_2, ... , l_m] the array of lengths), the following conditions should hold: When Polycarp will build his fence, he will place all boards from left to right on the same height of 0 , without any gaps, so these boards compose a polygon: Polycarp is interested in fences of some special perimeters. He has q even integers he really likes (these integers are Q_1 , Q_2 , ..., Q_q ), and for every such integer Q_i , he wants to calculate the number of different fences with perimeter Q_i he can build (two fences are considered different if their arrays of lengths are different). Can you help him calculate these values? The first line contains two integers n and k ( 1 <= n <= 3 cdot 10^5 , 1 <= k <= 5 ) -- the number of white and red boards Polycarp has. The second line contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= 3 cdot 10^5 ) -- the lengths of white boards Polycarp has. The third line contains k integers b_1 , b_2 , ..., b_k ( 1 <= b_i <= 3 cdot 10^5 ) -- the lengths of red boards Polycarp has. All b_i are distinct. The fourth line contains one integer q ( 1 <= q <= 3 cdot 10^5 ) -- the number of special integers. The fifth l"... |
70860 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
63348955 | rainboy | F | Oct. 24, 2019, 8:38 p.m. | OK | GNU C11 | TESTS | 107 | 3135 | 19558400 | 2600 | |
63327564 | rainboy | F | Oct. 24, 2019, 4:17 p.m. | OK | GNU C11 | TESTS | 107 | 4804 | 35430400 | 2600 | |
63396910 | vjudge2 | F | Oct. 25, 2019, 4:58 p.m. | OK | GNU C++11 | TESTS | 107 | 1013 | 47411200 | 2600 | |
63428860 | vjudge1 | F | Oct. 26, 2019, 8:35 a.m. | OK | GNU C++11 | TESTS | 107 | 1169 | 28057600 | 2600 | |
64237929 | 8300590 | F | Nov. 4, 2019, 2:17 p.m. | OK | GNU C++11 | TESTS | 107 | 1185 | 57344000 | 2600 | |
63385495 | JKLover | F | Oct. 25, 2019, 1:39 p.m. | OK | GNU C++11 | TESTS | 107 | 1232 | 93798400 | 2600 | |
69165818 | Eganrak | F | Jan. 20, 2020, 3:40 a.m. | OK | GNU C++11 | TESTS | 107 | 1326 | 90009600 | 2600 | |
63908957 | tyler178 | F | Oct. 31, 2019, 7:33 a.m. | OK | GNU C++11 | TESTS | 107 | 1372 | 41984000 | 2600 | |
63766862 | ezhjw | F | Oct. 30, 2019, 6:32 a.m. | OK | GNU C++11 | TESTS | 107 | 1372 | 103936000 | 2600 | |
63366096 | danya090699 | F | Oct. 25, 2019, 7:32 a.m. | OK | GNU C++11 | TESTS | 107 | 1387 | 94822400 | 2600 | |
67426975 | Hatate | F | Dec. 22, 2019, 1:48 p.m. | OK | GNU C++11 | TESTS | 107 | 1419 | 23859200 | 2600 | |
63406030 | qxforever | F | Oct. 25, 2019, 8:26 p.m. | OK | GNU C++11 | TESTS | 107 | 1450 | 113766400 | 2600 | |
63366162 | liouzhou_101 | F | Oct. 25, 2019, 7:34 a.m. | OK | GNU C++14 | TESTS | 107 | 249 | 32051200 | 2600 | |
63335974 | Taran_1407 | F | Oct. 24, 2019, 4:57 p.m. | OK | GNU C++14 | TESTS | 107 | 390 | 18739200 | 2600 | |
63365447 | liouzhou_101 | F | Oct. 25, 2019, 7:18 a.m. | OK | GNU C++14 | TESTS | 107 | 873 | 30310400 | 2600 | |
65162565 | xzsunbest | F | Nov. 16, 2019, 11:59 a.m. | OK | GNU C++14 | TESTS | 107 | 935 | 52633600 | 2600 | |
63643777 | tlylz99 | F | Oct. 28, 2019, 8:57 a.m. | OK | GNU C++14 | TESTS | 107 | 951 | 60518400 | 2600 | |
63325885 | risujiroh | F | Oct. 24, 2019, 4:10 p.m. | OK | GNU C++14 | TESTS | 107 | 982 | 58777600 | 2600 | |
67030944 | tejas_919 | F | Dec. 16, 2019, 3:49 p.m. | OK | GNU C++14 | TESTS | 107 | 997 | 22835200 | 2600 | |
64349370 | follower0523 | F | Nov. 6, 2019, 7:42 a.m. | OK | GNU C++14 | TESTS | 107 | 1013 | 22118400 | 2600 | |
67031254 | tejas_919 | F | Dec. 16, 2019, 3:55 p.m. | OK | GNU C++14 | TESTS | 107 | 1013 | 22835200 | 2600 | |
64355224 | follower0523 | F | Nov. 6, 2019, 9:57 a.m. | OK | GNU C++14 | TESTS | 107 | 1044 | 22323200 | 2600 | |
63396794 | neal | F | Oct. 25, 2019, 4:56 p.m. | OK | GNU C++17 | TESTS | 107 | 187 | 21504000 | 2600 | |
63395657 | neal | F | Oct. 25, 2019, 4:35 p.m. | OK | GNU C++17 | TESTS | 107 | 202 | 23961600 | 2600 | |
64512307 | ffao | F | Nov. 8, 2019, 9:16 a.m. | OK | GNU C++17 | TESTS | 107 | 358 | 30105600 | 2600 | |
64490821 | ffao | F | Nov. 7, 2019, 7:52 p.m. | OK | GNU C++17 | TESTS | 107 | 452 | 30003200 | 2600 | |
64462737 | ffao | F | Nov. 7, 2019, 10:54 a.m. | OK | GNU C++17 | TESTS | 107 | 514 | 32153600 | 2600 | |
63340397 | neal | F | Oct. 24, 2019, 5:30 p.m. | OK | GNU C++17 | TESTS | 107 | 592 | 25907200 | 2600 | |
63348518 | saketh | F | Oct. 24, 2019, 8:25 p.m. | OK | GNU C++17 | TESTS | 107 | 670 | 23244800 | 2600 | |
64461796 | ffao | F | Nov. 7, 2019, 10:38 a.m. | OK | GNU C++17 | TESTS | 107 | 670 | 32051200 | 2600 | |
63340247 | neal | F | Oct. 24, 2019, 5:28 p.m. | OK | GNU C++17 | TESTS | 107 | 779 | 25907200 | 2600 | |
63427571 | jiangly | F | Oct. 26, 2019, 8:16 a.m. | OK | GNU C++17 | TESTS | 107 | 826 | 16896000 | 2600 | |
63349226 | Dukkha | F | Oct. 24, 2019, 8:46 p.m. | OK | Java 11 | TESTS | 107 | 3587 | 28876800 | 2600 | |
63348947 | Dukkha | F | Oct. 24, 2019, 8:38 p.m. | OK | Java 11 | TESTS | 107 | 3650 | 28876800 | 2600 | |
63349151 | Dukkha | F | Oct. 24, 2019, 8:44 p.m. | OK | Java 11 | TESTS | 107 | 3743 | 28876800 | 2600 | |
63348926 | Dukkha | F | Oct. 24, 2019, 8:37 p.m. | OK | Java 8 | TESTS | 107 | 3509 | 26521600 | 2600 | |
66157197 | AnandOza | F | Dec. 2, 2019, 12:17 a.m. | OK | Java 8 | TESTS | 107 | 3681 | 58572800 | 2600 | |
65896059 | dalt | F | Nov. 28, 2019, 6:14 a.m. | OK | Java 8 | TESTS | 107 | 3759 | 51712000 | 2600 | |
66157070 | AnandOza | F | Dec. 2, 2019, 12:05 a.m. | OK | Java 8 | TESTS | 107 | 4226 | 58572800 | 2600 | |
63883217 | Ahmad | F | Oct. 30, 2019, 10:26 p.m. | OK | Java 8 | TESTS | 107 | 4929 | 268492800 | 2600 | |
64895058 | Tlatoani | F | Nov. 14, 2019, 4:14 p.m. | OK | Kotlin | TESTS | 107 | 4976 | 52838400 | 2600 | |
64083275 | r57shell | F | Nov. 2, 2019, 10:47 a.m. | OK | MS C++ | TESTS | 107 | 1497 | 91955200 | 2600 | |
64082880 | r57shell | F | Nov. 2, 2019, 10:42 a.m. | OK | MS C++ | TESTS | 107 | 1497 | 91955200 | 2600 | |
64161236 | r57shell | F | Nov. 3, 2019, 2:36 p.m. | OK | MS C++ | TESTS | 107 | 1512 | 91955200 | 2600 | |
64081494 | r57shell | F | Nov. 2, 2019, 10:22 a.m. | OK | MS C++ | TESTS | 107 | 2167 | 159232000 | 2600 | |
64078922 | r57shell | F | Nov. 2, 2019, 9:33 a.m. | OK | MS C++ | TESTS | 107 | 2199 | 24678400 | 2600 | |
64079720 | r57shell | F | Nov. 2, 2019, 9:49 a.m. | OK | MS C++ | TESTS | 107 | 2230 | 24678400 | 2600 | |
64080972 | r57shell | F | Nov. 2, 2019, 10:14 a.m. | OK | MS C++ | TESTS | 107 | 2230 | 159232000 | 2600 | |
63507019 | r57shell | F | Oct. 26, 2019, 7:05 p.m. | OK | MS C++ | TESTS | 107 | 3572 | 26419200 | 2600 | |
63506550 | r57shell | F | Oct. 26, 2019, 6:54 p.m. | OK | MS C++ | TESTS | 107 | 4211 | 26419200 | 2600 | |
63471726 | pichulia | F | Oct. 26, 2019, 12:13 p.m. | OK | MS C++ 2017 | TESTS | 107 | 2121 | 27648000 | 2600 | |
63368839 | sansen | F | Oct. 25, 2019, 8:35 a.m. | OK | Rust | TESTS | 107 | 3135 | 15667200 | 2600 |
Back to search problems