Codeforces Round 197 (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
339 Codeforces Round 197 (Div. 2) FINISHED False 7200 360167397 Aug. 26, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 71722 ) B Xenia and Ringroad PROGRAMMING implementation 1100

B"Xenia lives in a city that has n houses built along the main ringroad. The ringroad houses are numbered 1 through n in the clockwise order. The ringroad traffic is one way and also is clockwise. Xenia has recently moved into the ringroad house number 1. As a result, she's got m things to do. In order to complete the i-th task, she needs to be in the house number ai and complete all tasks with numbers less than i. Initially, Xenia is in the house number 1, find the minimum time she needs to complete all her tasks if moving from a house to a neighboring one along the ringroad takes one unit of time. The first line contains two integers n and m (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains m integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89am (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). Note that Xenia can have multiple consecutive tasks in one house. Print a single integer -- the time Xenia needs to complete all tasks. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier. In the first test example the sequence of Xenia's moves along the ringroad looks as follows: 1 xe2 x80 x89 xe2 x86 x92 xe2 x80 x892 xe2 x80 x89 xe2 x86 x92 xe2 x80 x893 xe2 x80 x89 xe2 x86 x92 xe2 x80 x894 xe2 x80 x89 xe2 x86 x92 xe2 x80 x891 xe2 x80 x89 xe2 x86 x92 xe2 x80 x892 xe2 x80 x89 xe2 x86 x92 xe2 x80 x893. This is optimal sequence. So, she needs 6 time units."...

Tutorials

