Codeforces Round 421 (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
819 Codeforces Round 421 (Div. 1) FINISHED False 7200 277831523 June 27, 2017, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 230 ) C Mister B and Beacons on Field PROGRAMMING number theory 3000

Mister B has a house in the middle of a giant plain field, which attracted aliens life. For convenience, aliens specified the Cartesian coordinate system on the field in such a way that Mister B's house has coordinates (0, 0) . After that they sent three beacons to the field, but something went wrong. One beacon was completely destroyed, while the other two landed in positions with coordinates ( m , 0) and (0, n ) , respectively, but shut down. Mister B was interested in this devices, so he decided to take them home. He came to the first beacon, placed at ( m , 0) , lifted it up and carried the beacon home choosing the shortest path. After that he came to the other beacon, placed at (0, n ) , and also carried it home choosing the shortest path. When first beacon was lifted up, the navigation system of the beacons was activated. Partially destroyed navigation system started to work in following way. At time moments when both survived beacons are at points with integer coordinates the system tries to find a location for the third beacon. It succeeds if and only if there is a point with integer coordinates such that the area of the triangle formed by the two survived beacons and this point is equal to s . In this case the system sends a packet of information with beacon positions to aliens, otherwise it doesn't. Compute how many packets of information system sent while Mister B was moving the beacons. The first line contains one integer t ( 1 ≤ t ≤ 1000 ) — the number of test cases. The next 3· t lines describe t test cases. Every test case is described in three lines as follows. Note that each parameter is given as a product of three factors. The first line of a test case contains three space-separated integers: n 1 , n 2 , n 3 ( 1 ≤ n i ≤ 10 6 ) such that n = n 1 · n 2 · n 3 . The second line contains three space-separated integers: m 1 , m 2 , m 3 ( 1 ≤ m i ≤ 10 6 ) such that m = m 1 · m 2 · m 3 . The third line contains three space-separated integers: s 1

Tutorials

Codeforces Round #421 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
28114686 wanna_yellow C June 28, 2017, 11:41 a.m. OK GNU C++ TESTS 20 124 34201600 3000
28096886 kutengine C June 27, 2017, 4:26 p.m. OK GNU C++ TESTS 20 686 23756800 3000
28113852 xc01 C June 28, 2017, 10:58 a.m. OK GNU C++ TESTS 20 717 23756800 3000
28159993 xzyxzy C June 30, 2017, midnight OK GNU C++ TESTS 20 966 2048000 3000
28106956 jiyutian C June 28, 2017, 3:10 a.m. OK GNU C++ TESTS 20 982 1945600 3000
28106784 jiyutian C June 28, 2017, 2:52 a.m. OK GNU C++ TESTS 20 982 1945600 3000
28101323 skywalkert C June 27, 2017, 6:13 p.m. OK GNU C++ TESTS 20 1014 17920000 3000
28141386 Talon_F C June 29, 2017, 2:09 p.m. OK GNU C++ TESTS 20 1154 1945600 3000
28096230 xumingkuan C June 27, 2017, 4:22 p.m. OK GNU C++ TESTS 20 1185 2048000 3000
30265541 __stdcall C Sept. 11, 2017, 12:40 p.m. OK GNU C++ TESTS 20 1247 15872000 3000
28092204 LHiC C June 27, 2017, 3:52 p.m. OK GNU C++11 TESTS 20 140 12083200 3000
28139155 PlayfulPanda C June 29, 2017, 12:13 p.m. OK GNU C++11 TESTS 20 420 18124800 3000
28289074 fsouza C July 4, 2017, 8:25 p.m. OK GNU C++11 TESTS 20 452 2150400 3000
28289077 fsouza C July 4, 2017, 8:25 p.m. OK GNU C++11 TESTS 20 468 2150400 3000
28091726 ACRush C June 27, 2017, 3:49 p.m. OK GNU C++11 TESTS 20 702 2969600 3000
28096714 ecnerwala C June 27, 2017, 4:25 p.m. OK GNU C++11 TESTS 20 951 13721600 3000
28203626 Twishkle.Aevdark C July 2, 2017, 5:24 a.m. OK GNU C++11 TESTS 20 967 7065600 3000
28265202 fsouza C July 3, 2017, 9:37 p.m. OK GNU C++11 TESTS 20 1075 2150400 3000
28492620 Totoro C July 13, 2017, 6:47 a.m. OK GNU C++11 TESTS 20 1154 2252800 3000
28813020 yrz C July 24, 2017, 3:29 a.m. OK GNU C++11 TESTS 20 1170 6860800 3000
40980665 ReaLNero1 C July 30, 2018, 5:38 p.m. OK GNU C++14 TESTS 20 78 409600 3000
28091546 al13n C June 27, 2017, 3:47 p.m. OK GNU C++14 TESTS 20 78 2150400 3000
34777047 LiChenKoh C Jan. 31, 2018, 6:01 p.m. OK GNU C++14 TESTS 20 249 11980800 3000
28094378 anta C June 27, 2017, 4:09 p.m. OK GNU C++14 TESTS 20 296 6860800 3000
28101662 Reyna C June 27, 2017, 6:29 p.m. OK GNU C++14 TESTS 20 296 98304000 3000
57981765 Scut82 C July 30, 2019, 9:40 a.m. OK GNU C++14 TESTS 20 545 80179200 3000
28181842 la1la1la C July 1, 2017, 1:02 a.m. OK GNU C++14 TESTS 20 951 46080000 3000
28133208 lys1280023 C June 29, 2017, 6:48 a.m. OK GNU C++14 TESTS 20 1060 8704000 3000
39321145 iqqsoszs C June 16, 2018, 11:44 p.m. OK GNU C++14 TESTS 20 1075 5120000 3000
31884749 King_George C Oct. 30, 2017, 8:19 a.m. OK GNU C++14 TESTS 20 1107 67379200 3000
61558789 vjudge2 C Sept. 30, 2019, 2:52 p.m. OK GNU C++17 TESTS 20 857 4198400 3000
42252694 Benq C Aug. 29, 2018, 6:32 p.m. OK GNU C++17 TESTS 20 1669 409600 3000
28107749 uwi C June 28, 2017, 4:35 a.m. OK Java 8 TESTS 20 1185 20582400 3000
28098879 mmaxio C June 27, 2017, 5:09 p.m. OK Java 8 TESTS 20 2027 39628800 3000
44823297 vjudge1 C Oct. 25, 2018, 4:11 a.m. OK Java 8 TESTS 20 4523 0 3000
28091325 natalia C June 27, 2017, 3:46 p.m. OK MS C++ TESTS 20 1840 2150400 3000
28124582 Filyan C June 28, 2017, 5:30 p.m. OK MS C++ TESTS 20 2011 8499200 3000
28124111 Filyan C June 28, 2017, 4:56 p.m. OK MS C++ TESTS 20 4508 5939200 3000
28124344 Filyan C June 28, 2017, 5:13 p.m. OK MS C++ TESTS 20 4539 6144000 3000
28124487 Filyan C June 28, 2017, 5:23 p.m. OK MS C++ TESTS 20 4555 6144000 3000

remove filters

Back to search problems