Codeforces Round 196 (Div. 2)

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
337 Codeforces Round 196 (Div. 2) FINISHED False 7200 360770387 Aug. 16, 2013, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9447 ) B Routine Problem PROGRAMMING greedy math number theory 1400

B'Manao has a monitor. The screen of the monitor has horizontal to vertical length ratio a:b. Now he is going to watch a movie. The movie 's frame has horizontal to vertical length ratio c:d. Manao adjusts the view in such a way that the movie preserves the original frame ratio, but also occupies as much space on the screen as possible and fits within it completely. Thus, he may have to zoom the movie in or out, but Manao will always change the frame proportionally in both dimensions. Calculate the ratio of empty screen (the part of the screen not occupied by the movie) to the total screen size. Print the answer as an irreducible fraction p xe2 x80 x89/ xe2 x80 x89q. A single line contains four space-separated integers a, b, c, d (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b, xe2 x80 x89c, xe2 x80 x89d xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). Print the answer to the problem as "p/q", where p is a non-negative integer, q is a positive integer and numbers p and q don 't have a common divisor larger than 1. Sample 1. Manao 's monitor has a square screen. The movie has 3:2 horizontal to vertical length ratio. Obviously, the movie occupies most of the screen if the width of the picture coincides with the width of the screen. In this case, only 2/3 of the monitor will project the movie in the horizontal dimension: Sample 2. This time the monitor 's width is 4/3 times larger than its height and the movie 's frame is square. In this case, the picture must take up the whole monitor in the vertical dimension and only 3/4 in the horizontal dimension: '...

Tutorials

