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"Professional sport is more than hard work. It also is the equipment, designed by top engineers. As an example, let's take tennis. Not only should you be in great shape, you also need an excellent racket! In this problem your task is to contribute to the development of tennis and to help to design a revolutionary new concept of a racket! The concept is a triangular racket. Ant it should be not just any triangle, but a regular one. As soon as you've chosen the shape, you need to stretch the net. By the time you came the rocket had n holes drilled on each of its sides. The holes divide each side into equal n xe2 x80 x89+ xe2 x80 x891 parts. At that, the m closest to each apex holes on each side are made for better ventilation only and you cannot stretch the net through them. The next revolutionary idea as to stretch the net as obtuse triangles through the holes, so that for each triangle all apexes lay on different sides. Moreover, you need the net to be stretched along every possible obtuse triangle. That's where we need your help -- help us to count the number of triangles the net is going to consist of. Two triangles are considered to be different if their pictures on the fixed at some position racket are different. The first and the only input line contains two integers n, m . Print a single number -- the answer to the problem. For the following picture n xe2 x80 x89= xe2 x80 x898, m xe2 x80 x89= xe2 x80 x892. White circles are the holes for ventilation, red circles -- holes for net stretching. One of the possible obtuse triangles is painted red. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
10288409 |
403369233 |
D |
March 15, 2015, 12:45 p.m. |
OK |
FPC |
TESTS |
26 |
1856 |
0 |
|
2600 |
9455858 |
ljz |
D |
Jan. 18, 2015, 12:24 p.m. |
OK |
FPC |
TESTS |
26 |
1980 |
0 |
|
2600 |
8426815 |
beantan1 |
D |
Oct. 27, 2014, 6:43 a.m. |
OK |
GNU C |
TESTS |
26 |
1965 |
0 |
|
2600 |
8426656 |
beantan1 |
D |
Oct. 27, 2014, 6:22 a.m. |
OK |
GNU C |
TESTS |
26 |
1965 |
0 |
|
2600 |
28291785 |
Scut82 |
D |
July 5, 2017, 1:29 a.m. |
OK |
GNU C++ |
TESTS |
26 |
795 |
2252800 |
|
2600 |
41972491 |
Scut82 |
D |
Aug. 22, 2018, 4:03 p.m. |
OK |
GNU C++ |
TESTS |
26 |
873 |
102400 |
|
2600 |
9386603 |
neetenin |
D |
Jan. 8, 2015, 2:04 p.m. |
OK |
GNU C++ |
TESTS |
26 |
936 |
0 |
|
2600 |
9072224 |
vfleaking |
D |
Dec. 10, 2014, 1:43 p.m. |
OK |
GNU C++ |
TESTS |
26 |
951 |
0 |
|
2600 |
8549035 |
yyt16384 |
D |
Nov. 4, 2014, 4:03 p.m. |
OK |
GNU C++ |
TESTS |
26 |
966 |
0 |
|
2600 |
37789036 |
Atreamjy |
D |
May 1, 2018, 5:38 a.m. |
OK |
GNU C++ |
TESTS |
26 |
982 |
3481600 |
|
2600 |
8446860 |
hta |
D |
Oct. 28, 2014, 7:10 a.m. |
OK |
GNU C++ |
TESTS |
26 |
998 |
0 |
|
2600 |
23335440 |
ShinFeb |
D |
Dec. 26, 2016, 8:09 a.m. |
OK |
GNU C++ |
TESTS |
26 |
1014 |
1843200 |
|
2600 |
15142866 |
HappyNewYearMike |
D |
Dec. 31, 2015, 10:49 p.m. |
OK |
GNU C++ |
TESTS |
26 |
1045 |
0 |
|
2600 |
8091449 |
yangle71 |
D |
Oct. 5, 2014, 2:08 p.m. |
OK |
GNU C++ |
TESTS |
26 |
1122 |
0 |
|
2600 |
7916979 |
equation314 |
D |
Sept. 23, 2014, 6:50 a.m. |
OK |
GNU C++0x |
TESTS |
26 |
1123 |
0 |
|
2600 |
7916992 |
equation314 |
D |
Sept. 23, 2014, 6:52 a.m. |
OK |
GNU C++0x |
TESTS |
26 |
1201 |
0 |
|
2600 |
3750696 |
error202 |
D |
May 20, 2013, 3:40 p.m. |
OK |
GNU C++0x |
TESTS |
26 |
2671 |
0 |
|
2600 |
3731456 |
freak93 |
D |
May 17, 2013, 7:43 p.m. |
OK |
GNU C++0x |
TESTS |
26 |
2671 |
0 |
|
2600 |
8288651 |
zshi |
D |
Oct. 18, 2014, 2:26 a.m. |
OK |
GNU C++0x |
TESTS |
26 |
2714 |
0 |
|
2600 |
57105878 |
Shine_Sky |
D |
July 15, 2019, 3:17 p.m. |
OK |
GNU C++11 |
TESTS |
26 |
997 |
0 |
|
2600 |
57896055 |
lopare |
D |
July 28, 2019, 1:37 p.m. |
OK |
GNU C++11 |
TESTS |
26 |
1341 |
0 |
|
2600 |
57821087 |
py_ultron |
D |
July 26, 2019, 11:17 p.m. |
OK |
GNU C++11 |
TESTS |
26 |
1341 |
0 |
|
2600 |
11761868 |
zld3794955 |
D |
June 25, 2015, 2:23 p.m. |
OK |
GNU C++11 |
TESTS |
26 |
1450 |
0 |
|
2600 |
39540133 |
zhouyuyang |
D |
June 23, 2018, 11:37 a.m. |
OK |
GNU C++11 |
TESTS |
26 |
1606 |
0 |
|
2600 |
38919073 |
rushcheyo |
D |
June 3, 2018, 11:26 a.m. |
OK |
GNU C++11 |
TESTS |
26 |
2215 |
3481600 |
|
2600 |
48163625 |
DeadPillow |
D |
Jan. 9, 2019, 9:24 p.m. |
OK |
GNU C++14 |
TESTS |
26 |
655 |
0 |
|
2600 |
51947048 |
davidberard |
D |
March 28, 2019, 5:29 p.m. |
OK |
GNU C++14 |
TESTS |
26 |
748 |
102400 |
|
2600 |
52284726 |
davidberard |
D |
April 3, 2019, 7:03 p.m. |
OK |
GNU C++14 |
TESTS |
26 |
779 |
102400 |
|
2600 |
51946833 |
davidberard |
D |
March 28, 2019, 5:22 p.m. |
OK |
GNU C++14 |
TESTS |
26 |
780 |
102400 |
|
2600 |
40187358 |
AwD |
D |
July 11, 2018, 3:01 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
1372 |
0 |
|
2600 |
23661445 |
Ali.Pi |
D |
Jan. 9, 2017, 7:10 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
1419 |
1945600 |
|
2600 |
40187877 |
wcz112 |
D |
July 11, 2018, 3:39 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
1450 |
0 |
|
2600 |
23393449 |
jasonvictoryan |
D |
Dec. 29, 2016, 8:59 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
1481 |
1945600 |
|
2600 |
69242528 |
pikmike |
D |
Jan. 21, 2020, 11:54 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
1778 |
307200 |
|
2600 |
49192027 |
black_horse2014 |
D |
Jan. 30, 2019, 8:39 a.m. |
OK |
GNU C++14 |
TESTS |
26 |
2106 |
102400 |
|
2600 |
48161680 |
MahmoudHamdyY |
D |
Jan. 9, 2019, 8 p.m. |
OK |
GNU C++17 |
TESTS |
26 |
748 |
204800 |
|
2600 |
40194174 |
tzxydby |
D |
July 11, 2018, 8:14 a.m. |
OK |
GNU C++17 |
TESTS |
26 |
873 |
409600 |
|
2600 |
40192894 |
vjudge5 |
D |
July 11, 2018, 7:34 a.m. |
OK |
GNU C++17 |
TESTS |
26 |
889 |
409600 |
|
2600 |
40989879 |
ReaLNero1 |
D |
July 30, 2018, 11:22 p.m. |
OK |
GNU C++17 |
TESTS |
26 |
951 |
102400 |
|
2600 |
40223777 |
vjudge5 |
D |
July 12, 2018, 7:52 a.m. |
OK |
GNU C++17 |
TESTS |
26 |
1388 |
0 |
|
2600 |
52995148 |
ruo |
D |
April 19, 2019, 3:08 a.m. |
OK |
GNU C++17 |
TESTS |
26 |
2074 |
0 |
|
2600 |
63367922 |
hjk1030 |
D |
Oct. 25, 2019, 8:14 a.m. |
OK |
GNU C++17 |
TESTS |
26 |
2152 |
0 |
|
2600 |
3730816 |
mmaxio |
D |
May 17, 2013, 5:35 p.m. |
OK |
Java 7 |
TESTS |
26 |
2718 |
0 |
|
2600 |
3732109 |
cerealguy |
D |
May 18, 2013, 4:54 a.m. |
OK |
Java 7 |
TESTS |
26 |
2968 |
0 |
|
2600 |
3734069 |
FattyPenguin |
D |
May 18, 2013, 3:20 p.m. |
OK |
MS C++ |
TESTS |
26 |
1031 |
0 |
|
2600 |
3734080 |
FattyPenguin |
D |
May 18, 2013, 3:23 p.m. |
OK |
MS C++ |
TESTS |
26 |
1046 |
0 |
|
2600 |
3734066 |
FattyPenguin |
D |
May 18, 2013, 3:20 p.m. |
OK |
MS C++ |
TESTS |
26 |
1046 |
0 |
|
2600 |
8234901 |
909475573 |
D |
Oct. 15, 2014, 8:09 a.m. |
OK |
MS C++ |
TESTS |
26 |
1263 |
0 |
|
2600 |
4219509 |
Anton_Lunyov |
D |
Aug. 3, 2013, 5:18 a.m. |
OK |
MS C++ |
TESTS |
26 |
1590 |
0 |
|
2600 |
3734033 |
FattyPenguin |
D |
May 18, 2013, 3:09 p.m. |
OK |
MS C++ |
TESTS |
26 |
2453 |
0 |
|
2600 |
remove filters
Back to search problems