Codeforces Round 172 (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
281 Codeforces Round 172 (Div. 2) FINISHED False 7200 368893799 March 10, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3036 ) B Nearest Fraction PROGRAMMING brute force implementation two pointers 1700

B'You are given three positive integers x, xe2 x80 x89y, xe2 x80 x89n. Your task is to find the nearest fraction to fraction whose denominator is no more than n. Formally, you should find such pair of integers a, xe2 x80 x89b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n; 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a) that the value is as minimal as possible. If there are multiple "nearest" fractions, choose the one with the minimum denominator. If there are multiple "nearest" fractions with the minimum denominator, choose the one with the minimum numerator. A single line contains three integers x, xe2 x80 x89y, xe2 x80 x89n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x, xe2 x80 x89y, xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). Print the required fraction in the format "a/b" (without quotes).'...

Tutorials

Codeforces Round #172 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40978934 TShT B July 30, 2018, 4:52 p.m. OK FPC TESTS 33 62 0 1700
34615341 AiZi_ B Jan. 27, 2018, 6:58 p.m. OK GNU C++ TESTS 33 30 2048000 1700
27987902 rTraining1997 B June 23, 2017, 3:19 p.m. OK GNU C++ TESTS 33 30 2048000 1700
29282428 alice_v3.0.4 B Aug. 8, 2017, 9:38 a.m. OK GNU C++ TESTS 33 30 2150400 1700
28747640 Romansp B July 21, 2017, 10:39 a.m. OK GNU C++ TESTS 33 30 2150400 1700
39188793 vjudge2 B June 12, 2018, 10:50 a.m. OK GNU C++ TESTS 33 60 0 1700
32328098 FastLine B Nov. 15, 2017, 9:46 a.m. OK GNU C++ TESTS 33 60 0 1700
42073328 Learnerxy B Aug. 25, 2018, 2:43 a.m. OK GNU C++ TESTS 33 62 0 1700
40990124 ReaLNero1 B July 30, 2018, 11:37 p.m. OK GNU C++ TESTS 33 62 0 1700
40646754 Yasseenkamel B July 22, 2018, 4:49 p.m. OK GNU C++ TESTS 33 62 0 1700
40564912 -Bata B July 20, 2018, 4:34 a.m. OK GNU C++ TESTS 33 62 0 1700
29621677 rrah97 B Aug. 20, 2017, 1:05 p.m. OK GNU C++11 TESTS 33 30 0 1700
29510520 ea6102 B Aug. 16, 2017, 5:09 p.m. OK GNU C++11 TESTS 33 30 0 1700
27580152 eisenheim01 B June 5, 2017, 10:04 a.m. OK GNU C++11 TESTS 33 30 0 1700
27273221 xavier3 B May 21, 2017, 8:07 p.m. OK GNU C++11 TESTS 33 30 0 1700
31944136 spiderbatman B Nov. 1, 2017, 9:22 a.m. OK GNU C++11 TESTS 33 30 102400 1700
36307176 00a00 B March 15, 2018, 4:21 p.m. OK GNU C++11 TESTS 33 30 2048000 1700
35681916 code_kit B Feb. 25, 2018, 1:51 p.m. OK GNU C++11 TESTS 33 30 2048000 1700
33661076 Makushi B Dec. 27, 2017, 4:55 a.m. OK GNU C++11 TESTS 33 30 2048000 1700
31652768 maratonando B Oct. 23, 2017, 5:14 p.m. OK GNU C++11 TESTS 33 30 2048000 1700
28824724 AJAYHAYAGREEVE B July 24, 2017, 12:49 p.m. OK GNU C++11 TESTS 33 30 2048000 1700
58381034 YaraFarid B Aug. 6, 2019, 10 a.m. OK GNU C++14 TESTS 33 30 0 1700
54667768 gsaivishal B May 26, 2019, 2:24 p.m. OK GNU C++14 TESTS 33 30 0 1700
31923510 Dalenator B Oct. 31, 2017, 1:57 p.m. OK GNU C++14 TESTS 33 30 0 1700
31878739 Ownography B Oct. 29, 2017, 11:38 p.m. OK GNU C++14 TESTS 33 30 0 1700
31878728 Ownography B Oct. 29, 2017, 11:36 p.m. OK GNU C++14 TESTS 33 30 0 1700
31878724 Ownography B Oct. 29, 2017, 11:36 p.m. OK GNU C++14 TESTS 33 30 0 1700
30755816 akashravi B Sept. 26, 2017, 3:50 p.m. OK GNU C++14 TESTS 33 30 0 1700
30752974 hacker348 B Sept. 26, 2017, 2:02 p.m. OK GNU C++14 TESTS 33 30 0 1700
29732969 I-Love-Islam B Aug. 24, 2017, 2:03 p.m. OK GNU C++14 TESTS 33 30 0 1700
29718919 AMnu B Aug. 23, 2017, 11:25 p.m. OK GNU C++14 TESTS 33 30 0 1700
68368988 az110 B Jan. 7, 2020, 5:01 p.m. OK GNU C++17 TESTS 33 30 0 1700
66982169 m.shreyansh B Dec. 15, 2019, 4:48 p.m. OK GNU C++17 TESTS 33 30 0 1700
58943657 manideep8 B Aug. 17, 2019, 8 a.m. OK GNU C++17 TESTS 33 30 0 1700
50050477 prnvmlik B Feb. 17, 2019, 7:56 a.m. OK GNU C++17 TESTS 33 30 0 1700
47828207 jnk B Jan. 2, 2019, 3:21 a.m. OK GNU C++17 TESTS 33 30 0 1700
68778924 MrSKJ B Jan. 14, 2020, 2:21 p.m. OK GNU C++17 TESTS 33 60 0 1700
64286707 jineshj2800 B Nov. 5, 2019, 5:12 a.m. OK GNU C++17 TESTS 33 60 0 1700
59614029 TiredOfLife B Aug. 28, 2019, 11:59 a.m. OK GNU C++17 TESTS 33 60 0 1700
51103852 rishabh_sethi B March 9, 2019, 8:37 p.m. OK GNU C++17 TESTS 33 60 0 1700
47080300 shikhar7s B Dec. 15, 2018, 7:19 p.m. OK GNU C++17 TESTS 33 60 0 1700
47374744 deepak4669 B Dec. 22, 2018, 4:29 p.m. OK Java 8 TESTS 33 218 0 1700
28247540 tomdmitriev B July 3, 2017, 7:29 a.m. OK Java 8 TESTS 33 218 20480000 1700
56988866 BiggestPrime B July 13, 2019, 5:08 p.m. OK Java 8 TESTS 33 248 0 1700
56279267 shubhampasari B June 29, 2019, 3:53 p.m. OK Java 8 TESTS 33 248 0 1700
54257271 mennafadali B May 16, 2019, 9 p.m. OK Java 8 TESTS 33 248 0 1700
52820473 saurabhs1206 B April 16, 2019, 11:43 a.m. OK Java 8 TESTS 33 248 0 1700
47374688 deepak4669 B Dec. 22, 2018, 4:27 p.m. OK Java 8 TESTS 33 248 0 1700
32283324 Ahmad_Elsagheer B Nov. 13, 2017, 12:05 p.m. OK Java 8 TESTS 33 280 0 1700
31275698 sjain281297 B Oct. 13, 2017, 1:26 p.m. OK Java 8 TESTS 33 280 0 1700
45179292 Anonymous B Nov. 1, 2018, 4:23 p.m. OK Java 8 TESTS 33 528 0 1700
57510879 CtrlAlt B July 22, 2019, 1:45 p.m. OK MS C++ 2017 TESTS 33 218 0 1700
33985064 mayakin B Jan. 7, 2018, 2:31 p.m. OK PHP TESTS 33 92 5939200 1700
60255125 rajat_2548 B Sept. 8, 2019, 9 a.m. OK PyPy 2 TESTS 33 498 7782400 1700
61775272 Voneone B Oct. 3, 2019, 11:32 a.m. OK PyPy 3 TESTS 33 372 2355200 1700
34967576 Helgui B Feb. 6, 2018, 10:37 a.m. OK PyPy 3 TESTS 33 498 26214400 1700
62822151 ashok123 B Oct. 17, 2019, 5 p.m. OK PyPy 3 TESTS 33 622 16588800 1700
58822267 _Shravann_ B Aug. 14, 2019, 2:29 p.m. OK PyPy 3 TESTS 33 624 7475200 1700
58353592 co_devil B Aug. 5, 2019, 6:16 p.m. OK PyPy 3 TESTS 33 684 14745600 1700
36462218 QuwsarOhi B March 21, 2018, 6:32 p.m. OK PyPy 3 TESTS 33 686 31334400 1700
69638630 i_am_bread B Jan. 27, 2020, 7:43 p.m. OK PyPy 3 TESTS 33 778 10137600 1700
36648343 _4C3_ B March 26, 2018, 4:27 p.m. OK PyPy 3 TESTS 33 840 34713600 1700
59696182 kopok2 B Aug. 30, 2019, 8:41 a.m. OK PyPy 3 TESTS 33 1246 35225600 1700
36462031 QuwsarOhi B March 21, 2018, 6:22 p.m. OK PyPy 3 TESTS 33 1620 33177600 1700
31605669 WarBoy B Oct. 22, 2017, 1:52 p.m. OK Python 2 TESTS 33 218 9932800 1700
35857194 ______u______ B March 2, 2018, 8:34 p.m. OK Python 2 TESTS 33 248 9932800 1700
35857110 ______n______ B March 2, 2018, 8:34 p.m. OK Python 2 TESTS 33 248 9932800 1700
35856696 _____i_____ B March 2, 2018, 8:26 p.m. OK Python 2 TESTS 33 248 9932800 1700
35856589 _____k_____ B March 2, 2018, 8:23 p.m. OK Python 2 TESTS 33 248 9932800 1700
35847936 ______h______ B March 2, 2018, 4:51 p.m. OK Python 2 TESTS 33 248 9932800 1700
35847924 ______k______ B March 2, 2018, 4:51 p.m. OK Python 2 TESTS 33 248 9932800 1700
35847489 ______i______ B March 2, 2018, 4:45 p.m. OK Python 2 TESTS 33 248 9932800 1700
35842878 ______M______ B March 2, 2018, 3:01 p.m. OK Python 2 TESTS 33 248 9932800 1700
28800674 AshishYadav B July 23, 2017, 12:14 p.m. OK Python 2 TESTS 33 248 9932800 1700
32831740 AlessiaH B Dec. 1, 2017, 1:59 p.m. OK Python 3 TESTS 33 186 6656000 1700
34967561 Helgui B Feb. 6, 2018, 10:36 a.m. OK Python 3 TESTS 33 186 6758400 1700
32832205 AlessiaH B Dec. 1, 2017, 2:18 p.m. OK Python 3 TESTS 33 186 6758400 1700
32832171 AlessiaH B Dec. 1, 2017, 2:17 p.m. OK Python 3 TESTS 33 216 6656000 1700
39352440 ishita_3110 B June 18, 2018, 9:44 a.m. OK Python 3 TESTS 33 248 1126400 1700
29128502 Xcalibur55 B Aug. 2, 2017, 11:38 a.m. OK Python 3 TESTS 33 248 5836800 1700
36136486 pun250 B March 10, 2018, 4:45 a.m. OK Python 3 TESTS 33 248 6758400 1700
51913707 rumboalfuturo B March 27, 2019, 7:49 p.m. OK Python 3 TESTS 33 310 1126400 1700
49688455 deadguy B Feb. 10, 2019, 9:38 a.m. OK Python 3 TESTS 33 340 1126400 1700
59702760 ashwin2000 B Aug. 30, 2019, 11:22 a.m. OK Python 3 TESTS 33 342 1126400 1700

remove filters

Back to search problems