Codeforces Round 407 (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
788 Codeforces Round 407 (Div. 1) FINISHED False 7200 241019699 March 29, 2017, 4:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2291 ) C The Great Mixing PROGRAMMING dfs and similar graphs shortest paths 2500

B'Sasha and Kolya decided to get drunk with Coke, again. This time they have k types of Coke. i-th type is characterised by its carbon dioxide concentration . Today, on the party in honour of Sergiy of Vancouver they decided to prepare a glass of Coke with carbon dioxide concentration . The drink should also be tasty, so the glass can contain only integer number of liters of each Coke type (some types can be not presented in the glass). Also, they want to minimize the total volume of Coke in the glass. Carbon dioxide concentration is defined as the volume of carbone dioxide in the Coke divided by the total volume of Coke. When you mix two Cokes, the volume of carbon dioxide sums up, and the total volume of Coke sums up as well. Help them, find the minimal natural number of liters needed to create a glass with carbon dioxide concentration . Assume that the friends have unlimited amount of each Coke type. The first line contains two integers n, k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- carbon dioxide concentration the friends want and the number of Coke types. The second line contains k integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89ak (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) -- carbon dioxide concentration of each type of Coke. Some Coke types can have same concentration. Print the minimal natural number of liter needed to prepare a glass with carbon dioxide concentration , or -1 if it is impossible. In the first sample case, we can achieve concentration using one liter of Coke of types and : . In the second case, we can achieve concentration using two liters of type and one liter of type: . '...

Tutorials

