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.
Problems
B"Jzzhu has two integers, n and m. He calls an integer point (x, xe2 x80 x89y) of a plane special if 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n and 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89y xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m. Jzzhu defines a unit square as a square with corners at points (x, xe2 x80 x89y), (x xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89y), (x xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89y xe2 x80 x89+ xe2 x80 x891), (x, xe2 x80 x89y xe2 x80 x89+ xe2 x80 x891), where x and y are some integers. Let's look at all the squares (their sides not necessarily parallel to the coordinate axes) with corners at the special points. For each such square Jzzhu paints a dot in every unit square that is fully inside it. After that some unit squares can contain several dots. Now Jzzhu wonders, how many dots he has painted on the plane. Find this number modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897). The first line contains a single integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of tests. Each of the next t lines contains the description of the test: two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the value of variables for the current test. For each test output the total number of dots modulo 1000000007 (109 xe2 x80 x89+ xe2 x80 x897)."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
51913220 |
georgerapeanu |
E |
March 27, 2019, 7:29 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
30 |
1653 |
24473600 |
|
2900 |
7355087 |
hos.lyric |
E |
Aug. 5, 2014, 5:47 p.m. |
OK |
D |
TESTS |
30 |
998 |
108134400 |
|
2900 |
15953858 |
dingzijun1999 |
E |
Feb. 11, 2016, 9:58 a.m. |
OK |
FPC |
TESTS |
30 |
935 |
36044800 |
|
2900 |
7242332 |
WoodcutKnife |
E |
July 25, 2014, 12:44 p.m. |
OK |
GNU C++ |
TESTS |
30 |
218 |
20992000 |
|
2900 |
7199219 |
nju_v_o_f |
E |
July 22, 2014, 3:08 a.m. |
OK |
GNU C++ |
TESTS |
30 |
234 |
52121600 |
|
2900 |
16220577 |
Memory120 |
E |
Feb. 20, 2016, 4:55 a.m. |
OK |
GNU C++ |
TESTS |
30 |
249 |
28057600 |
|
2900 |
7172419 |
semiexp |
E |
July 19, 2014, 2:49 p.m. |
OK |
GNU C++ |
TESTS |
30 |
265 |
52121600 |
|
2900 |
7215131 |
ivan100sic |
E |
July 24, 2014, 9:11 a.m. |
OK |
GNU C++ |
TESTS |
30 |
295 |
28057600 |
|
2900 |
40988228 |
ReaLNero1 |
E |
July 30, 2018, 9:49 p.m. |
OK |
GNU C++ |
TESTS |
30 |
295 |
52019200 |
|
2900 |
9509234 |
ACMonster |
E |
Jan. 23, 2015, 8:08 a.m. |
OK |
GNU C++ |
TESTS |
30 |
296 |
49152000 |
|
2900 |
7172014 |
kutengine |
E |
July 19, 2014, 2:45 p.m. |
OK |
GNU C++ |
TESTS |
30 |
311 |
52940800 |
|
2900 |
30165571 |
bhaag_milkha |
E |
Sept. 6, 2017, 7:58 p.m. |
OK |
GNU C++ |
TESTS |
30 |
327 |
40038400 |
|
2900 |
13999146 |
130705009 |
E |
Nov. 1, 2015, 3:29 a.m. |
OK |
GNU C++ |
TESTS |
30 |
358 |
16793600 |
|
2900 |
7189809 |
MinakoKojima |
E |
July 21, 2014, 1:28 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
249 |
20070400 |
|
2900 |
7189802 |
MinakoKojima |
E |
July 21, 2014, 1:26 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
249 |
20070400 |
|
2900 |
7189782 |
MinakoKojima |
E |
July 21, 2014, 1:22 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
249 |
20070400 |
|
2900 |
8282205 |
zhj |
E |
Oct. 17, 2014, 1:38 p.m. |
OK |
GNU C++0x |
TESTS |
30 |
249 |
28057600 |
|
2900 |
7189854 |
MinakoKojima |
E |
July 21, 2014, 1:39 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
264 |
20070400 |
|
2900 |
7442592 |
ershov.stanislav |
E |
Aug. 13, 2014, 12:58 p.m. |
OK |
GNU C++0x |
TESTS |
30 |
265 |
32051200 |
|
2900 |
7189864 |
MinakoKojima |
E |
July 21, 2014, 1:40 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
280 |
20070400 |
|
2900 |
7339130 |
Plumrain |
E |
Aug. 3, 2014, 3:30 p.m. |
OK |
GNU C++0x |
TESTS |
30 |
296 |
29081600 |
|
2900 |
7441339 |
ershov.stanislav |
E |
Aug. 13, 2014, 10:03 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
296 |
32051200 |
|
2900 |
7441438 |
ershov.stanislav |
E |
Aug. 13, 2014, 10:18 a.m. |
OK |
GNU C++0x |
TESTS |
30 |
327 |
32051200 |
|
2900 |
57302331 |
weng_233 |
E |
July 19, 2019, 1:08 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
93 |
35123200 |
|
2900 |
38775209 |
bestFy |
E |
May 30, 2018, 1:45 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
249 |
24985600 |
|
2900 |
57819205 |
py_ultron |
E |
July 26, 2019, 9:43 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
264 |
31846400 |
|
2900 |
57437535 |
zcrrzcr |
E |
July 21, 2019, 5:37 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
295 |
25497600 |
|
2900 |
57432636 |
luogu_bot3 |
E |
July 21, 2019, 2:35 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
312 |
24064000 |
|
2900 |
57432604 |
allfadeaway |
E |
July 21, 2019, 2:34 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
312 |
24064000 |
|
2900 |
36119272 |
geniucos |
E |
March 9, 2018, 2:01 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
327 |
18124800 |
|
2900 |
38996276 |
cyz666 |
E |
June 6, 2018, 1:41 p.m. |
OK |
GNU C++11 |
TESTS |
30 |
327 |
28364800 |
|
2900 |
35873001 |
______u______ |
E |
March 3, 2018, 7:22 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
342 |
33894400 |
|
2900 |
35872715 |
______n______ |
E |
March 3, 2018, 7:16 a.m. |
OK |
GNU C++11 |
TESTS |
30 |
342 |
33894400 |
|
2900 |
56641612 |
Scut82 |
E |
July 7, 2019, 2:20 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
171 |
28057600 |
|
2900 |
56640818 |
Scut82 |
E |
July 7, 2019, 1:29 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
186 |
28057600 |
|
2900 |
67266575 |
ElangBondol |
E |
Dec. 20, 2019, 6:26 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
233 |
52121600 |
|
2900 |
49985008 |
Mandir_Wahi_Banayenge |
E |
Feb. 16, 2019, 10:09 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
264 |
52121600 |
|
2900 |
32955285 |
abeker |
E |
Dec. 5, 2017, 6:10 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
421 |
21913600 |
|
2900 |
30289475 |
SakurakoujiRuna |
E |
Sept. 12, 2017, 3:04 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
670 |
36044800 |
|
2900 |
44655790 |
Shayan.P |
E |
Oct. 21, 2018, 1 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
701 |
24064000 |
|
2900 |
23894866 |
Oktavia |
E |
Jan. 17, 2017, 5:16 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
1123 |
30003200 |
|
2900 |
54884117 |
mgg |
E |
May 31, 2019, 4:09 p.m. |
OK |
GNU C++14 |
TESTS |
30 |
1434 |
126873600 |
|
2900 |
23494079 |
Ali.Pi |
E |
Jan. 2, 2017, 6:39 a.m. |
OK |
GNU C++14 |
TESTS |
30 |
1903 |
160665600 |
|
2900 |
57306186 |
temp6 |
E |
July 19, 2019, 3:57 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
93 |
21094400 |
|
2900 |
58235557 |
Benq |
E |
Aug. 3, 2019, 7:18 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
327 |
25088000 |
|
2900 |
58313181 |
me_Rose_max_Always_AK |
E |
Aug. 5, 2019, 1:21 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
358 |
25088000 |
|
2900 |
59502128 |
ruo |
E |
Aug. 26, 2019, 3:34 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
436 |
36044800 |
|
2900 |
38441751 |
kobae964 |
E |
May 19, 2018, 8 p.m. |
OK |
GNU C++17 |
TESTS |
30 |
670 |
210636800 |
|
2900 |
55239253 |
Anachor |
E |
June 7, 2019, 10 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
686 |
45158400 |
|
2900 |
58562626 |
89264270823 |
E |
Aug. 11, 2019, 6:29 a.m. |
OK |
GNU C++17 |
TESTS |
30 |
1372 |
96153600 |
|
2900 |
7183202 |
uwi |
E |
July 20, 2014, 4:31 a.m. |
OK |
Java 7 |
TESTS |
30 |
2245 |
54169600 |
|
2900 |
25298463 |
DEGwer |
E |
March 6, 2017, 5:23 p.m. |
OK |
MS C++ |
TESTS |
30 |
982 |
113254400 |
|
2900 |
7174895 |
Um_nik |
E |
July 19, 2014, 3:48 p.m. |
OK |
MS C++ |
TESTS |
30 |
2199 |
60108800 |
|
2900 |
7187852 |
veckal |
E |
July 20, 2014, 4:05 p.m. |
OK |
MS C++ |
TESTS |
30 |
2215 |
44134400 |
|
2900 |
remove filters
Back to search problems