Codeforces Round 491 (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
991 Codeforces Round 491 (Div. 2) FINISHED False 7200 207411863 June 23, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3527 ) E Bus Number PROGRAMMING brute force combinatorics math 1800

B'This night wasn 't easy on Vasya. His favorite team lost, and he didn 't find himself victorious either -- although he played perfectly, his teammates let him down every time. He had to win at least one more time, but the losestreak only grew longer and longer... It 's no wonder he didn 't get any sleep this night at all. In the morning, Vasya was waiting the bus to the university on the bus stop. Vasya 's thoughts were hazy and so he couldn 't remember the right bus ' number quite right and got onto the bus with the number n . In the bus, Vasya thought that he could get the order of the digits in the number of the bus wrong. Futhermore, he could "see" some digits several times, but the digits he saw were definitely in the real number of the bus. For example, if Vasya saw the number 2028, it could mean that the real bus number could be 2028, 8022, 2820 or just 820. However, numbers 80, 22208, 52 definitely couldn 't be the number of the bus. Also, real bus number couldn 't start with the digit 0, this meaning that, for example, number 082 couldn 't be the real bus number too. Given n , determine the total number of possible bus number variants. The first line contains one integer n ( 1 <= q n <= q 10^{18} ) -- the number of the bus that was seen by Vasya. It is guaranteed that this number does not start with 0 . Output a single integer -- the amount of possible variants of the real bus number. In the first sample, only variants 97 and 79 are possible. In the second sample, the variants (in the increasing order) are the following: 208 , 280 , 802 , 820 , 2028 , 2082 , 2208 , 2280 , 2802 , 2820 , 8022 , 8202 , 8220 . '...

Tutorials

