Codeforces Round 736 (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
1548 Codeforces Round 736 (Div. 1) FINISHED False 8700 109351463 Aug. 1, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 266 ) D2 Gregor and the Odd Cows (Hard) PROGRAMMING brute force geometry math number theory

B'This is the hard version of the problem. The only difference from the easy version is that in this version the coordinates can be both odd and even. There are n fence-posts at distinct coordinates on a plane. It is guaranteed that no three fence posts lie on the same line. There are an infinite number of cows on the plane, one at every point with integer coordinates. Gregor is a member of the Illuminati, and wants to build a triangular fence, connecting 3 distinct existing fence posts. A cow strictly inside the fence is said to be enclosed. If there are an odd number of enclosed cows and the area of the fence is an integer, the fence is said to be interesting. Find the number of interesting fences. The first line contains the integer n ( 3 <= n <= 6000 ), the number of fence posts which Gregor can choose to form the vertices of a fence. Each of the next n line contains two integers x and y ( 0 <= x,y <= 10^7 , where (x,y) is the coordinate of a fence post. All fence posts lie at distinct coordinates. No three fence posts are on the same line. Print a single integer, the number of interesting fences. Two fences are considered different if they are constructed with a different set of three fence posts. In the first example, there is only 1 fence. That fence is interesting since its area is 4 and there is 1 enclosed cow, marked in red. In the second example, there are 4 possible fences. Only one of them is interesting however. That fence has an area of 8 and 5 enclosed cows. '...

Tutorials

Codeforces Round 736 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
124616110 rainboy D2 Aug. 1, 2021, 8:16 p.m. OK GNU C11 TESTS 22 3432 3891200
124601582 gisp_zjz D2 Aug. 1, 2021, 4:54 p.m. OK GNU C++11 TESTS 22 2028 41676800
124638003 AhoCorasick D2 Aug. 2, 2021, 3:39 a.m. OK GNU C++14 TESTS 22 2152 150425600
124602573 ugly2333 D2 Aug. 1, 2021, 4:56 p.m. OK GNU C++14 TESTS 22 2402 181964800
124622480 scli_weapon D2 Aug. 1, 2021, 10:20 p.m. OK GNU C++14 TESTS 22 3493 150937600
124581553 nealchen D2 Aug. 1, 2021, 4:05 p.m. OK GNU C++14 TESTS 22 4212 3788800
124599986 Subconscious D2 Aug. 1, 2021, 4:50 p.m. OK GNU C++14 TESTS 22 4383 27750400
124589080 peehs_moorhsum D2 Aug. 1, 2021, 4:23 p.m. OK GNU C++14 TESTS 22 5100 4096000
124643333 Graphter D2 Aug. 2, 2021, 4:50 a.m. OK GNU C++14 TESTS 22 5459 6860800
124579457 kefaa2 D2 Aug. 1, 2021, 4 p.m. OK GNU C++17 TESTS 22 2292 148480000
124595552 antontrygubO_o D2 Aug. 1, 2021, 4:39 p.m. OK GNU C++17 TESTS 22 3400 4608000
124631052 yhx-12243 D2 Aug. 2, 2021, 2 a.m. OK GNU C++17 TESTS 22 4102 3788800
124640853 kfqg D2 Aug. 2, 2021, 4:17 a.m. OK GNU C++17 TESTS 22 4117 3788800
124615378 rqi D2 Aug. 1, 2021, 8:08 p.m. OK GNU C++17 TESTS 22 4274 4096000
124621339 Golovanov399 D2 Aug. 1, 2021, 9:50 p.m. OK GNU C++17 TESTS 22 4321 3788800
124599960 maspy D2 Aug. 1, 2021, 4:50 p.m. OK GNU C++17 TESTS 22 4679 3891200
124625117 12tqian D2 Aug. 1, 2021, 11:46 p.m. OK GNU C++17 (64) TESTS 22 1231 9830400
124625126 12tqian D2 Aug. 1, 2021, 11:46 p.m. OK GNU C++17 (64) TESTS 22 1231 10137600
124625096 12tqian D2 Aug. 1, 2021, 11:46 p.m. OK GNU C++17 (64) TESTS 22 1232 10444800
124625109 12tqian D2 Aug. 1, 2021, 11:46 p.m. OK GNU C++17 (64) TESTS 22 1325 11059200
124625059 12tqian D2 Aug. 1, 2021, 11:44 p.m. OK GNU C++17 (64) TESTS 22 1326 7884800
124625090 12tqian D2 Aug. 1, 2021, 11:45 p.m. OK GNU C++17 (64) TESTS 22 1388 13926400
124624828 12tqian D2 Aug. 1, 2021, 11:36 p.m. OK GNU C++17 (64) TESTS 22 2074 5939200
124624358 12tqian D2 Aug. 1, 2021, 11:20 p.m. OK GNU C++17 (64) TESTS 22 2184 11059200
124632005 wygzgyw D2 Aug. 2, 2021, 2:14 a.m. OK GNU C++17 (64) TESTS 22 2214 7475200
124624618 12tqian D2 Aug. 1, 2021, 11:29 p.m. OK GNU C++17 (64) TESTS 22 2214 11059200

remove filters

Back to search problems