Codeforces Round 290 (Div. 2)

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
510 Codeforces Round 290 (Div. 2) FINISHED False 7500 308928599 Feb. 2, 2015, 4:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2207 ) E Fox And Dinner PROGRAMMING flows 2800

B'Fox Ciel is participating in a party in Prime Kingdom. There are n foxes there (include Fox Ciel). The i-th fox is ai years old. They will have dinner around some round tables. You want to distribute foxes such that: If k foxes f1, f2, ..., fk are sitting around table in clockwise order, then for 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89- xe2 x80 x891: fi and fi xe2 x80 x89+ xe2 x80 x891 are adjacent, and f1 and fk are also adjacent. If it is possible to distribute the foxes in the desired manner, find out a way to do that. The first line contains single integer n (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200): the number of foxes in this party. The second line contains n integers ai (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104). If it is impossible to do this, output "Impossible". Otherwise, in the first line output an integer m (): the number of tables. Then output m lines, each line should start with an integer k -= xe2 x80 x93 the number of foxes around that table, and then k numbers -- indices of fox sitting around that table in clockwise order. If there are several possible arrangements, output any of them. In example 1, they can sit around one table, their ages are: 3-8-9-4, adjacent sums are: 11, 17, 13 and 7, all those integers are primes. In example 2, it is not possible: the sum of 2+2 = 4 is not a prime number.'...

Tutorials

