2020 ICPC, COMPFEST 12, Indonesia Multi-Provincial Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred)

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
1425 2020 ICPC, COMPFEST 12, Indonesia Multi-Provincial Contest (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 130640399 Sept. 27, 2020, 5 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 42 ) C Captain of Knights PROGRAMMING math 3100

B"Mr. Chanek just won the national chess tournament and got a huge chessboard of size N x M . Bored with playing conventional chess, Mr. Chanek now defines a function F(X, Y) , which denotes the minimum number of moves to move a knight from square (1, 1) to square (X, Y) . It turns out finding F(X, Y) is too simple, so Mr. Chanek defines: G(X, Y) = sum_{i=X}^{N} sum_{j=Y}^{M} F(i, j) Given X and Y, you are tasked to find G(X, Y) . A knight can move from square (a, b) to square (a', b') if and only if |a - a'| > 0 , |b - b'| > 0 , and |a - a'| + |b - b'| = 3 . Of course, the knight cannot leave the chessboard. The first line contains an integer T (1 <= T <= 100) , the number of test cases. Each test case contains a line with four integers X Y N M (3 <= q X <= q N <= q 10^9, 3 <= q Y <= q M <= q 10^9) . For each test case, print a line with the value of G(X, Y) modulo 10^9 + 7 . "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
94048031 sh1194 C Sept. 28, 2020, 4:46 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
94047890 sh1194 C Sept. 28, 2020, 4:43 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
93947835 PinkRabbit C Sept. 27, 2020, 10:42 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
93944870 LJC00118 xay5421 Sooke C Sept. 27, 2020, 9:59 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
93944773 LJC00118 xay5421 Sooke C Sept. 27, 2020, 9:58 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
93943655 LJC00118 xay5421 Sooke C Sept. 27, 2020, 9:46 a.m. OK GNU C++17 (64) TESTS 3 15 0 3100
93951248 PinkRabbit C Sept. 27, 2020, 11:30 a.m. OK GNU C++17 (64) TESTS 3 30 0 3100

remove filters

Back to search problems