Codeforces Round 495 (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
1004 Codeforces Round 495 (Div. 2) FINISHED False 7200 206717123 July 5, 2018, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7583 ) C Sonya and Robots PROGRAMMING constructive algorithms implementation 1400

B'Since Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers. Sonya has drawn n numbers in a row, a_i is located in the i -th position. She also has put a robot at each end of the row (to the left of the first number and to the right of the last number). Sonya will give a number to each robot (they can be either same or different) and run them. When a robot is running, it is moving toward to another robot, reading numbers in the row. When a robot is reading a number that is equal to the number that was given to that robot, it will turn off and stay in the same position. Sonya does not want robots to break, so she will give such numbers that robots will stop before they meet. That is, the girl wants them to stop at different positions so that the first robot is to the left of the second one. For example, if the numbers [1, 5, 4, 1, 3] are written, and Sonya gives the number 1 to the first robot and the number 4 to the second one, the first robot will stop in the 1 -st position while the second one in the 3 -rd position. In that case, robots will not meet each other. As a result, robots will not be broken. But if Sonya gives the number 4 to the first robot and the number 5 to the second one, they will meet since the first robot will stop in the 3 -rd position while the second one is in the 2 -nd position. Sonya understands that it does not make sense to give a number that is not written in the row because a robot will not find this number and will meet the other robot. Sonya is now interested in finding the number of different pairs that she can give to robots so that they will not meet. In other words, she wants to know the number of pairs ( p , q ), where she will give p to the first robot and q to the second one. Pairs ( p_i , q_i ) and ( p_j , q_j ) are different if p_i neq p_j or q_i neq q_'...

Tutorials