Codeforces Round #290 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
27753823 vjudge3 E June 13, 2017, 11:04 a.m. OK FPC TESTS 50 15 512000 2800
27754280 vjudge1 E June 13, 2017, 11:31 a.m. OK FPC TESTS 50 15 3686400 2800
27752788 vjudge1 E June 13, 2017, 9:49 a.m. OK FPC TESTS 50 31 30515200 2800
26966172 vjudge1 E May 9, 2017, 1:37 a.m. OK GNU C++ TESTS 50 15 409600 2800
20448679 LawrenceXavier E Sept. 8, 2016, 2:37 a.m. OK GNU C++ TESTS 50 15 409600 2800
31269522 vjudge4 E Oct. 13, 2017, 9:02 a.m. OK GNU C++ TESTS 50 15 512000 2800
31269006 Bcc E Oct. 13, 2017, 8:42 a.m. OK GNU C++ TESTS 50 15 512000 2800
29829072 Kimia.H E Aug. 27, 2017, 2:57 p.m. OK GNU C++ TESTS 50 15 512000 2800
31160441 vjudge5 E Oct. 9, 2017, 6:26 a.m. OK GNU C++ TESTS 50 15 614400 2800
31945619 Scut82 E Nov. 1, 2017, 10:16 a.m. OK GNU C++ TESTS 50 15 716800 2800
29595200 vjudge4 E Aug. 19, 2017, 10:09 a.m. OK GNU C++ TESTS 50 15 819200 2800
27754710 vjudge1 E June 13, 2017, 11:53 a.m. OK GNU C++ TESTS 50 15 921600 2800
27749777 vjudge3 E June 13, 2017, 6:06 a.m. OK GNU C++ TESTS 50 15 1024000 2800
21830840 bluefi E Oct. 27, 2016, 5:51 p.m. OK GNU C++11 TESTS 50 15 102400 2800
22943800 Ragdoll E Dec. 14, 2016, 7:49 a.m. OK GNU C++11 TESTS 50 15 307200 2800
21884959 compiler_101 E Oct. 30, 2016, 1:39 a.m. OK GNU C++11 TESTS 50 15 307200 2800
20830679 AomeII E Sept. 23, 2016, 5:32 a.m. OK GNU C++11 TESTS 50 15 307200 2800
19350693 abigcat E July 22, 2016, 9:56 p.m. OK GNU C++11 TESTS 50 15 307200 2800
31001898 SebiSebi E Oct. 4, 2017, 7:42 p.m. OK GNU C++11 TESTS 50 15 409600 2800
30914023 TadijaSebez E Oct. 1, 2017, 4:32 p.m. OK GNU C++11 TESTS 50 15 409600 2800
27161388 SYury E May 16, 2017, 2:07 p.m. OK GNU C++11 TESTS 50 15 409600 2800
18612250 tamionv E June 20, 2016, 10:16 a.m. OK GNU C++11 TESTS 50 15 409600 2800
30746234 MoHib85 E Sept. 26, 2017, 9:49 a.m. OK GNU C++11 TESTS 50 15 512000 2800
30370678 step_by_step E Sept. 15, 2017, 7:08 p.m. OK GNU C++14 TESTS 50 15 512000 2800
20614367 myown1209 E Sept. 14, 2016, 12:49 p.m. OK GNU C++14 TESTS 50 15 512000 2800
30654203 mohamedeltair E Sept. 23, 2017, 10:17 p.m. OK GNU C++14 TESTS 50 15 614400 2800
30654179 mohamedeltair E Sept. 23, 2017, 10:14 p.m. OK GNU C++14 TESTS 50 15 614400 2800
29669289 akaraz E Aug. 21, 2017, 10:08 p.m. OK GNU C++14 TESTS 50 15 614400 2800
50520500 kashyap_archit E Feb. 26, 2019, 9:07 a.m. OK GNU C++14 TESTS 50 15 716800 2800
41961683 rareone0602 E Aug. 22, 2018, 9:49 a.m. OK GNU C++14 TESTS 50 15 716800 2800
32100962 ThePhenomenal E Nov. 6, 2017, 4:41 p.m. OK GNU C++14 TESTS 50 15 716800 2800
32100261 SmokeOut E Nov. 6, 2017, 4:03 p.m. OK GNU C++14 TESTS 50 15 716800 2800
30539263 Ahmad_Osama E Sept. 20, 2017, 8:58 a.m. OK GNU C++14 TESTS 50 15 716800 2800
62240117 Cadenza E Oct. 10, 2019, 1:06 a.m. OK GNU C++17 TESTS 50 15 921600 2800
39694280 vjudge2 E June 27, 2018, 7:33 a.m. OK GNU C++17 TESTS 50 30 716800 2800
47553166 vjudge4 E Dec. 27, 2018, 2:13 p.m. OK GNU C++17 TESTS 50 30 2764800 2800
57148927 vjudge1 E July 16, 2019, 2 p.m. OK GNU C++17 TESTS 50 30 6758400 2800
68654916 GyojunYoun E Jan. 12, 2020, 11:55 a.m. OK GNU C++17 TESTS 50 31 204800 2800
40098914 vjudge4 E July 9, 2018, 2:53 a.m. OK GNU C++17 TESTS 50 31 204800 2800
38539857 majk E May 22, 2018, 3:15 p.m. OK GNU C++17 TESTS 50 31 204800 2800
67634232 swust5120177231 E Dec. 26, 2019, 5:59 a.m. OK GNU C++17 TESTS 50 31 307200 2800
67128484 tap_tapii E Dec. 17, 2019, 9:31 p.m. OK GNU C++17 TESTS 50 31 409600 2800
60040720 Semenar E Sept. 4, 2019, 6:14 p.m. OK GNU C++17 TESTS 50 31 409600 2800
32836331 ---Grigor--- E Dec. 1, 2017, 5:22 p.m. OK GNU C++17 Diagnostics TESTS 50 1060 104960000 2800
44696347 Jeel_Vaishnav E Oct. 22, 2018, 1:07 p.m. OK Java 8 TESTS 50 109 0 2800
56720810 Rohinee136 E July 8, 2019, 4:44 p.m. OK Java 8 TESTS 50 124 0 2800
24614946 soufiane95 E Feb. 12, 2017, 6:37 p.m. OK Java 8 TESTS 50 124 20684800 2800
28322185 wxqy E July 6, 2017, 9:22 a.m. OK Java 8 TESTS 50 140 20992000 2800
26109755 BiIIy E April 3, 2017, 10:42 p.m. OK Java 8 TESTS 50 140 21094400 2800
24615866 soufiane95 E Feb. 12, 2017, 7:36 p.m. OK Java 8 TESTS 50 155 21094400 2800
24615452 soufiane95 E Feb. 12, 2017, 7:07 p.m. OK Java 8 TESTS 50 155 21094400 2800
24580016 ahmedahmed E Feb. 11, 2017, 12:25 a.m. OK Java 8 TESTS 50 171 20889600 2800
26492707 mug E April 19, 2017, 10:02 a.m. OK Java 8 TESTS 50 171 20992000 2800
24356109 tyuan73 E Feb. 1, 2017, 11:18 p.m. OK Java 8 TESTS 50 202 20787200 2800
22012773 107th E Nov. 3, 2016, 1:03 p.m. OK MS C++ TESTS 50 30 12595200 2800
53848298 vjudge1 E May 7, 2019, 12:13 p.m. OK MS C++ TESTS 50 31 6144000 2800
54076459 CtrlAlt E May 13, 2019, 8:28 p.m. OK MS C++ 2017 TESTS 50 31 716800 2800

remove filters

Back to search problems