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 |
---|---|---|---|---|---|---|
982 | Codeforces Round 484 (Div. 2) | FINISHED | False | 7200 | 210950723 | May 17, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 726 ) | E | Billiard | PROGRAMMING | geometry number theory | 2500 |
B"Consider a billiard table of rectangular size n x m with four pockets. Let's introduce a coordinate system with the origin at the lower left corner (see the picture). There is one ball at the point (x, y) currently. Max comes to the table and strikes the ball. The ball starts moving along a line that is parallel to one of the axes or that makes a 45^{ circ} angle with them. We will assume that: Note that the ball can move along some side, in this case the ball will just fall into the pocket at the end of the side. Your task is to determine whether the ball will fall into a pocket eventually, and if yes, which of the four pockets it will be. The only line contains 6 integers n , m , x , y , v_x , v_y ( 1 <= q n, m <= q 10^9 , 0 <= q x <= q n ; 0 <= q y <= q m ; -1 <= q v_x, v_y <= q 1 ; (v_x, v_y) neq (0, 0) ) -- the width of the table, the length of the table, the x -coordinate of the initial position of the ball, the y -coordinate of the initial position of the ball, the x -component of its initial speed and the y -component of its initial speed, respectively. It is guaranteed that the ball is not initially in a pocket. Print the coordinates of the pocket the ball will fall into, or -1 if the ball will move indefinitely. The first sample: The second sample: In the third sample the ball will never change its y coordinate, so the ball will never fall into a pocket. "... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
45496806 | dsbvcvc432 | E | Nov. 10, 2018, 2:03 a.m. | OK | Clang++17 Diagnostics | TESTS | 101 | 46 | 307200 | 2500 | |
38406491 | Faimerth | E | May 18, 2018, 4:51 p.m. | OK | GNU C | TESTS | 101 | 31 | 0 | 2500 | |
38406467 | Faimerth | E | May 18, 2018, 4:50 p.m. | OK | GNU C | TESTS | 101 | 31 | 0 | 2500 | |
42282833 | hmfzy | E | Aug. 30, 2018, 3:12 p.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
41669816 | vjudge3 | E | Aug. 17, 2018, 3:54 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
41515918 | kecaj | E | Aug. 12, 2018, 6:05 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
41102472 | vjudge3 | E | Aug. 2, 2018, 1:53 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
40994293 | Scut82 | E | July 31, 2018, 2:37 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
40759360 | vjudge5 | E | July 26, 2018, 2:22 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
40759174 | vjudge3 | E | July 26, 2018, 2:14 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
40699243 | vjudge3 | E | July 24, 2018, 9:40 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
38578680 | fpdqwq | E | May 24, 2018, 6:54 a.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
38538760 | KatherineLOVER | E | May 22, 2018, 2:31 p.m. | OK | GNU C++ | TESTS | 101 | 31 | 0 | 2500 | |
39593263 | Singlesilly | E | June 24, 2018, 7:15 a.m. | OK | GNU C++11 | TESTS | 101 | 30 | 0 | 2500 | |
38483940 | 251 | E | May 21, 2018, 1:01 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 0 | 2500 | |
38436672 | sy_chen | E | May 19, 2018, 4:21 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 0 | 2500 | |
38376699 | iordache.bogdan | E | May 17, 2018, 6:13 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 0 | 2500 | |
38376243 | Batrr | E | May 17, 2018, 6:09 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 0 | 2500 | |
38925139 | Knight_23 | E | June 3, 2018, 3:47 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 3481600 | 2500 | |
38805760 | a1214034447 | E | May 31, 2018, 2:57 p.m. | OK | GNU C++11 | TESTS | 101 | 30 | 3481600 | 2500 | |
64442217 | fujibayashi__kyou | E | Nov. 7, 2019, 4:56 a.m. | OK | GNU C++11 | TESTS | 101 | 31 | 0 | 2500 | |
64123316 | dawn_dark | E | Nov. 3, 2019, 3:03 a.m. | OK | GNU C++11 | TESTS | 101 | 31 | 0 | 2500 | |
63961806 | BenjaR | E | Nov. 1, 2019, 5:33 a.m. | OK | GNU C++11 | TESTS | 101 | 31 | 0 | 2500 | |
38446533 | Emiso | E | May 20, 2018, 3:49 a.m. | OK | GNU C++14 | TESTS | 101 | 15 | 307200 | 2500 | |
38431687 | ReaLNero | E | May 19, 2018, 1:07 p.m. | OK | GNU C++14 | TESTS | 101 | 15 | 307200 | 2500 | |
39684801 | ch.hui.yin.ch | E | June 26, 2018, 7:34 p.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
39640471 | jjikkollp | E | June 25, 2018, 6:39 a.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
39220545 | Valiors | E | June 13, 2018, 3:29 p.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
39201082 | Valiors | E | June 12, 2018, 8:43 p.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
38698037 | toomas | E | May 28, 2018, 3:20 p.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
38389667 | zhouzhendong | E | May 18, 2018, 5:21 a.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
38383632 | antguz | E | May 17, 2018, 10 p.m. | OK | GNU C++14 | TESTS | 101 | 30 | 0 | 2500 | |
43175926 | xproxmess | E | Sept. 21, 2018, 11:20 a.m. | OK | GNU C++14 | TESTS | 101 | 30 | 307200 | 2500 | |
39201816 | EDGsheryl | E | June 12, 2018, 9:52 p.m. | OK | GNU C++17 | TESTS | 101 | 30 | 0 | 2500 | |
38979010 | Jakube | E | June 5, 2018, 8:54 p.m. | OK | GNU C++17 | TESTS | 101 | 30 | 0 | 2500 | |
38683321 | RNS3 | E | May 28, 2018, 3:07 a.m. | OK | GNU C++17 | TESTS | 101 | 30 | 0 | 2500 | |
38649254 | nbsjy | E | May 27, 2018, 6:53 a.m. | OK | GNU C++17 | TESTS | 101 | 30 | 0 | 2500 | |
38381652 | mandinga | E | May 17, 2018, 8:17 p.m. | OK | GNU C++17 | TESTS | 101 | 30 | 0 | 2500 | |
38457909 | Adalbert | E | May 20, 2018, 11:37 a.m. | OK | GNU C++17 | TESTS | 101 | 30 | 307200 | 2500 | |
38453803 | akaring | E | May 20, 2018, 9:15 a.m. | OK | GNU C++17 | TESTS | 101 | 30 | 307200 | 2500 | |
38389537 | Cydiater | E | May 18, 2018, 5:15 a.m. | OK | GNU C++17 | TESTS | 101 | 30 | 307200 | 2500 | |
66465630 | Rafaaaaaaaaaaaam | E | Dec. 7, 2019, 4:25 p.m. | OK | GNU C++17 | TESTS | 101 | 31 | 0 | 2500 | |
65594596 | Slaaava | E | Nov. 23, 2019, 3:23 p.m. | OK | GNU C++17 | TESTS | 101 | 31 | 0 | 2500 | |
38567441 | stczhc | E | May 23, 2018, 4:13 p.m. | OK | Haskell | TESTS | 101 | 15 | 8499200 | 2500 | |
38567855 | stczhc | E | May 23, 2018, 4:36 p.m. | OK | Haskell | TESTS | 101 | 46 | 8601600 | 2500 | |
44062296 | aminul | E | Oct. 10, 2018, 6:48 a.m. | OK | Java 8 | TESTS | 101 | 124 | 0 | 2500 | |
39392414 | iamavalon | E | June 18, 2018, 9:23 p.m. | OK | Java 8 | TESTS | 101 | 124 | 0 | 2500 | |
38384662 | malev.alexey | E | May 17, 2018, 11:38 p.m. | OK | Java 8 | TESTS | 101 | 124 | 0 | 2500 | |
38384473 | Harpae | E | May 17, 2018, 11:18 p.m. | OK | Java 8 | TESTS | 101 | 124 | 0 | 2500 | |
39891352 | mr_smith | E | July 3, 2018, 10:58 a.m. | OK | Java 8 | TESTS | 101 | 139 | 0 | 2500 | |
38391910 | Darth_Jar_Jar_Binks | E | May 18, 2018, 6:51 a.m. | OK | Java 8 | TESTS | 101 | 139 | 0 | 2500 | |
38384406 | xiaowuc1 | E | May 17, 2018, 11:10 p.m. | OK | Java 8 | TESTS | 101 | 139 | 0 | 2500 | |
38384388 | xiaowuc1 | E | May 17, 2018, 11:08 p.m. | OK | Java 8 | TESTS | 101 | 139 | 0 | 2500 | |
38378625 | hiromi_ayase | E | May 17, 2018, 6:30 p.m. | OK | Java 8 | TESTS | 101 | 139 | 0 | 2500 | |
39275646 | tri | E | June 15, 2018, 10:04 p.m. | OK | Java 8 | TESTS | 101 | 140 | 0 | 2500 | |
38571596 | olpetOdessaONU | E | May 23, 2018, 8:05 p.m. | OK | MS C++ | TESTS | 101 | 30 | 0 | 2500 | |
44379623 | vjudge1 | E | Oct. 16, 2018, 2:18 a.m. | OK | MS C++ | TESTS | 101 | 31 | 0 | 2500 | |
38442933 | BaturaDima | E | May 19, 2018, 9:29 p.m. | OK | MS C++ | TESTS | 101 | 31 | 0 | 2500 | |
38408128 | xsc | E | May 18, 2018, 6:08 p.m. | OK | MS C++ | TESTS | 101 | 31 | 0 | 2500 | |
61593715 | vjudge5 | E | Oct. 1, 2019, 7:59 a.m. | OK | MS C++ | TESTS | 101 | 46 | 0 | 2500 | |
57272019 | vjudge4 | E | July 18, 2019, 9:14 a.m. | OK | MS C++ 2017 | TESTS | 101 | 46 | 0 | 2500 | |
38373861 | kmjp | E | May 17, 2018, 5:48 p.m. | OK | PyPy 2 | TESTS | 101 | 93 | 0 | 2500 | |
46826515 | ThmCuong | E | Dec. 9, 2018, 6:45 p.m. | OK | PyPy 2 | TESTS | 101 | 139 | 0 | 2500 | |
38376208 | BaaaaaaaaaaaaaaarkingDog | E | May 17, 2018, 6:08 p.m. | OK | PyPy 3 | TESTS | 101 | 124 | 0 | 2500 | |
38533384 | CN_zwang2002 | E | May 22, 2018, 11:32 a.m. | OK | Python 2 | TESTS | 101 | 109 | 0 | 2500 | |
38390453 | WNG | E | May 18, 2018, 5:53 a.m. | OK | Python 2 | TESTS | 101 | 109 | 0 | 2500 | |
38383829 | OMGTallMonster | E | May 17, 2018, 10:14 p.m. | OK | Python 2 | TESTS | 101 | 109 | 0 | 2500 | |
40915159 | lessthanleast | E | July 29, 2018, 11:15 a.m. | OK | Python 2 | TESTS | 101 | 171 | 0 | 2500 | |
39022608 | Atlantis592 | E | June 7, 2018, 1:20 p.m. | OK | Python 3 | TESTS | 101 | 78 | 0 | 2500 | |
38384584 | Ali_Pi | E | May 17, 2018, 11:29 p.m. | OK | Python 3 | TESTS | 101 | 78 | 0 | 2500 | |
38382787 | pyrus | E | May 17, 2018, 9:06 p.m. | OK | Python 3 | TESTS | 101 | 78 | 0 | 2500 | |
38406437 | kjp4155 | E | May 18, 2018, 4:48 p.m. | OK | Python 3 | TESTS | 101 | 93 | 102400 | 2500 | |
38401378 | JHSN | E | May 18, 2018, 12:35 p.m. | OK | Python 3 | TESTS | 101 | 93 | 1024000 | 2500 | |
38455280 | Korrah | E | May 20, 2018, 10:18 a.m. | OK | Python 3 | TESTS | 101 | 108 | 0 | 2500 | |
38381055 | BigBag | E | May 17, 2018, 7:59 p.m. | OK | Python 3 | TESTS | 101 | 108 | 0 | 2500 | |
51963121 | FuyuMai12 | E | March 29, 2019, 8:18 a.m. | OK | Python 3 | TESTS | 101 | 187 | 1228800 | 2500 |
Back to search problems