Codeforces Round 616 (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
1290 Codeforces Round 616 (Div. 1) FINISHED False 9000 151170899 Feb. 2, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 382 ) F Making Shapes PROGRAMMING dp 3500

B'You are given n pairwise non-collinear two-dimensional vectors. You can make shapes in the two-dimensional plane with these vectors in the following fashion: You can reuse a vector as many times as you want. Count the number of different, non-degenerate (with an area greater than 0 ) and convex shapes made from applying the steps, such that the shape can be contained within a m x m square, and the vectors building the shape are in counter-clockwise fashion. Since this number can be too large, you should calculate it by modulo 998244353 . Two shapes are considered the same if there exists some parallel translation of the first shape to another. A shape can be contained within a m x m square if there exists some parallel translation of this shape so that every point (u, v) inside or on the border of the shape satisfies 0 <= q u, v <= q m . The first line contains two integers n and m -- the number of vectors and the size of the square ( 1 <= q n <= q 5 , 1 <= q m <= q 10^9 ). Each of the next n lines contains two integers x_i and y_i -- the x -coordinate and y -coordinate of the i -th vector ( |x_i|, |y_i| <= q 4 , (x_i, y_i) neq (0, 0) ). It is guaranteed, that no two vectors are parallel, so for any two indices i and j such that 1 <= q i < j <= q n , there is no real value k such that x_i cdot k = x_j and y_i cdot k = y_j . Output a single integer -- the number of satisfiable shapes by modulo 998244353 . The shapes for the first sample are: The only shape for the second sample is: The only shape for the fourth sample is: '...

Tutorials

Codeforces Round #616 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
70771955 gay__cjioer F Feb. 11, 2020, 7:23 a.m. OK GNU C++11 TESTS 42 31 102912000 3500
70111116 WZYYN F Feb. 3, 2020, 5:34 a.m. OK GNU C++11 TESTS 40 46 40755200 3500
70110808 zx2003 F Feb. 3, 2020, 5:27 a.m. OK GNU C++11 TESTS 40 46 131481600 3500
70134131 Rubblsh12345 F Feb. 3, 2020, 11:16 a.m. OK GNU C++11 TESTS 40 46 250470400 3500
70777203 _twilight F Feb. 11, 2020, 9:19 a.m. OK GNU C++11 TESTS 42 62 82124800 3500
70571221 Fuyuki F Feb. 8, 2020, 2:26 p.m. OK GNU C++11 TESTS 42 62 82124800 3500
70110928 WZYYN F Feb. 3, 2020, 5:30 a.m. OK GNU C++11 TESTS 40 62 718233600 3500
70695052 MAOoo F Feb. 9, 2020, 9:55 p.m. OK GNU C++11 TESTS 42 78 2150400 3500
70169586 MAOoo F Feb. 3, 2020, 5:07 p.m. OK GNU C++11 TESTS 40 78 2150400 3500
70473348 jz_597 F Feb. 7, 2020, 2:10 a.m. OK GNU C++11 TESTS 42 93 96460800 3500
70199642 yhx-12243 F Feb. 4, 2020, 3:16 a.m. OK GNU C++14 TESTS 40 46 5120000 3500
70131709 qiqi20021026 F Feb. 3, 2020, 10:33 a.m. OK GNU C++14 TESTS 40 61 82124800 3500
70158166 dinesh08011997 F Feb. 3, 2020, 2:34 p.m. OK GNU C++14 TESTS 40 93 5120000 3500
70819576 lnt0995449235 F Feb. 12, 2020, 2:50 a.m. OK GNU C++14 TESTS 42 109 5120000 3500
70579459 LukaMzhavia23 F Feb. 8, 2020, 4:45 p.m. OK GNU C++14 TESTS 42 109 5120000 3500
70089144 Benq F Feb. 2, 2020, 5:50 p.m. OK GNU C++14 TESTS 38 109 6246400 3500
70157625 Nyaan F Feb. 3, 2020, 2:26 p.m. OK GNU C++14 TESTS 40 171 6246400 3500
70206027 Crazy_Diamond F Feb. 4, 2020, 6:26 a.m. OK GNU C++14 TESTS 40 218 15360000 3500
70120029 cz_xuyixuan F Feb. 3, 2020, 8:24 a.m. OK GNU C++14 TESTS 40 1497 131481600 3500
70701432 BSBandme F Feb. 10, 2020, 2:56 a.m. OK GNU C++14 TESTS 42 2183 7475200 3500
70758489 krijgertje F Feb. 10, 2020, 10:53 p.m. OK GNU C++17 TESTS 42 46 102400 3500
70339582 gongsuidashen F Feb. 5, 2020, 8:05 a.m. OK GNU C++17 TESTS 41 46 5120000 3500
70183274 DamianS F Feb. 3, 2020, 8:35 p.m. OK GNU C++17 TESTS 40 46 14643200 3500
70115321 CMXRYNP F Feb. 3, 2020, 6:59 a.m. OK GNU C++17 TESTS 40 61 96665600 3500
70183740 DamianS F Feb. 3, 2020, 8:46 p.m. OK GNU C++17 TESTS 40 62 921600 3500
70059398 tourist F Feb. 2, 2020, 3:02 p.m. OK GNU C++17 TESTS 38 93 5120000 3500
70133510 arda F Feb. 3, 2020, 11:06 a.m. OK GNU C++17 TESTS 40 124 5120000 3500
70132119 _Happy_New_Year_ F Feb. 3, 2020, 10:41 a.m. OK GNU C++17 TESTS 40 187 6553600 3500
70092779 ecnerwala F Feb. 2, 2020, 6:59 p.m. OK GNU C++17 TESTS 39 623 3584000 3500
70103496 zscoder F Feb. 3, 2020, 1:36 a.m. OK GNU C++17 TESTS 40 1980 8192000 3500

remove filters

Back to search problems