60443

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39999166 ruban C July 5, 2018, 5:22 p.m. OK Delphi TESTS 42 62 100966400 1400
39998762 Ulanov_Victor C July 5, 2018, 5:19 p.m. OK FPC TESTS 42 46 2764800 1400
39999734 TShT C July 5, 2018, 5:27 p.m. OK FPC TESTS 42 46 5632000 1400
40003315 jstimpfle C July 5, 2018, 6:02 p.m. OK GNU C TESTS 42 46 1228800 1400
39996466 freyes C July 5, 2018, 5:04 p.m. OK GNU C TESTS 42 46 1638400 1400
40003906 DanielixS C July 5, 2018, 6:09 p.m. OK GNU C TESTS 42 61 4812800 1400
39998363 Dfkdsmbd C July 5, 2018, 5:16 p.m. OK GNU C++ TESTS 42 31 1024000 1400
39996423 VisJiao C July 5, 2018, 5:04 p.m. OK GNU C++ TESTS 42 31 1024000 1400
39993918 Dis_19260817 C July 5, 2018, 4:52 p.m. OK GNU C++ TESTS 42 31 1024000 1400
39999021 Pigbrain C July 5, 2018, 5:21 p.m. OK GNU C++ TESTS 42 31 1433600 1400
40001462 bitetheDDDDt C July 5, 2018, 5:43 p.m. OK GNU C++ TESTS 42 46 512000 1400
39997523 scudrt C July 5, 2018, 5:11 p.m. OK GNU C++ TESTS 42 46 716800 1400
40006160 Ceres C July 5, 2018, 6:33 p.m. OK GNU C++ TESTS 42 46 921600 1400
39999329 InvalidSubmission C July 5, 2018, 5:24 p.m. OK GNU C++ TESTS 42 46 921600 1400
39997476 ToErr C July 5, 2018, 5:10 p.m. OK GNU C++ TESTS 42 46 921600 1400
39996086 sxy_to_the_end C July 5, 2018, 5:02 p.m. OK GNU C++ TESTS 42 46 921600 1400
39996656 Jhamra C July 5, 2018, 5:05 p.m. OK GNU C++11 TESTS 42 31 1638400 1400
39993851 yah01 C July 5, 2018, 4:52 p.m. OK GNU C++11 TESTS 42 31 2457600 1400
40001787 VincentLx C July 5, 2018, 5:46 p.m. OK GNU C++11 TESTS 42 31 5222400 1400
39997062 LittleFall C July 5, 2018, 5:08 p.m. OK GNU C++11 TESTS 42 31 28057600 1400
40001472 QAQorz C July 5, 2018, 5:43 p.m. OK GNU C++11 TESTS 42 46 716800 1400
39997063 rzy_99 C July 5, 2018, 5:08 p.m. OK GNU C++11 TESTS 42 46 716800 1400
39996785 Sherlock221B C July 5, 2018, 5:06 p.m. OK GNU C++11 TESTS 42 46 819200 1400
39998784 sad_club_piece C July 5, 2018, 5:19 p.m. OK GNU C++11 TESTS 42 46 819200 1400
39996596 xt1213 C July 5, 2018, 5:05 p.m. OK GNU C++11 TESTS 42 46 921600 1400
39994794 BekzhanKassenov C July 5, 2018, 4:56 p.m. OK GNU C++11 TESTS 42 46 921600 1400
39995630 Linkus C July 5, 2018, 5 p.m. OK GNU C++14 TESTS 42 31 1638400 1400
39996360 kwazar C July 5, 2018, 5:04 p.m. OK GNU C++14 TESTS 42 46 409600 1400
39995129 antony191 C July 5, 2018, 4:58 p.m. OK GNU C++14 TESTS 42 46 512000 1400
39998342 30iq C July 5, 2018, 5:16 p.m. OK GNU C++14 TESTS 42 46 819200 1400
39996015 -osdajigu- C July 5, 2018, 5:02 p.m. OK GNU C++14 TESTS 42 46 819200 1400
39995694 ImaniAm C July 5, 2018, 5 p.m. OK GNU C++14 TESTS 42 46 819200 1400
39999842 Bnahmad15 C July 5, 2018, 5:28 p.m. OK GNU C++14 TESTS 42 46 921600 1400
39999119 coolreshab C July 5, 2018, 5:22 p.m. OK GNU C++14 TESTS 42 46 921600 1400
39995790 fragusbot C July 5, 2018, 5:01 p.m. OK GNU C++14 TESTS 42 46 921600 1400
39995753 krzysiek27 C July 5, 2018, 5:01 p.m. OK GNU C++14 TESTS 42 46 921600 1400
40002474 GoWind C July 5, 2018, 5:53 p.m. OK GNU C++17 TESTS 42 46 819200 1400
39999209 mak_1920 C July 5, 2018, 5:23 p.m. OK GNU C++17 TESTS 42 46 819200 1400
39998923 KiranKaravaev C July 5, 2018, 5:21 p.m. OK GNU C++17 TESTS 42 46 819200 1400
39998521 Erkhemkhuu C July 5, 2018, 5:18 p.m. OK GNU C++17 TESTS 42 46 921600 1400
39996591 giang.best.1 C July 5, 2018, 5:05 p.m. OK GNU C++17 TESTS 42 46 921600 1400
39994802 nan0S C July 5, 2018, 4:56 p.m. OK GNU C++17 TESTS 42 46 921600 1400
39994046 JustInCase C July 5, 2018, 4:53 p.m. OK GNU C++17 TESTS 42 46 921600 1400
39993903 dened C July 5, 2018, 4:52 p.m. OK GNU C++17 TESTS 42 46 921600 1400
39997919 excel_blaze C July 5, 2018, 5:13 p.m. OK GNU C++17 TESTS 42 46 1024000 1400
39993835 sys. C July 5, 2018, 4:52 p.m. OK GNU C++17 TESTS 42 46 1024000 1400
39996670 AQT C July 5, 2018, 5:06 p.m. OK Java 8 TESTS 42 139 0 1400
39999456 apurvaj C July 5, 2018, 5:24 p.m. OK Java 8 TESTS 42 140 0 1400
40003168 rohan03 C July 5, 2018, 6:01 p.m. OK Java 8 TESTS 42 140 0 1400
40001808 for.toobye321 C July 5, 2018, 5:46 p.m. OK Java 8 TESTS 42 140 0 1400
39999696 StayAwayFromBitches C July 5, 2018, 5:27 p.m. OK Java 8 TESTS 42 140 0 1400
39997157 haengbog C July 5, 2018, 5:08 p.m. OK Java 8 TESTS 42 140 0 1400
39995461 flyman3046 C July 5, 2018, 4:59 p.m. OK Java 8 TESTS 42 140 0 1400
39997410 I_LOVE_UNDEFINED C July 5, 2018, 5:10 p.m. OK Java 8 TESTS 42 140 2969600 1400
39998636 Itwazonce C July 5, 2018, 5:18 p.m. OK Java 8 TESTS 42 155 0 1400
39998076 HardikDobariya C July 5, 2018, 5:14 p.m. OK Java 8 TESTS 42 155 0 1400
39996013 0442A403 C July 5, 2018, 5:02 p.m. OK Kotlin TESTS 42 218 0 1400
39999236 DMN C July 5, 2018, 5:23 p.m. OK Mono C# TESTS 42 93 16588800 1400
39995414 lxn C July 5, 2018, 4:59 p.m. OK MS C++ TESTS 42 31 1228800 1400
40002038 yuiop8747 C July 5, 2018, 5:48 p.m. OK MS C++ TESTS 42 46 2048000 1400
40001915 claus_spb C July 5, 2018, 5:47 p.m. OK MS C++ TESTS 42 62 1228800 1400
40002905 Valentin_one C July 5, 2018, 5:58 p.m. OK MS C++ TESTS 42 93 1228800 1400
39998892 Volpe C July 5, 2018, 5:20 p.m. OK MS C++ TESTS 42 93 2560000 1400
40004509 -.-Ache-.- C July 5, 2018, 6:15 p.m. OK MS C++ TESTS 42 109 2457600 1400
39997543 BaturaDima C July 5, 2018, 5:11 p.m. OK MS C++ TESTS 42 140 3993600 1400
39999837 dipendra C July 5, 2018, 5:28 p.m. OK MS C++ TESTS 42 156 5734400 1400
39997486 umbrella25 C July 5, 2018, 5:11 p.m. OK MS C++ TESTS 42 265 6246400 1400
40001316 Arcadii C July 5, 2018, 5:41 p.m. OK PascalABC.NET TESTS 42 93 409600 1400
40000964 BurntArgonPancakes C July 5, 2018, 5:38 p.m. OK PyPy 2 TESTS 42 186 11776000 1400
39992934 unsuspiciouscrumpet C July 5, 2018, 4:48 p.m. OK PyPy 2 TESTS 42 187 7884800 1400
39994110 exoji2e C July 5, 2018, 4:53 p.m. OK PyPy 2 TESTS 42 202 10752000 1400
39994268 MathisHammel C July 5, 2018, 4:54 p.m. OK PyPy 2 TESTS 42 233 12288000 1400
39999392 pavankatta C July 5, 2018, 5:24 p.m. OK PyPy 2 TESTS 42 233 18022400 1400
39993827 meooow C July 5, 2018, 4:52 p.m. OK PyPy 3 TESTS 42 217 11980800 1400
39999697 TheProgrammer256 C July 5, 2018, 5:27 p.m. OK PyPy 3 TESTS 42 218 14131200 1400
40001633 shaswat57 C July 5, 2018, 5:44 p.m. OK PyPy 3 TESTS 42 233 11161600 1400
39993962 LeiviniaBirdway C July 5, 2018, 4:53 p.m. OK PyPy 3 TESTS 42 233 11161600 1400
39997155 Tejkiran C July 5, 2018, 5:08 p.m. OK PyPy 3 TESTS 42 233 13312000 1400
40004421 organizize C July 5, 2018, 6:14 p.m. OK PyPy 3 TESTS 42 233 13721600 1400
39997663 JJF C July 5, 2018, 5:12 p.m. OK PyPy 3 TESTS 42 233 14643200 1400
40001491 badrinarayan.sarma C July 5, 2018, 5:43 p.m. OK PyPy 3 TESTS 42 234 11161600 1400
40000608 Stephan C July 5, 2018, 5:35 p.m. OK PyPy 3 TESTS 42 248 13312000 1400
39997194 wadissimo C July 5, 2018, 5:09 p.m. OK PyPy 3 TESTS 42 249 14131200 1400
39997985 utoppia C July 5, 2018, 5:14 p.m. OK Python 2 TESTS 42 311 7987200 1400
40000024 wangkan2001 C July 5, 2018, 5:29 p.m. OK Python 2 TESTS 42 327 13721600 1400
40003085 blank000 C July 5, 2018, 6 p.m. OK Python 2 TESTS 42 343 10649600 1400
40001102 packwolf C July 5, 2018, 5:39 p.m. OK Python 2 TESTS 42 374 12697600 1400
39999694 davidzhou C July 5, 2018, 5:27 p.m. OK Python 2 TESTS 42 390 8294400 1400
40005232 elistark C July 5, 2018, 6:23 p.m. OK Python 2 TESTS 42 467 9011200 1400
39994821 ManasG C July 5, 2018, 4:56 p.m. OK Python 2 TESTS 42 576 15257600 1400
39996311 linwe C July 5, 2018, 5:04 p.m. OK Python 3 TESTS 42 264 13209600 1400
40001222 p4thet1c C July 5, 2018, 5:40 p.m. OK Python 3 TESTS 42 265 7372800 1400
39996496 sergovoy C July 5, 2018, 5:05 p.m. OK Python 3 TESTS 42 265 8704000 1400
39996278 Mad_Andrei C July 5, 2018, 5:03 p.m. OK Python 3 TESTS 42 265 8806400 1400
40000448 ZhouTi C July 5, 2018, 5:33 p.m. OK Python 3 TESTS 42 280 7680000 1400
39995699 Hedgehogushka C July 5, 2018, 5:01 p.m. OK Python 3 TESTS 42 280 8499200 1400
40003244 101101110 C July 5, 2018, 6:01 p.m. OK Python 3 TESTS 42 295 7372800 1400
39998747 larryboy825 C July 5, 2018, 5:19 p.m. OK Python 3 TESTS 42 295 10035200 1400
40003130 pchail C July 5, 2018, 6 p.m. OK Python 3 TESTS 42 296 8704000 1400
39997996 Myusic C July 5, 2018, 5:14 p.m. OK Python 3 TESTS 42 296 12288000 1400
40002598 lmx C July 5, 2018, 5:54 p.m. OK Ruby TESTS 42 342 20684800 1400

remove filters

Back to search problems