Codeforces Round 140 (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
226 Codeforces Round 140 (Div. 1) FINISHED False 7200 389025023 Sept. 24, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 921 ) C Anniversary PROGRAMMING data structures implementation math matrices number theory 2100

B"There are less than 60 years left till the 900-th birthday anniversary of a famous Italian mathematician Leonardo Fibonacci. Of course, such important anniversary needs much preparations. Dima is sure that it'll be great to learn to solve the following problem by the Big Day: You're given a set A, consisting of numbers l, l xe2 x80 x89+ xe2 x80 x891, l xe2 x80 x89+ xe2 x80 x892, ..., r; let's consider all its k-element subsets; for each such subset let's find the largest common divisor of Fibonacci numbers with indexes, determined by the subset elements. Among all found common divisors, Dima is interested in the largest one. Dima asked to remind you that Fibonacci numbers are elements of a numeric sequence, where F1 xe2 x80 x89= xe2 x80 x891, F2 xe2 x80 x89= xe2 x80 x891, Fn xe2 x80 x89= xe2 x80 x89Fn xe2 x80 x89- xe2 x80 x891 xe2 x80 x89+ xe2 x80 x89Fn xe2 x80 x89- xe2 x80 x892 for n xe2 x80 x89 xe2 x89 xa5 xe2 x80 x893. Dima has more than half a century ahead to solve the given task, but you only have two hours. Count the residue from dividing the sought largest common divisor by m. The first line contains four space-separated integers m, l, r and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89< xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891012; 2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89- xe2 x80 x89l xe2 x80 x89+ xe2 x80 x891). Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use cin, cout streams or the %I64d specifier. Print a single integer -- the residue from dividing the sought greatest common divisor by m."...

Tutorials