Codeforces Round #197 — Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52537593 shihabsikder B April 9, 2019, 4:23 p.m. OK Clang++17 Diagnostics TESTS 29 122 0 1100
65762884 NAKIO B Nov. 26, 2019, 4:36 p.m. OK Clang++17 Diagnostics TESTS 29 124 0 1100
67681233 mahija2301 B Dec. 27, 2019, 6:31 a.m. OK Clang++17 Diagnostics TESTS 29 124 0 1100
64197877 Neeraj9436 B Nov. 4, 2019, 10:25 a.m. OK Clang++17 Diagnostics TESTS 29 124 0 1100
58895145 aman_xly B Aug. 16, 2019, 7:15 a.m. OK Clang++17 Diagnostics TESTS 29 810 0 1100
46971781 arjunluam5059 B Dec. 13, 2018, 2:14 p.m. OK Clang++17 Diagnostics TESTS 29 872 614400 1100
66508004 yogeshyogi1438 B Dec. 8, 2019, 3:12 p.m. OK Clang++17 Diagnostics TESTS 29 872 1024000 1100
50080955 Akbar_Ali B Feb. 18, 2019, 3:55 a.m. OK FPC TESTS 29 62 0 1100
65928411 canhtoanPASCAL B Nov. 28, 2019, 7:30 p.m. OK FPC TESTS 29 62 307200 1100
48394013 PhuongPeu B Jan. 14, 2019, 4:45 p.m. OK FPC TESTS 29 62 512000 1100
62913261 tranminhprvt01 B Oct. 19, 2019, 7:58 a.m. OK FPC TESTS 29 92 0 1100
60961530 Minh2409 B Sept. 21, 2019, 5:33 a.m. OK FPC TESTS 29 92 0 1100
60335513 SangTin B Sept. 10, 2019, 8:19 a.m. OK FPC TESTS 29 92 0 1100
50589712 0202 B Feb. 28, 2019, 6:39 a.m. OK FPC TESTS 29 92 0 1100
67348662 canhtoana2k23 B Dec. 21, 2019, 11:55 a.m. OK FPC TESTS 29 92 102400 1100
65960732 kien05012006 B Nov. 29, 2019, 2:36 p.m. OK FPC TESTS 29 92 204800 1100
59088740 YuLeo B Aug. 19, 2019, 12:01 p.m. OK FPC TESTS 29 92 409600 1100
60730821 akash19jain B Sept. 17, 2019, 3:38 p.m. OK GNU C11 TESTS 29 62 0 1100
61094309 shivtuls B Sept. 23, 2019, 1:20 a.m. OK GNU C11 TESTS 29 62 0 1100
62396975 Jarif_aabir B Oct. 12, 2019, 5:54 a.m. OK GNU C11 TESTS 29 62 0 1100
62621933 akshithaadepu B Oct. 15, 2019, 1:04 p.m. OK GNU C11 TESTS 29 62 0 1100
64507009 lakj02 B Nov. 8, 2019, 7:18 a.m. OK GNU C11 TESTS 29 62 0 1100
65134075 Jatin_Hack B Nov. 16, 2019, 5:17 a.m. OK GNU C11 TESTS 29 62 0 1100
65474663 Faiaz-1999 B Nov. 21, 2019, 9:34 a.m. OK GNU C11 TESTS 29 62 0 1100
67688310 asma23 B Dec. 27, 2019, 9:56 a.m. OK GNU C11 TESTS 29 62 0 1100
67857784 baezilisK B Dec. 29, 2019, 6:49 a.m. OK GNU C11 TESTS 29 62 0 1100
68912694 ssense B Jan. 16, 2020, 7:56 a.m. OK GNU C11 TESTS 29 62 0 1100
48107596 Scut82 B Jan. 9, 2019, 6:47 a.m. OK GNU C++11 TESTS 29 60 1638400 1100
59912002 sumit99 B Sept. 2, 2019, 5:36 p.m. OK GNU C++11 TESTS 29 62 0 1100
61941714 vjudge3 B Oct. 5, 2019, 8:09 p.m. OK GNU C++11 TESTS 29 62 0 1100
64185356 vjudge4 B Nov. 4, 2019, 4:39 a.m. OK GNU C++11 TESTS 29 62 0 1100
64543138 vjudge3 B Nov. 8, 2019, 7:24 p.m. OK GNU C++11 TESTS 29 62 0 1100
59335063 zhhheidi B Aug. 23, 2019, 4:06 a.m. OK GNU C++11 TESTS 29 62 0 1100
68279589 kavya07 B Jan. 5, 2020, 4:36 p.m. OK GNU C++11 TESTS 29 62 0 1100
69399140 brahman B Jan. 23, 2020, 7:41 a.m. OK GNU C++11 TESTS 29 62 0 1100
69643759 rns2452 B Jan. 27, 2020, 10:54 p.m. OK GNU C++11 TESTS 29 62 0 1100
66513859 rishi_888 B Dec. 8, 2019, 5:56 p.m. OK GNU C++11 TESTS 29 62 0 1100
65328729 mjonathan B Nov. 19, 2019, 4:11 a.m. OK GNU C++14 TESTS 29 62 0 1100
69315763 yash_31 B Jan. 22, 2020, 2:50 p.m. OK GNU C++14 TESTS 29 62 0 1100
68386746 mostDish B Jan. 8, 2020, 6:21 a.m. OK GNU C++14 TESTS 29 62 0 1100
67973208 sharmaji_ka_beta B Dec. 30, 2019, 3:50 p.m. OK GNU C++14 TESTS 29 62 0 1100
67566711 user9039 B Dec. 24, 2019, 7:39 p.m. OK GNU C++14 TESTS 29 62 0 1100
66788016 cybertrone B Dec. 13, 2019, 2:18 p.m. OK GNU C++14 TESTS 29 62 0 1100
64346505 Keyvan1382 B Nov. 6, 2019, 6:34 a.m. OK GNU C++14 TESTS 29 62 0 1100
61678070 Flying-Raiden B Oct. 1, 2019, 9:53 p.m. OK GNU C++14 TESTS 29 62 0 1100
59958229 yez-zain B Sept. 3, 2019, 4:58 p.m. OK GNU C++14 TESTS 29 62 0 1100
59620181 krisham801 B Aug. 28, 2019, 1:58 p.m. OK GNU C++14 TESTS 29 62 0 1100
63347890 Ar_9020_th B Oct. 24, 2019, 8:05 p.m. OK GNU C++17 TESTS 29 62 0 1100
64185361 YXDHJL B Nov. 4, 2019, 4:39 a.m. OK GNU C++17 TESTS 29 62 0 1100
64531816 KerakTelor B Nov. 8, 2019, 3:40 p.m. OK GNU C++17 TESTS 29 62 0 1100
64656655 BATM4N B Nov. 10, 2019, 7:28 p.m. OK GNU C++17 TESTS 29 62 0 1100
65448863 Gary_McKinnon B Nov. 20, 2019, 5:09 p.m. OK GNU C++17 TESTS 29 62 0 1100
66194499 elliot.alderson B Dec. 2, 2019, 5:50 p.m. OK GNU C++17 TESTS 29 62 0 1100
66453993 dyrroth B Dec. 7, 2019, 12:30 p.m. OK GNU C++17 TESTS 29 62 0 1100
68368652 vbvsharma B Jan. 7, 2020, 4:54 p.m. OK GNU C++17 TESTS 29 62 0 1100
69422631 Mostafa.Negm B Jan. 23, 2020, 2:51 p.m. OK GNU C++17 TESTS 29 62 0 1100
69547559 ChandVachhani_ B Jan. 26, 2020, 4:17 a.m. OK GNU C++17 TESTS 29 62 0 1100
52857407 lehonghai104 B April 16, 2019, 4:02 p.m. OK Go TESTS 29 92 716800 1100
67773594 purushi.gkp B Dec. 28, 2019, 7:58 a.m. OK Go TESTS 29 186 0 1100
51069934 suryanshv23 B March 9, 2019, 7:20 a.m. OK Go TESTS 29 186 0 1100
56828670 Cybuster B July 11, 2019, 5:57 a.m. OK Haskell TESTS 29 436 13721600 1100
52809193 altjsus B April 16, 2019, 7:24 a.m. OK Haskell TESTS 29 436 13721600 1100
69581364 arran B Jan. 26, 2020, 5:31 p.m. OK Java 11 TESTS 29 342 0 1100
66521511 davisrollman B Dec. 8, 2019, 11:11 p.m. OK Java 11 TESTS 29 372 0 1100
66897123 arvind_713 B Dec. 15, 2019, 2:43 a.m. OK Java 11 TESTS 29 560 0 1100
66617628 Hello_All B Dec. 11, 2019, 5:14 a.m. OK Java 11 TESTS 29 560 0 1100
69556860 robertvictor B Jan. 26, 2020, 9:09 a.m. OK Java 11 TESTS 29 590 0 1100
67762235 vinnay B Dec. 27, 2019, 11:45 p.m. OK Java 11 TESTS 29 590 0 1100
66240241 arvind_713 B Dec. 3, 2019, 5:50 p.m. OK Java 11 TESTS 29 590 0 1100
69953776 a.goel_ B Feb. 1, 2020, 9:37 a.m. OK Java 11 TESTS 29 592 0 1100
69612568 Felz B Jan. 27, 2020, 12:03 p.m. OK Java 11 TESTS 29 592 0 1100
69396290 Subbu742 B Jan. 23, 2020, 6:27 a.m. OK Java 11 TESTS 29 592 0 1100
61568115 p_unit B Sept. 30, 2019, 5:43 p.m. OK Java 8 TESTS 29 216 0 1100
57971010 darwin0 B July 30, 2019, 5:55 a.m. OK Java 8 TESTS 29 218 0 1100
56543700 PP98 B July 5, 2019, 6:39 a.m. OK Java 8 TESTS 29 218 0 1100
55745623 prakhar897 B June 19, 2019, 9:51 a.m. OK Java 8 TESTS 29 218 0 1100
55483478 foreverlearner B June 12, 2019, 6:39 a.m. OK Java 8 TESTS 29 218 0 1100
54334417 KharYusuf B May 18, 2019, 7:26 a.m. OK Java 8 TESTS 29 218 0 1100
48941966 abhi2601 B Jan. 25, 2019, 4:59 p.m. OK Java 8 TESTS 29 218 0 1100
48675487 harsh.awasthi B Jan. 21, 2019, 11:17 a.m. OK Java 8 TESTS 29 218 0 1100
47171917 jenish9599 B Dec. 17, 2018, 3:27 p.m. OK Java 8 TESTS 29 218 0 1100
46943964 keshavag007 B Dec. 12, 2018, 6:31 p.m. OK Java 8 TESTS 29 218 0 1100
49983426 codepractice412 B Feb. 16, 2019, 9:23 a.m. OK JavaScript TESTS 29 156 13414400 1100
69683778 slemus B Jan. 28, 2020, 4:24 p.m. OK Kotlin TESTS 29 342 5324800 1100
54960109 _AhmedEssam B June 2, 2019, 3:09 a.m. OK Kotlin TESTS 29 434 3481600 1100
56740336 mgkbadola B July 9, 2019, 7:24 a.m. OK Kotlin TESTS 29 434 3481600 1100
47823162 lolipop54321 B Jan. 1, 2019, 7:27 p.m. OK Kotlin TESTS 29 436 4915200 1100
59662322 Aaghoz_Daar B Aug. 29, 2019, 12:58 p.m. OK Kotlin TESTS 29 466 0 1100
55100345 IM7MDHaMdYI B June 4, 2019, 7:46 p.m. OK Kotlin TESTS 29 466 0 1100
62875045 jonlik2 B Oct. 18, 2019, 3:01 p.m. OK Kotlin TESTS 29 466 3379200 1100
47469176 konvpalto B Dec. 24, 2018, 8:34 p.m. OK Kotlin TESTS 29 466 3584000 1100
52355569 bougelahi438 B April 5, 2019, 4:38 p.m. OK Kotlin TESTS 29 468 0 1100
68394741 suslov93 B Jan. 8, 2020, 10:28 a.m. OK Mono C# TESTS 29 154 6246400 1100
69178521 ChediDaan B Jan. 20, 2020, 9:05 a.m. OK Mono C# TESTS 29 154 6246400 1100
59868085 tm-green B Sept. 1, 2019, 6:03 p.m. OK Mono C# TESTS 29 154 6656000 1100
51139025 Giangvp B March 10, 2019, 6 p.m. OK Mono C# TESTS 29 154 6656000 1100
61272960 Yorty B Sept. 25, 2019, 2:34 p.m. OK Mono C# TESTS 29 154 8806400 1100
66485416 75number B Dec. 8, 2019, 6:04 a.m. OK Mono C# TESTS 29 156 6246400 1100
63992189 dewha B Nov. 1, 2019, 1:30 p.m. OK Mono C# TESTS 29 156 6656000 1100
63238872 zeinab B Oct. 23, 2019, 12:57 p.m. OK Mono C# TESTS 29 156 12697600 1100
48941103 Kon567889 B Jan. 25, 2019, 4:33 p.m. OK Mono C# TESTS 29 186 6348800 1100
69477858 asya.fl B Jan. 24, 2020, 4:46 p.m. OK Mono C# TESTS 29 186 11264000 1100
50078681 vjudge2 B Feb. 18, 2019, 1:37 a.m. OK MS C++ TESTS 29 62 0 1100
50299105 vjudge5 B Feb. 22, 2019, 12:14 a.m. OK MS C++ TESTS 29 62 409600 1100
56748413 vjudge3 B July 9, 2019, 10:53 a.m. OK MS C++ TESTS 29 62 512000 1100
59092445 vjudge5 B Aug. 19, 2019, 1:09 p.m. OK MS C++ TESTS 29 62 165068800 1100
50044898 vjudge2 B Feb. 17, 2019, 5:15 a.m. OK MS C++ TESTS 29 92 0 1100
50078667 asQWER B Feb. 18, 2019, 1:36 a.m. OK MS C++ TESTS 29 92 0 1100
51947308 vjudge3 B March 28, 2019, 5:38 p.m. OK MS C++ TESTS 29 92 0 1100
59576674 vjudge4 B Aug. 27, 2019, 2:24 p.m. OK MS C++ TESTS 29 92 409600 1100
56739006 vjudge4 B July 9, 2019, 6:48 a.m. OK MS C++ TESTS 29 92 409600 1100
63225628 vjudge4 B Oct. 23, 2019, 9:13 a.m. OK MS C++ TESTS 29 92 409600 1100
51585508 aleonov B March 20, 2019, 4:11 p.m. OK MS C++ 2017 TESTS 29 62 0 1100
61657883 Angptr B Oct. 1, 2019, 4:31 p.m. OK MS C++ 2017 TESTS 29 92 0 1100
62521996 Varshitha_raj B Oct. 13, 2019, 4:03 p.m. OK MS C++ 2017 TESTS 29 92 0 1100
61658074 vjudge3 B Oct. 1, 2019, 4:32 p.m. OK MS C++ 2017 TESTS 29 92 0 1100
61541686 vjudge5 B Sept. 30, 2019, 9:03 a.m. OK MS C++ 2017 TESTS 29 92 0 1100
54907340 Watch_Dog_Vintorez B June 1, 2019, 9:26 a.m. OK MS C++ 2017 TESTS 29 92 0 1100
49490190 CLF B Feb. 5, 2019, 9:15 a.m. OK MS C++ 2017 TESTS 29 92 0 1100
52935902 2017ccut_wuqishuo B April 18, 2019, 6:24 a.m. OK MS C++ 2017 TESTS 29 92 409600 1100
59977966 1816020205 B Sept. 4, 2019, 6:55 a.m. OK MS C++ 2017 TESTS 29 92 409600 1100
66979653 Shiyuzhi B Dec. 15, 2019, 3:54 p.m. OK MS C++ 2017 TESTS 29 92 409600 1100
67418794 TitanRoyal B Dec. 22, 2019, 10:54 a.m. OK Node.js TESTS 29 342 11468800 1100
67191069 Naick B Dec. 19, 2019, 7:06 a.m. OK Node.js TESTS 29 372 11878400 1100
60725542 porhunov26 B Sept. 17, 2019, 1:45 p.m. OK PascalABC.NET TESTS 29 498 0 1100
53056253 dymeon B April 20, 2019, 5:38 p.m. OK PascalABC.NET TESTS 29 746 614400 1100
49606479 newperson B Feb. 7, 2019, 7:47 p.m. OK PascalABC.NET TESTS 29 748 409600 1100
62666977 saitejakatukam B Oct. 16, 2019, 8:10 a.m. OK Perl TESTS 29 122 10137600 1100
47038173 snotinka B Dec. 15, 2018, 1:23 p.m. OK PHP TESTS 29 122 12185600 1100
48703664 kevinbowie02 B Jan. 22, 2019, 4:41 a.m. OK PHP TESTS 29 124 7987200 1100
62893597 hritik3878 B Oct. 18, 2019, 9:58 p.m. OK PyPy 2 TESTS 29 278 5427200 1100
67976881 raj1307 B Dec. 30, 2019, 5:18 p.m. OK PyPy 2 TESTS 29 280 5939200 1100
58985892 Madhur1906 B Aug. 18, 2019, 7:03 a.m. OK PyPy 2 TESTS 29 280 6246400 1100
49984871 mohammdomar19 B Feb. 16, 2019, 10:06 a.m. OK PyPy 2 TESTS 29 310 6758400 1100
53059786 the_antagonist B April 20, 2019, 6:14 p.m. OK PyPy 2 TESTS 29 342 6451200 1100
65620990 Sakib58 B Nov. 24, 2019, 6:12 a.m. OK PyPy 2 TESTS 29 434 6553600 1100
53488410 ayush_mittal B April 29, 2019, 6:33 a.m. OK PyPy 3 TESTS 29 342 10547200 1100
53847792 SarveshDubey B May 7, 2019, 11:58 a.m. OK PyPy 3 TESTS 29 342 10547200 1100
51413649 Kadtsin_vs B March 17, 2019, 1:05 p.m. OK PyPy 3 TESTS 29 342 10547200 1100
48455492 Siddak B Jan. 16, 2019, 12:29 p.m. OK PyPy 3 TESTS 29 342 10547200 1100
48388266 deadguy B Jan. 14, 2019, 2:04 p.m. OK PyPy 3 TESTS 29 342 10547200 1100
54140830 ecnarag B May 14, 2019, 5:36 p.m. OK PyPy 3 TESTS 29 342 11059200 1100
65807564 19n1900011773 B Nov. 27, 2019, 8:56 a.m. OK PyPy 3 TESTS 29 372 10547200 1100
54881664 amin_pial B May 31, 2019, 2:41 p.m. OK PyPy 3 TESTS 29 372 10649600 1100
47596338 FireFoxIl B Dec. 27, 2018, 6:43 p.m. OK PyPy 3 TESTS 29 372 11264000 1100
68252388 17wh1a0534 B Jan. 5, 2020, 2:24 p.m. OK PyPy 3 TESTS 29 374 8806400 1100
48527319 krish7 B Jan. 18, 2019, 9:42 a.m. OK Python 2 TESTS 29 436 5324800 1100
47033056 Dragon12014804 B Dec. 15, 2018, 10:55 a.m. OK Python 2 TESTS 29 436 5324800 1100
49503903 angoncal B Feb. 5, 2019, 4:35 p.m. OK Python 2 TESTS 29 466 5324800 1100
62542996 cybertron1609 B Oct. 14, 2019, 4:51 a.m. OK Python 2 TESTS 29 498 5427200 1100
55572096 arman.t B June 14, 2019, 7:35 p.m. OK Python 2 TESTS 29 498 5836800 1100
51145273 Rafelaa B March 10, 2019, 11:13 p.m. OK Python 2 TESTS 29 528 5427200 1100
59886134 pranjal_99 B Sept. 2, 2019, 8:02 a.m. OK Python 2 TESTS 29 528 6246400 1100
60709481 bxtbxksxd123 B Sept. 17, 2019, 7:24 a.m. OK Python 2 TESTS 29 530 6144000 1100
57611335 solzard B July 23, 2019, 9:06 p.m. OK Python 3 TESTS 29 280 7065600 1100
66138019 Navantock7 B Dec. 1, 2019, 1:05 p.m. OK Python 3 TESTS 29 280 7372800 1100
52435524 houle_hiro B April 7, 2019, 3:07 a.m. OK Python 3 TESTS 29 280 7372800 1100
51342179 btcnhung.1299 B March 15, 2019, 4:42 p.m. OK Python 3 TESTS 29 280 7372800 1100
47703678 zapdospops B Dec. 29, 2018, 6:32 p.m. OK Python 3 TESTS 29 310 5632000 1100
46995615 18k4 B Dec. 14, 2018, 8:15 a.m. OK Python 3 TESTS 29 310 5632000 1100
46995194 buranbaev.den B Dec. 14, 2018, 7:56 a.m. OK Python 3 TESTS 29 310 5632000 1100
46977151 timur8554 B Dec. 13, 2018, 5:16 p.m. OK Python 3 TESTS 29 310 5632000 1100
46974318 leog40 B Dec. 13, 2018, 3:39 p.m. OK Python 3 TESTS 29 310 5632000 1100
46974215 Julia_palm B Dec. 13, 2018, 3:35 p.m. OK Python 3 TESTS 29 310 5632000 1100
51946589 tarptaeya B March 28, 2019, 5:16 p.m. OK Ruby TESTS 29 310 16588800 1100
60367007 matijap B Sept. 10, 2019, 9:43 p.m. OK Rust TESTS 29 62 2048000 1100
58984922 Gediminas B Aug. 18, 2019, 6:35 a.m. OK Rust TESTS 29 62 3174400 1100
50258181 hir12111 B Feb. 20, 2019, 9:07 p.m. OK Rust TESTS 29 62 4915200 1100
60505656 jonyrock B Sept. 13, 2019, 9:21 p.m. OK Rust TESTS 29 92 2969600 1100
55372830 tuna_salad B June 9, 2019, 4:40 p.m. OK Rust TESTS 29 92 4505600 1100

remove filters

Back to search problems