Codeforces Round #407(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
25920151 Gassa C March 29, 2017, 5:27 p.m. OK D TESTS 48 155 22937600 2500
26102328 bzh C April 3, 2017, 2:54 p.m. OK FPC TESTS 48 155 1638400 2500
33013322 AsahiKasugano C Dec. 8, 2017, 3:22 a.m. OK FPC TESTS 48 155 12083200 2500
25953340 NormalCoder C March 30, 2017, 1:12 p.m. OK FPC TESTS 48 156 9728000 2500
45439750 vjudge1 C Nov. 8, 2018, 10:26 a.m. OK FPC TESTS 48 171 102400 2500
45410666 vjudge3 C Nov. 7, 2018, 11:57 a.m. OK FPC TESTS 48 171 64102400 2500
45410605 hjsshjg C Nov. 7, 2018, 11:55 a.m. OK FPC TESTS 48 171 64102400 2500
25930568 NormalCoder C March 29, 2017, 7:16 p.m. OK FPC TESTS 48 343 9728000 2500
26239467 jkxjkx1031 C April 9, 2017, 2:39 p.m. OK GNU C TESTS 48 171 18124800 2500
34047137 yasugongshang C Jan. 9, 2018, 11:34 a.m. OK GNU C++ TESTS 48 15 2150400 2500
40981962 ReaLNero1 C July 30, 2018, 6:12 p.m. OK GNU C++ TESTS 48 30 102400 2500
41580190 Scut82 C Aug. 14, 2018, 7:40 a.m. OK GNU C++ TESTS 48 31 0 2500
40052906 luogu_bot2 C July 7, 2018, 6:33 a.m. OK GNU C++ TESTS 48 31 0 2500
27465081 jiyutian C May 31, 2017, 11:15 a.m. OK GNU C++ TESTS 48 31 0 2500
27337442 AkaneSasu C May 25, 2017, 1:17 p.m. OK GNU C++ TESTS 48 31 0 2500
25927984 yveh1999 C March 29, 2017, 6:02 p.m. OK GNU C++ TESTS 48 31 1945600 2500
26077875 smtcoder C April 2, 2017, 12:35 p.m. OK GNU C++ TESTS 48 31 2150400 2500
25965749 xzyxzy C March 31, 2017, 12:32 a.m. OK GNU C++ TESTS 48 31 2150400 2500
25956370 yjher C March 30, 2017, 2:58 p.m. OK GNU C++ TESTS 48 31 2150400 2500
68554554 rainboy C Jan. 10, 2020, 4:30 p.m. OK GNU C11 TESTS 48 140 16076800 2500
27566654 KeremC C June 4, 2017, 3:18 p.m. OK GNU C++11 TESTS 48 15 0 2500
61059819 Frame233 C Sept. 22, 2019, 9:10 a.m. OK GNU C++11 TESTS 48 31 0 2500
58978851 vjudge4 C Aug. 18, 2019, 2:55 a.m. OK GNU C++11 TESTS 48 31 0 2500
53835753 chhokmah C May 7, 2019, 2:37 a.m. OK GNU C++11 TESTS 48 31 0 2500
51883407 KING_LRL C March 27, 2019, 4:18 a.m. OK GNU C++11 TESTS 48 31 0 2500
28344334 Hermits C July 7, 2017, 7:52 a.m. OK GNU C++11 TESTS 48 31 1945600 2500
25935964 LiChenKoh C March 29, 2017, 10:38 p.m. OK GNU C++11 TESTS 48 31 2150400 2500
25935942 LiChenKoh C March 29, 2017, 10:36 p.m. OK GNU C++11 TESTS 48 31 2150400 2500
28343474 Cherries C July 7, 2017, 7:12 a.m. OK GNU C++11 TESTS 48 31 2150400 2500
25955016 longhoang08 C March 30, 2017, 2:07 p.m. OK GNU C++11 TESTS 48 31 2252800 2500
25929770 radoslav11 C March 29, 2017, 7:05 p.m. OK GNU C++14 TESTS 48 31 2048000 2500
35511313 DAyamaCTF C Feb. 20, 2018, 4:41 a.m. OK GNU C++14 TESTS 48 31 2867200 2500
25919112 I_Love_Tina C March 29, 2017, 5:23 p.m. OK GNU C++14 TESTS 48 31 10342400 2500
25920614 Egor.Lifar C March 29, 2017, 5:29 p.m. OK GNU C++14 TESTS 48 62 6758400 2500
36396224 err0r C March 18, 2018, 5:38 p.m. OK GNU C++14 TESTS 48 93 3993600 2500
26508229 vjudge1 C April 20, 2017, 5:22 a.m. OK GNU C++14 TESTS 48 155 1945600 2500
25934364 OMG_wc C March 29, 2017, 8:58 p.m. OK GNU C++14 TESTS 48 155 2150400 2500
25934875 OMG_wc C March 29, 2017, 9:23 p.m. OK GNU C++14 TESTS 48 155 7372800 2500
26984177 lessmeaning C May 9, 2017, 8 p.m. OK GNU C++14 TESTS 48 156 204800 2500
26508117 vjudge4 C April 20, 2017, 5:12 a.m. OK GNU C++14 TESTS 48 156 1945600 2500
41217139 q234rty C Aug. 4, 2018, 1:33 p.m. OK GNU C++17 TESTS 48 31 10035200 2500
52008227 vjudge3 C March 30, 2019, 8:23 a.m. OK GNU C++17 TESTS 48 202 0 2500
63498262 Phortox C Oct. 26, 2019, 4:17 p.m. OK GNU C++17 TESTS 48 202 204800 2500
45460117 gdfzpsz C Nov. 8, 2018, 11:50 p.m. OK GNU C++17 TESTS 48 202 8294400 2500
67636004 lrvideckis C Dec. 26, 2019, 6:58 a.m. OK GNU C++17 TESTS 48 202 10649600 2500
51475732 vjudge2 C March 19, 2019, 9:17 a.m. OK GNU C++17 TESTS 48 217 0 2500
60252600 vjudge5 C Sept. 8, 2019, 7:41 a.m. OK GNU C++17 TESTS 48 217 0 2500
57167818 vjudge3 C July 17, 2019, 12:56 a.m. OK GNU C++17 TESTS 48 217 0 2500
61073757 Bagritsevich_Stepan C Sept. 22, 2019, 1:39 p.m. OK GNU C++17 TESTS 48 217 7987200 2500
65411921 dima.arafat C Nov. 20, 2019, 4:48 a.m. OK GNU C++17 TESTS 48 218 0 2500
68554593 Dukkha C Jan. 10, 2020, 4:32 p.m. OK Java 11 TESTS 48 187 0 2500
26881917 hama-du C May 5, 2017, 1:44 p.m. OK Java 8 TESTS 48 124 0 2500
25913663 uwi C March 29, 2017, 5 p.m. OK Java 8 TESTS 48 139 20582400 2500
45473319 Jeel_Vaishnav C Nov. 9, 2018, 11:12 a.m. OK Java 8 TESTS 48 155 0 2500
41065125 PrakharJain C July 31, 2018, 6:26 p.m. OK Java 8 TESTS 48 186 0 2500
25937531 ChrisWu C March 30, 2017, 12:58 a.m. OK Java 8 TESTS 48 249 52121600 2500
26238056 sharingan C April 9, 2017, 1:22 p.m. OK Java 8 TESTS 48 249 52224000 2500
30838988 Ahmad_Elsagheer C Sept. 29, 2017, 6:54 p.m. OK Java 8 TESTS 48 264 29696000 2500
26104867 thanhld94 C April 3, 2017, 4:48 p.m. OK Java 8 TESTS 48 264 52224000 2500
25929583 mmaxio C March 29, 2017, 6:55 p.m. OK Java 8 TESTS 48 264 57036800 2500
25927516 DarLam C March 29, 2017, 6 p.m. OK Java 8 TESTS 48 264 57139200 2500
25945917 AnatolyTolstobrov C March 30, 2017, 8:47 a.m. OK MS C# TESTS 48 93 9216000 2500
26046035 camypaper C April 1, 2017, 7:34 a.m. OK MS C# TESTS 48 124 15155200 2500
31559508 vjudge5 C Oct. 21, 2017, 8:56 a.m. OK MS C++ TESTS 48 140 2150400 2500
44028638 vjudge2 C Oct. 9, 2018, 9:23 a.m. OK MS C++ TESTS 48 155 307200 2500
57127875 vjudge4 C July 16, 2019, 5:41 a.m. OK MS C++ TESTS 48 155 3993600 2500
44026884 vjudge5 C Oct. 9, 2018, 8:26 a.m. OK MS C++ TESTS 48 156 307200 2500
56373781 vjudge4 C July 1, 2019, 5:33 a.m. OK MS C++ TESTS 48 156 7987200 2500
56140785 vjudge2 C June 27, 2019, 3:09 a.m. OK MS C++ TESTS 48 156 25088000 2500
45228930 vjudge4 C Nov. 3, 2018, 5:42 a.m. OK MS C++ TESTS 48 171 102400 2500
43783155 vjudge1 C Oct. 4, 2018, 11:18 a.m. OK MS C++ TESTS 48 171 3993600 2500
45129150 vjudge2 C Oct. 31, 2018, 9:28 a.m. OK MS C++ TESTS 48 171 8294400 2500
69014383 vjudge1 C Jan. 18, 2020, 4:50 a.m. OK MS C++ TESTS 48 171 165376000 2500
68975536 vjudge3 C Jan. 17, 2020, 8:40 a.m. OK MS C++ 2017 TESTS 48 249 512000 2500
68975182 vjudge4 C Jan. 17, 2020, 8:32 a.m. OK MS C++ 2017 TESTS 48 249 512000 2500
68975510 vjudge3 C Jan. 17, 2020, 8:40 a.m. OK MS C++ 2017 TESTS 48 249 819200 2500
68975408 vjudge5 C Jan. 17, 2020, 8:37 a.m. OK MS C++ 2017 TESTS 48 249 819200 2500
27531880 maratonando C June 2, 2017, 9:25 p.m. OK Python 3 TESTS 48 514 61542400 2500
42141374 Mk_Python_v1 C Aug. 27, 2018, 5:45 a.m. OK Python 3 TESTS 48 576 61235200 2500
25939109 kobae964 C March 30, 2017, 2:58 a.m. OK Rust TESTS 48 373 156979200 2500

remove filters

Back to search problems