Codeforces Round #196 — Problems Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41582470 vjudge3 B Aug. 14, 2018, 8:51 a.m. OK Clang++17 Diagnostics TESTS 34 92 0 1400
68061130 Mxim B Jan. 2, 2020, 4:05 a.m. OK Clang++17 Diagnostics TESTS 34 92 0 1400
33904054 kenchi2 B Jan. 4, 2018, 1:30 p.m. OK GNU C TESTS 34 30 1843200 1400
40989611 ReaLNero1 B July 30, 2018, 11:06 p.m. OK GNU C TESTS 34 62 0 1400
39393769 WagdySamih63 B June 18, 2018, 10:54 p.m. OK GNU C TESTS 34 62 0 1400
29846793 ShafinKhadem B Aug. 28, 2017, 1:44 p.m. OK GNU C++ TESTS 34 30 0 1400
29691550 ziad.khobeiz B Aug. 22, 2017, 6:55 p.m. OK GNU C++ TESTS 34 30 0 1400
31167332 xuqijie B Oct. 9, 2017, 12:41 p.m. OK GNU C++ TESTS 34 30 0 1400
39040287 vjudge2 B June 8, 2018, 8:42 a.m. OK GNU C++ TESTS 34 30 0 1400
38646148 vjudge3 B May 27, 2018, 3:05 a.m. OK GNU C++ TESTS 34 30 0 1400
31999960 badassBitch B Nov. 3, 2017, 7:28 a.m. OK GNU C++ TESTS 34 30 0 1400
30935273 Sagar7390 B Oct. 2, 2017, 6:50 a.m. OK GNU C++ TESTS 34 30 0 1400
33279566 EfrenGonzalez B Dec. 16, 2017, 2:12 a.m. OK GNU C++ TESTS 34 30 1843200 1400
36036469 codocentric B March 7, 2018, 8 a.m. OK GNU C++ TESTS 34 30 2048000 1400
35589767 memoo B Feb. 23, 2018, 6:41 a.m. OK GNU C++ TESTS 34 30 2048000 1400
48946295 jalalium B Jan. 25, 2019, 7:19 p.m. OK GNU C11 TESTS 34 62 0 1400
63261650 kaiboy B Oct. 23, 2019, 8:36 p.m. OK GNU C11 TESTS 34 62 0 1400
54984265 hitman_28 B June 2, 2019, 2:48 p.m. OK GNU C11 TESTS 34 62 0 1400
32061571 rendon B Nov. 4, 2017, 7:01 p.m. OK GNU C++11 TESTS 34 30 0 1400
30213838 WinstonWolf B Sept. 8, 2017, 10:28 p.m. OK GNU C++11 TESTS 34 30 0 1400
30100229 vk_dravid B Sept. 5, 2017, 1:09 p.m. OK GNU C++11 TESTS 34 30 0 1400
58907814 Prof_BL B Aug. 16, 2019, 11:54 a.m. OK GNU C++11 TESTS 34 30 0 1400
32109658 GabitAskar B Nov. 7, 2017, 4:26 a.m. OK GNU C++11 TESTS 34 30 0 1400
53689213 vjudge4 B May 3, 2019, 3:26 a.m. OK GNU C++11 TESTS 34 30 0 1400
32092084 Omar B Nov. 6, 2017, 11:07 a.m. OK GNU C++11 TESTS 34 30 102400 1400
31973561 khaleesi B Nov. 2, 2017, 9:24 a.m. OK GNU C++11 TESTS 34 30 102400 1400
35610227 ahmed_sobhy B Feb. 23, 2018, 9:42 p.m. OK GNU C++11 TESTS 34 30 2048000 1400
35615566 vishal3410 B Feb. 24, 2018, 5:33 a.m. OK GNU C++11 TESTS 34 30 2048000 1400
65261730 ananrohit B Nov. 17, 2019, 3:16 p.m. OK GNU C++14 TESTS 34 30 0 1400
61230914 Hitman9972 B Sept. 24, 2019, 4:35 p.m. OK GNU C++14 TESTS 34 30 0 1400
54351796 RoyalCoderPRO B May 18, 2019, 3:16 p.m. OK GNU C++14 TESTS 34 30 0 1400
54001540 Kar98k B May 11, 2019, 4:40 p.m. OK GNU C++14 TESTS 34 30 0 1400
64758869 pratyushgoel99 B Nov. 12, 2019, 6:09 p.m. OK GNU C++14 TESTS 34 30 0 1400
61769563 BrehamPie B Oct. 3, 2019, 9:43 a.m. OK GNU C++14 TESTS 34 30 0 1400
61756741 aryan29 B Oct. 3, 2019, 5:48 a.m. OK GNU C++14 TESTS 34 30 0 1400
67458949 CoderAnshu B Dec. 23, 2019, 8:19 a.m. OK GNU C++14 TESTS 34 30 0 1400
69471617 Owmicron B Jan. 24, 2020, 2:43 p.m. OK GNU C++14 TESTS 34 30 0 1400
69540178 Mohamed_Sayed B Jan. 25, 2020, 8:58 p.m. OK GNU C++14 TESTS 34 30 0 1400
60413605 Vinayak_Dhiman B Sept. 12, 2019, 12:14 a.m. OK GNU C++17 TESTS 34 30 0 1400
69997992 _Hosam B Feb. 1, 2020, 10:57 p.m. OK GNU C++17 TESTS 34 30 0 1400
68432331 vjudge5 B Jan. 9, 2020, 7:26 a.m. OK GNU C++17 TESTS 34 30 0 1400
64587031 mostafiz_53 B Nov. 9, 2019, 1:37 p.m. OK GNU C++17 TESTS 34 30 0 1400
59190464 Voneone B Aug. 20, 2019, 8:44 p.m. OK GNU C++17 TESTS 34 30 0 1400
58606207 aakashsinghdude B Aug. 11, 2019, 1:49 p.m. OK GNU C++17 TESTS 34 30 0 1400
57470207 vjudge1 B July 21, 2019, 5:45 p.m. OK GNU C++17 TESTS 34 30 0 1400
54828134 algotron B May 30, 2019, 7:36 a.m. OK GNU C++17 TESTS 34 30 0 1400
53687887 cc12138cc B May 3, 2019, 2:32 a.m. OK GNU C++17 TESTS 34 30 0 1400
52616856 Shellyy B April 11, 2019, 6:55 p.m. OK GNU C++17 TESTS 34 30 0 1400
57951589 jmazon B July 29, 2019, 4:42 p.m. OK Haskell TESTS 34 62 102400 1400
30026675 sjain281297 B Sept. 3, 2017, 7:51 a.m. OK Java 8 TESTS 34 218 0 1400
69379022 shefali163 B Jan. 22, 2020, 7:04 p.m. OK Java 8 TESTS 34 218 0 1400
65960513 Oom B Nov. 29, 2019, 2:32 p.m. OK Java 8 TESTS 34 218 0 1400
65523271 an09mous B Nov. 22, 2019, 9:15 a.m. OK Java 8 TESTS 34 218 0 1400
63075347 eng_hardik B Oct. 21, 2019, 1:33 p.m. OK Java 8 TESTS 34 218 0 1400
59618864 maheshwari29 B Aug. 28, 2019, 1:36 p.m. OK Java 8 TESTS 34 218 0 1400
31128773 xoszm B Oct. 7, 2017, 9:44 p.m. OK Java 8 TESTS 34 218 0 1400
30971693 evil_beaver B Oct. 3, 2017, 3:33 p.m. OK Java 8 TESTS 34 218 0 1400
30649062 parth_15 B Sept. 23, 2017, 4:53 p.m. OK Java 8 TESTS 34 218 0 1400
30052674 zodiacleo B Sept. 4, 2017, 12:23 p.m. OK Java 8 TESTS 34 218 0 1400
32554226 krut B Nov. 22, 2017, 2:53 p.m. OK Mono C# TESTS 34 62 102400 1400
57849263 walticotc B July 27, 2019, 12:28 p.m. OK Mono C# TESTS 34 92 0 1400
54322195 speed439 B May 17, 2019, 10:23 p.m. OK Mono C# TESTS 34 92 0 1400
30355833 muhamed97 B Sept. 15, 2017, 2:53 a.m. OK MS C# TESTS 34 154 2560000 1400
30215969 Egoist_ B Sept. 9, 2017, 2:36 a.m. OK MS C++ TESTS 34 30 102400 1400
33634448 GMNY B Dec. 26, 2017, 1:04 a.m. OK MS C++ TESTS 34 30 2048000 1400
38256769 arianetemadi B May 15, 2018, 5:10 a.m. OK MS C++ TESTS 34 30 3481600 1400
68431108 vjudge4 B Jan. 9, 2020, 6:52 a.m. OK MS C++ TESTS 34 60 0 1400
43604929 vjudge2 B Sept. 30, 2018, 11:53 a.m. OK MS C++ TESTS 34 60 0 1400
43635494 LMCC B Oct. 1, 2018, 8:22 a.m. OK MS C++ TESTS 34 60 307200 1400
68445336 vjudge2 B Jan. 9, 2020, 12:29 p.m. OK MS C++ TESTS 34 62 0 1400
68689593 vjudge5 B Jan. 13, 2020, 5:27 a.m. OK MS C++ TESTS 34 62 0 1400
68446987 vjudge1 B Jan. 9, 2020, 1:03 p.m. OK MS C++ TESTS 34 62 0 1400
68446299 vjudge1 B Jan. 9, 2020, 12:48 p.m. OK MS C++ TESTS 34 62 0 1400
60416742 Hasv B Sept. 12, 2019, 2:53 a.m. OK MS C++ 2017 TESTS 34 60 0 1400
59572780 vjudge1 B Aug. 27, 2019, 1:09 p.m. OK MS C++ 2017 TESTS 34 62 0 1400
56834625 Natali1 B July 11, 2019, 8:30 a.m. OK MS C++ 2017 TESTS 34 62 0 1400
55719461 Ahmed_Mostafa11 B June 18, 2019, 2:30 p.m. OK MS C++ 2017 TESTS 34 62 0 1400
69802420 ahmed__shrif B Jan. 29, 2020, 11:24 p.m. OK MS C++ 2017 TESTS 34 62 307200 1400
69985582 ahmedo42 B Feb. 1, 2020, 5:43 p.m. OK MS C++ 2017 TESTS 34 62 307200 1400
69986053 ahmedo42 B Feb. 1, 2020, 5:51 p.m. OK MS C++ 2017 TESTS 34 62 307200 1400
56994013 reyad B July 13, 2019, 8:20 p.m. OK Node.js TESTS 34 342 204800 1400
29442297 Qumeric B Aug. 13, 2017, 7:26 p.m. OK PyPy 2 TESTS 34 374 29184000 1400
60492545 MouhcineTo1 B Sept. 13, 2019, 3:01 p.m. OK PyPy 2 TESTS 34 436 7782400 1400
57635651 chiefsan B July 24, 2019, 10:39 a.m. OK PyPy 3 TESTS 34 280 0 1400
67640248 vjudge1 B Dec. 26, 2019, 8:21 a.m. OK PyPy 3 TESTS 34 280 0 1400
66607194 chaudhary_19 B Dec. 10, 2019, 7:07 p.m. OK PyPy 3 TESTS 34 280 0 1400
66226768 lIn_nIl B Dec. 3, 2019, 12:54 p.m. OK PyPy 3 TESTS 34 280 0 1400
58705388 Gaurav1 B Aug. 13, 2019, 9:17 a.m. OK PyPy 3 TESTS 34 280 0 1400
56424369 ananya17020 B July 2, 2019, 8:52 a.m. OK PyPy 3 TESTS 34 280 0 1400
56164133 sujairamprasathc B June 27, 2019, 1:35 p.m. OK PyPy 3 TESTS 34 280 0 1400
59112444 rajat_2548 B Aug. 19, 2019, 9:56 p.m. OK PyPy 3 TESTS 34 310 0 1400
64716617 kchau B Nov. 11, 2019, 10:42 p.m. OK PyPy 3 TESTS 34 342 0 1400
33653384 nonis B Dec. 26, 2017, 4:43 p.m. OK PyPy 3 TESTS 34 560 39424000 1400
30418816 ashashwat B Sept. 17, 2017, 11:20 a.m. OK Python 2 TESTS 34 218 5324800 1400
67440674 mota_haathi B Dec. 22, 2019, 7:09 p.m. OK Python 2 TESTS 34 498 5324800 1400
54730330 youssef93 B May 27, 2019, 11:03 p.m. OK Python 2 TESTS 34 498 5324800 1400
54538678 kaif_7 B May 23, 2019, 10:05 p.m. OK Python 2 TESTS 34 498 5427200 1400
63837014 pranjal_99 B Oct. 30, 2019, 2:09 p.m. OK Python 2 TESTS 34 530 5324800 1400
32188136 sohamdighe14 B Nov. 10, 2017, 7:33 a.m. OK Python 3 TESTS 34 124 0 1400
29099523 vode B Aug. 1, 2017, 12:22 p.m. OK Python 3 TESTS 34 124 4608000 1400
32733481 jrojer B Nov. 27, 2017, 7:08 p.m. OK Python 3 TESTS 34 124 5529600 1400
39051171 Kausam_1234 B June 8, 2018, 4:47 p.m. OK Python 3 TESTS 34 156 0 1400
32715071 DRW B Nov. 27, 2017, 12:50 p.m. OK Python 3 TESTS 34 186 6656000 1400
54480969 MajAK B May 22, 2019, 11:02 a.m. OK Python 3 TESTS 34 216 0 1400
50696500 00_mini B March 2, 2019, 6:24 p.m. OK Python 3 TESTS 34 216 0 1400
63121749 C_Jack_Sparrow B Oct. 22, 2019, 11:31 a.m. OK Python 3 TESTS 34 218 0 1400
57817862 douglespereira B July 26, 2019, 8:48 p.m. OK Python 3 TESTS 34 218 0 1400
55502700 markovDPro B June 12, 2019, 3:55 p.m. OK Python 3 TESTS 34 218 0 1400
35860571 ______u______ B March 2, 2018, 9:44 p.m. OK Ruby TESTS 34 124 6451200 1400
35860386 ______n______ B March 2, 2018, 9:40 p.m. OK Ruby TESTS 34 124 6451200 1400
35859961 _____i_____ B March 2, 2018, 9:31 p.m. OK Ruby TESTS 34 124 6451200 1400
35859897 _____k_____ B March 2, 2018, 9:29 p.m. OK Ruby TESTS 34 124 6451200 1400
35856493 ______h______ B March 2, 2018, 8:21 p.m. OK Ruby TESTS 34 124 6451200 1400
35856489 ______k______ B March 2, 2018, 8:21 p.m. OK Ruby TESTS 34 124 6451200 1400
35855828 ______i______ B March 2, 2018, 8:08 p.m. OK Ruby TESTS 34 124 6451200 1400
35853546 ______M______ B March 2, 2018, 7:19 p.m. OK Ruby TESTS 34 124 6451200 1400

remove filters

Back to search problems