Codeforces Round #140 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2259968 micheal_wanzi C Sept. 27, 2012, 4:14 p.m. OK FPC TESTS 150 31 0 2100
2382838 wxyz1234 C Oct. 18, 2012, 9:02 a.m. OK FPC TESTS 150 187 0 2100
2250477 i_love_gold_and_nt C Sept. 25, 2012, 3:25 p.m. OK FPC TESTS 150 359 102400 2100
2254908 AleksanderBalobanov C Sept. 27, 2012, 5:57 a.m. OK FPC TESTS 150 390 144384000 2100
2246875 scorpion C Sept. 24, 2012, 7:41 p.m. OK FPC TESTS 150 468 0 2100
2251950 RazeN C Sept. 26, 2012, 6:19 a.m. OK FPC TESTS 150 546 102400 2100
2251547 lydrainbowcat C Sept. 26, 2012, 2:09 a.m. OK FPC TESTS 150 578 102400 2100
3473459 evima C April 4, 2013, 2:52 p.m. OK GNU C++ TESTS 150 15 1024000 2100
15143741 HappyNewYearMike C Dec. 31, 2015, 11:42 p.m. OK GNU C++ TESTS 150 30 0 2100
2299301 guille C Oct. 4, 2012, 1:17 p.m. OK GNU C++ TESTS 150 31 0 2100
2250428 Cycoderr C Sept. 25, 2012, 3:16 p.m. OK GNU C++ TESTS 150 31 0 2100
2250711 Arterm C Sept. 25, 2012, 4:20 p.m. OK GNU C++ TESTS 150 31 0 2100
2254655 nannan C Sept. 27, 2012, 2:55 a.m. OK GNU C++ TESTS 150 31 0 2100
2628515 emonzhong C Nov. 22, 2012, 5:55 p.m. OK GNU C++ TESTS 150 31 0 2100
2562280 wowo1gt C Nov. 15, 2012, 9:11 a.m. OK GNU C++ TESTS 150 31 0 2100
2320521 fqw C Oct. 8, 2012, 2:04 a.m. OK GNU C++ TESTS 150 31 0 2100
2254926 coolinging C Sept. 27, 2012, 6:08 a.m. OK GNU C++ TESTS 150 31 0 2100
2247767 Archon.JK C Sept. 25, 2012, 2:58 a.m. OK GNU C++0x TESTS 150 78 0 2100
2267884 MinakoKojima C Sept. 29, 2012, 12:56 a.m. OK GNU C++0x TESTS 150 78 0 2100
2267882 MinakoKojima C Sept. 29, 2012, 12:54 a.m. OK GNU C++0x TESTS 150 78 0 2100
2240401 watashi C Sept. 24, 2012, 4:11 p.m. OK GNU C++0x TESTS 150 78 0 2100
3264725 BryantMark C March 8, 2013, 7:38 a.m. OK GNU C++0x TESTS 150 78 0 2100
2268680 MinakoKojima C Sept. 29, 2012, 9:47 a.m. OK GNU C++0x TESTS 150 78 0 2100
2267898 MinakoKojima C Sept. 29, 2012, 1:14 a.m. OK GNU C++0x TESTS 150 78 0 2100
2267890 MinakoKojima C Sept. 29, 2012, 1:02 a.m. OK GNU C++0x TESTS 150 78 0 2100
7040200 FancyCoder C July 7, 2014, 11:06 a.m. OK GNU C++0x TESTS 150 124 0 2100
7855965 ecapia C Sept. 19, 2014, 3:59 p.m. OK GNU C++0x TESTS 150 124 0 2100
17323989 giwoo123 C April 15, 2016, 8:39 a.m. OK GNU C++11 TESTS 150 30 0 2100
48032147 NRK7 C Jan. 6, 2019, 1:06 p.m. OK GNU C++11 TESTS 150 92 0 2100
14163765 joey2005 C Nov. 9, 2015, 3:36 a.m. OK GNU C++11 TESTS 150 92 0 2100
44486214 xielinhan C Oct. 18, 2018, 12:32 p.m. OK GNU C++11 TESTS 150 92 0 2100
45706363 drzewiec C Nov. 14, 2018, 11:47 a.m. OK GNU C++11 TESTS 150 92 0 2100
61595974 vjudge1 C Oct. 1, 2019, 8:51 a.m. OK GNU C++11 TESTS 150 92 0 2100
57775969 J2Pasuing C July 26, 2019, 3:31 a.m. OK GNU C++11 TESTS 150 92 0 2100
57443587 luogu_bot5 C July 21, 2019, 7:32 a.m. OK GNU C++11 TESTS 150 92 0 2100
54999577 SoiMae C June 3, 2019, 3:25 a.m. OK GNU C++11 TESTS 150 92 0 2100
54997368 SoiMae C June 3, 2019, 12:52 a.m. OK GNU C++11 TESTS 150 92 0 2100
30932880 LiChenKoh C Oct. 2, 2017, 4:32 a.m. OK GNU C++14 TESTS 150 62 0 2100
54057725 walht C May 13, 2019, 9:21 a.m. OK GNU C++14 TESTS 150 92 0 2100
69269865 Gazra C Jan. 21, 2020, 8:22 p.m. OK GNU C++14 TESTS 150 92 0 2100
63742003 phibrain C Oct. 29, 2019, 5:17 p.m. OK GNU C++14 TESTS 150 92 0 2100
62649401 ayk16 C Oct. 15, 2019, 8:53 p.m. OK GNU C++14 TESTS 150 92 0 2100
60837587 1706915033 C Sept. 19, 2019, 9:38 a.m. OK GNU C++14 TESTS 150 92 0 2100
56483650 whyamievenhere C July 3, 2019, 5:18 p.m. OK GNU C++14 TESTS 150 92 0 2100
56061681 mgg C June 26, 2019, 5:50 a.m. OK GNU C++14 TESTS 150 92 0 2100
56028268 sarthak1220 C June 25, 2019, 8:08 a.m. OK GNU C++14 TESTS 150 92 0 2100
31877628 blue__legend C Oct. 29, 2017, 9:33 p.m. OK GNU C++14 TESTS 150 92 0 2100
43364202 Muhammad-2004 C Sept. 24, 2018, 11:23 a.m. OK GNU C++17 TESTS 150 62 0 2100
46277059 ivan100sic C Nov. 27, 2018, 11:25 a.m. OK GNU C++17 TESTS 150 92 0 2100
43364065 majk C Sept. 24, 2018, 11:18 a.m. OK GNU C++17 TESTS 150 92 0 2100
57943831 vjudge2 C July 29, 2019, 1:33 p.m. OK GNU C++17 TESTS 150 92 0 2100
49221436 yhchang3 C Jan. 30, 2019, 7:23 p.m. OK GNU C++17 TESTS 150 92 307200 2100
50312616 donbasta C Feb. 22, 2019, 10:36 a.m. OK GNU C++17 TESTS 150 122 204800 2100
60383510 kilotaras C Sept. 11, 2019, 10:27 a.m. OK GNU C++17 TESTS 150 124 0 2100
57746510 IGVA C July 25, 2019, 1:13 p.m. OK GNU C++17 TESTS 150 124 0 2100
60383521 vjudge5 C Sept. 11, 2019, 10:28 a.m. OK GNU C++17 TESTS 150 124 0 2100
57982045 1024_20171786 C July 30, 2019, 9:46 a.m. OK GNU C++17 TESTS 150 124 0 2100
2246009 Egor C Sept. 24, 2012, 6:34 p.m. OK Java 6 TESTS 150 140 0 2100
2355278 mukku C Oct. 13, 2012, 12:54 p.m. OK Java 6 TESTS 150 218 0 2100
2246291 todo C Sept. 24, 2012, 6:44 p.m. OK Java 6 TESTS 150 234 0 2100
2246565 todo C Sept. 24, 2012, 7:01 p.m. OK Java 6 TESTS 150 234 0 2100
2247310 uwi C Sept. 24, 2012, 10:32 p.m. OK Java 6 TESTS 150 359 0 2100
2248574 wangzhu C Sept. 25, 2012, 8:15 a.m. OK Java 6 TESTS 150 500 16179200 2100
2251880 Azat_Yusupov C Sept. 26, 2012, 5:46 a.m. OK Java 6 TESTS 150 1687 0 2100
2255320 mingotlik C Sept. 27, 2012, 9:12 a.m. OK Java 6 TESTS 150 1734 0 2100
2248954 alexey.enkov C Sept. 25, 2012, 9:59 a.m. OK Java 7 TESTS 150 93 0 2100
3955550 THE_QUEEN_IN_THE_NORTH C June 24, 2013, 1:02 p.m. OK Java 7 TESTS 150 187 0 2100
3955446 gcd_fuck C June 24, 2013, 12:41 p.m. OK Java 7 TESTS 150 187 0 2100
3955454 gcd_fuck C June 24, 2013, 12:42 p.m. OK Java 7 TESTS 150 203 0 2100
2246165 nitegazer C Sept. 24, 2012, 6:39 p.m. OK Java 7 TESTS 150 203 0 2100
2242722 yaro C Sept. 24, 2012, 4:42 p.m. OK Java 7 TESTS 150 203 0 2100
2270266 islam-al-aarag C Sept. 30, 2012, 3:55 a.m. OK Java 7 TESTS 150 218 0 2100
2246426 oimaster C Sept. 24, 2012, 6:51 p.m. OK Java 7 TESTS 150 312 0 2100
2246127 S.Yesipenko C Sept. 24, 2012, 6:38 p.m. OK Java 7 TESTS 150 328 0 2100
12035180 santa_calus C July 14, 2015, 2:10 a.m. OK Java 8 TESTS 150 1090 74137600 2100
43444010 wrong_lemma C Sept. 26, 2018, 10:31 a.m. OK Java 8 TESTS 150 1372 100044800 2100
2339219 mylifefordota C Oct. 11, 2012, 1:41 p.m. OK Mono C# TESTS 150 234 102400 2100
2243625 it4.kp C Sept. 24, 2012, 4:57 p.m. OK Mono C# TESTS 150 968 1843200 2100
2245297 pooya_ C Sept. 24, 2012, 5:24 p.m. OK MS C++ TESTS 150 31 0 2100
2254600 lost3030 C Sept. 27, 2012, 2:06 a.m. OK MS C++ TESTS 150 31 0 2100
2296997 goodhope C Oct. 3, 2012, 7:13 p.m. OK MS C++ TESTS 150 31 0 2100
2240548 -DMYTRO- C Sept. 24, 2012, 4:13 p.m. OK MS C++ TESTS 150 62 0 2100
2247180 Ilya_MSU C Sept. 24, 2012, 9:04 p.m. OK MS C++ TESTS 150 78 0 2100
57938319 vjudge5 C July 29, 2019, 11:39 a.m. OK MS C++ TESTS 150 92 0 2100
2251858 XilinX C Sept. 26, 2012, 5:40 a.m. OK MS C++ TESTS 150 93 0 2100
2266073 kesongyu C Sept. 28, 2012, 12:22 p.m. OK MS C++ TESTS 150 109 0 2100
2246689 Milanin C Sept. 24, 2012, 7:15 p.m. OK MS C++ TESTS 150 109 0 2100
11982272 fiter C July 9, 2015, 8:59 a.m. OK MS C++ TESTS 150 124 0 2100
2248707 dut200901102 C Sept. 25, 2012, 8:55 a.m. OK Python 2 TESTS 150 62 0 2100
2247373 drbitboy C Sept. 24, 2012, 11:36 p.m. OK Python 2 TESTS 150 78 0 2100
35841481 ______k______ C March 2, 2018, 2:37 p.m. OK Python 2 TESTS 150 154 4608000 2100
35838481 ______M______ C March 2, 2018, 1:34 p.m. OK Python 2 TESTS 150 154 4608000 2100
35841220 ______i______ C March 2, 2018, 2:32 p.m. OK Python 2 TESTS 150 154 4608000 2100
35848655 ______u______ C March 2, 2018, 5:01 p.m. OK Python 2 TESTS 150 154 4608000 2100
35848527 ______n______ C March 2, 2018, 5:01 p.m. OK Python 2 TESTS 150 154 4608000 2100
35848255 _____i_____ C March 2, 2018, 4:56 p.m. OK Python 2 TESTS 150 154 4608000 2100
35848220 _____k_____ C March 2, 2018, 4:56 p.m. OK Python 2 TESTS 150 154 4608000 2100
35841591 ______h______ C March 2, 2018, 2:38 p.m. OK Python 2 TESTS 150 154 4608000 2100

remove filters

Back to search problems