60181

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39577766 rr_ E June 23, 2018, 5:34 p.m. OK D TESTS 61 30 0 1800
39582707 ruban E June 23, 2018, 9:12 p.m. OK Delphi TESTS 61 30 35328000 1800
39573527 CS_LYJ1997 E June 23, 2018, 5:11 p.m. OK FPC TESTS 61 31 0 1800
39590867 C1ariS E June 24, 2018, 5:46 a.m. OK GNU C TESTS 61 31 0 1800
39583154 forlfs E June 23, 2018, 9:36 p.m. OK GNU C TESTS 61 31 0 1800
39581121 0-O E June 23, 2018, 8:11 p.m. OK GNU C TESTS 61 31 0 1800
39577112 armadillo E June 23, 2018, 5:32 p.m. OK GNU C++ TESTS 61 15 0 1800
39652603 shethparita98 E June 25, 2018, 2:40 p.m. OK GNU C++ TESTS 61 15 0 1800
39603143 dreamplayDaddy E June 24, 2018, 12:58 p.m. OK GNU C++ TESTS 61 15 33689600 1800
39600243 samraat1 E June 24, 2018, 11:23 a.m. OK GNU C++ TESTS 61 30 0 1800
39589613 Angry_penguin E June 24, 2018, 4:48 a.m. OK GNU C++ TESTS 61 30 0 1800
39587572 quantu_zo E June 24, 2018, 3:07 a.m. OK GNU C++ TESTS 61 30 0 1800
39581894 Gekk E June 23, 2018, 8:38 p.m. OK GNU C++ TESTS 61 30 0 1800
39586360 feng_chengjie E June 24, 2018, 1:56 a.m. OK GNU C++ TESTS 61 30 0 1800
39603083 Sundes E June 24, 2018, 12:56 p.m. OK GNU C++ TESTS 61 30 0 1800
39603036 hello_word_cai E June 24, 2018, 12:54 p.m. OK GNU C++ TESTS 61 30 0 1800
39574483 f2lk6wf90d E June 23, 2018, 5:17 p.m. OK GNU C11 TESTS 61 31 0 1800
39579809 Storm__Spirit E June 23, 2018, 7:36 p.m. OK GNU C++11 TESTS 61 15 0 1800
39575972 richieY E June 23, 2018, 5:26 p.m. OK GNU C++11 TESTS 61 15 0 1800
39591705 BL7A. E June 24, 2018, 6:20 a.m. OK GNU C++11 TESTS 61 15 0 1800
39571625 xu3kev E June 23, 2018, 5 p.m. OK GNU C++11 TESTS 61 15 0 1800
39573063 TaoSama E June 23, 2018, 5:08 p.m. OK GNU C++11 TESTS 61 15 0 1800
39569846 Mr.Adnan E June 23, 2018, 4:50 p.m. OK GNU C++11 TESTS 61 15 8089600 1800
48213333 vjudge2 E Jan. 11, 2019, 1:17 p.m. OK GNU C++11 TESTS 61 30 0 1800
50096950 chenmingyu E Feb. 18, 2019, 1:10 p.m. OK GNU C++11 TESTS 61 30 0 1800
49905792 vjudge3 E Feb. 14, 2019, 11:53 a.m. OK GNU C++11 TESTS 61 30 0 1800
39723845 WillMA E June 27, 2018, 5:35 p.m. OK GNU C++11 TESTS 61 30 0 1800
39603858 pk1601cs33 E June 24, 2018, 1:28 p.m. OK GNU C++14 TESTS 61 15 0 1800
39606661 Brankonymous E June 24, 2018, 3:20 p.m. OK GNU C++14 TESTS 61 15 0 1800
39603733 himanshugupta E June 24, 2018, 1:23 p.m. OK GNU C++14 TESTS 61 15 0 1800
39601129 akshay_12001 E June 24, 2018, 11:56 a.m. OK GNU C++14 TESTS 61 15 0 1800
39594452 as_couple E June 24, 2018, 7:57 a.m. OK GNU C++14 TESTS 61 15 0 1800
39594015 mayanksinghal E June 24, 2018, 7:41 a.m. OK GNU C++14 TESTS 61 15 0 1800
39593585 admin233 E June 24, 2018, 7:26 a.m. OK GNU C++14 TESTS 61 15 0 1800
39660305 sunnylancoder E June 25, 2018, 9:21 p.m. OK GNU C++14 TESTS 61 15 0 1800
39590897 Amit_Pandey E June 24, 2018, 5:47 a.m. OK GNU C++14 TESTS 61 15 0 1800
39604894 yls1170568156 E June 24, 2018, 2:08 p.m. OK GNU C++14 TESTS 61 15 0 1800
39590566 HIT_TOM E June 24, 2018, 5:33 a.m. OK GNU C++17 TESTS 61 15 0 1800
39642795 paradox E June 25, 2018, 8:10 a.m. OK GNU C++17 TESTS 61 15 0 1800
39606883 DaleDale E June 24, 2018, 3:28 p.m. OK GNU C++17 TESTS 61 15 0 1800
39580178 samuraiexx E June 23, 2018, 7:44 p.m. OK GNU C++17 TESTS 61 15 0 1800
39579557 Coruncanius E June 23, 2018, 7:31 p.m. OK GNU C++17 TESTS 61 15 0 1800
39572696 ilyausmanov E June 23, 2018, 5:06 p.m. OK GNU C++17 TESTS 61 15 0 1800
39570581 Bober E June 23, 2018, 4:54 p.m. OK GNU C++17 TESTS 61 15 0 1800
39568568 eR6 E June 23, 2018, 4:44 p.m. OK GNU C++17 TESTS 61 15 0 1800
39604661 coder_h E June 24, 2018, 1:59 p.m. OK GNU C++17 TESTS 61 15 204800 1800
39669037 DANDROZAVR E June 26, 2018, 7:52 a.m. OK GNU C++17 TESTS 61 15 204800 1800
63994100 yaoct E Nov. 1, 2019, 2:02 p.m. OK Java 8 TESTS 61 109 0 1800
46346250 KulikAlex E Nov. 28, 2018, 6:19 p.m. OK Java 8 TESTS 61 109 0 1800
44770317 PrakharJain E Oct. 24, 2018, 12:04 p.m. OK Java 8 TESTS 61 124 0 1800
66615272 ijxjdjd E Dec. 11, 2019, 3:13 a.m. OK Java 8 TESTS 61 124 0 1800
63114043 chojh1222 E Oct. 22, 2019, 8:40 a.m. OK Java 8 TESTS 61 124 0 1800
60813432 ISSAM_LAKOUAM E Sept. 18, 2019, 6:56 p.m. OK Java 8 TESTS 61 124 0 1800
57755735 mennafadali E July 25, 2019, 4:13 p.m. OK Java 8 TESTS 61 124 0 1800
57755633 mennafadali E July 25, 2019, 4:11 p.m. OK Java 8 TESTS 61 124 0 1800
45243700 wadissimo E Nov. 3, 2018, 12:52 p.m. OK Java 8 TESTS 61 124 0 1800
41606968 donli E Aug. 15, 2018, 3:27 a.m. OK Java 8 TESTS 61 124 0 1800
39570478 0442A403 E June 23, 2018, 4:54 p.m. OK Kotlin TESTS 61 155 0 1800
40978451 user32 E July 30, 2018, 4:39 p.m. OK Kotlin TESTS 61 156 0 1800
39576022 kuuso E June 23, 2018, 5:26 p.m. OK Mono C# TESTS 61 46 3481600 1800
39565827 schoenus E June 23, 2018, 4:31 p.m. OK Mono C# TESTS 61 46 70860800 1800
39653586 pericle E June 25, 2018, 3:24 p.m. OK MS C++ TESTS 61 15 0 1800
39571247 danielson13579 E June 23, 2018, 4:58 p.m. OK MS C++ TESTS 61 30 0 1800
40243440 Gleb_Dubosarskii E July 12, 2018, 8:56 p.m. OK MS C++ TESTS 61 30 0 1800
56075417 vjudge2 E June 26, 2019, 12:35 p.m. OK MS C++ TESTS 61 31 0 1800
56074167 vjudge1 E June 26, 2019, 12:02 p.m. OK MS C++ TESTS 61 31 0 1800
51995219 vjudge4 E March 30, 2019, 12:59 a.m. OK MS C++ TESTS 61 31 0 1800
51969232 vjudge2 E March 29, 2019, 11:34 a.m. OK MS C++ TESTS 61 31 0 1800
56033950 vjudge3 E June 25, 2019, 11:08 a.m. OK MS C++ TESTS 61 31 0 1800
56502405 vjudge2 E July 4, 2019, 6:57 a.m. OK MS C++ TESTS 61 31 0 1800
56145257 vjudge2 E June 27, 2019, 5:56 a.m. OK MS C++ TESTS 61 31 0 1800
39568460 mouse_wireless E June 23, 2018, 4:43 p.m. OK PyPy 2 TESTS 61 109 204800 1800
39579838 sasasagagaga E June 23, 2018, 7:36 p.m. OK PyPy 2 TESTS 61 124 1126400 1800
39590516 pa.n.ik E June 24, 2018, 5:31 a.m. OK PyPy 2 TESTS 61 171 5632000 1800
39576913 MathisHammel E June 23, 2018, 5:31 p.m. OK PyPy 2 TESTS 61 186 3072000 1800
40216725 aeternalis1 E July 12, 2018, 3:08 a.m. OK PyPy 2 TESTS 61 187 3072000 1800
39577337 rkstalker E June 23, 2018, 5:33 p.m. OK PyPy 2 TESTS 61 467 8396800 1800
39574129 Slow_But_Determined E June 23, 2018, 5:15 p.m. OK PyPy 3 TESTS 61 139 307200 1800
39576134 APELSINCHIK E June 23, 2018, 5:27 p.m. OK PyPy 3 TESTS 61 140 0 1800
39569717 Reyna E June 23, 2018, 4:50 p.m. OK PyPy 3 TESTS 61 140 0 1800
39571562 meooow E June 23, 2018, 5 p.m. OK PyPy 3 TESTS 61 155 1331200 1800
39674366 Vetand E June 26, 2018, 11:44 a.m. OK PyPy 3 TESTS 61 171 819200 1800
39570918 NikitaMikhaylov E June 23, 2018, 4:56 p.m. OK PyPy 3 TESTS 61 171 1945600 1800
61332687 FCUKmodiBhakts I_Am_Justice RedRanger E Sept. 26, 2019, 3:29 p.m. OK PyPy 3 TESTS 61 171 4300800 1800
39589108 jh05013 E June 24, 2018, 4:25 a.m. OK PyPy 3 TESTS 61 187 1638400 1800
39577563 yoshi74ls181 E June 23, 2018, 5:34 p.m. OK PyPy 3 TESTS 61 233 2560000 1800
39572606 egozverev E June 23, 2018, 5:06 p.m. OK PyPy 3 TESTS 61 265 6246400 1800
39584540 ldt116 E June 23, 2018, 11:18 p.m. OK Python 2 TESTS 61 93 0 1800
39583337 ldt116 E June 23, 2018, 9:47 p.m. OK Python 2 TESTS 61 93 0 1800
39582482 vhnvn E June 23, 2018, 9:01 p.m. OK Python 2 TESTS 61 93 102400 1800
39583378 vhnvn E June 23, 2018, 9:49 p.m. OK Python 2 TESTS 61 108 0 1800
39582135 vhnvn E June 23, 2018, 8:47 p.m. OK Python 2 TESTS 61 108 0 1800
39593773 regularnerd E June 24, 2018, 7:33 a.m. OK Python 2 TESTS 61 109 0 1800
39584656 ldt116 E June 23, 2018, 11:28 p.m. OK Python 2 TESTS 61 109 0 1800
39584527 ldt116 E June 23, 2018, 11:17 p.m. OK Python 2 TESTS 61 109 0 1800
39583742 ldt116 E June 23, 2018, 10:16 p.m. OK Python 2 TESTS 61 109 0 1800
39583570 ldt116 E June 23, 2018, 10:04 p.m. OK Python 2 TESTS 61 109 0 1800
39700235 msatskevich E June 27, 2018, 11:45 a.m. OK Python 3 TESTS 61 78 0 1800
39684688 neeleshsinha E June 26, 2018, 7:27 p.m. OK Python 3 TESTS 61 93 0 1800
39586287 Asagami E June 24, 2018, 1:51 a.m. OK Python 3 TESTS 61 93 0 1800
39584797 dyniec E June 23, 2018, 11:42 p.m. OK Python 3 TESTS 61 93 0 1800
39581008 Coding_genius E June 23, 2018, 8:07 p.m. OK Python 3 TESTS 61 93 0 1800
39579292 Ofegenia E June 23, 2018, 7:27 p.m. OK Python 3 TESTS 61 93 0 1800
39569706 SAKT E June 23, 2018, 4:49 p.m. OK Python 3 TESTS 61 93 0 1800
39568227 768092_in_TW E June 23, 2018, 4:42 p.m. OK Python 3 TESTS 61 93 0 1800
39568133 knight-erraunt E June 23, 2018, 4:42 p.m. OK Python 3 TESTS 61 93 0 1800
39566352 googlweknoall E June 23, 2018, 4:33 p.m. OK Python 3 TESTS 61 93 0 1800
41670060 betrue12 E Aug. 17, 2018, 4:10 a.m. OK Ruby TESTS 61 62 102400 1800
40108818 0w1 E July 9, 2018, 10:18 a.m. OK Ruby TESTS 61 108 102400 1800
40240603 Hillmouse E July 12, 2018, 6:24 p.m. OK Rust TESTS 61 31 0 1800
39581975 nitishch E June 23, 2018, 8:41 p.m. OK Rust TESTS 61 31 0 1800

remove filters

Back to search problems