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 |
---|---|---|---|---|---|---|
992 | Codeforces Round 489 (Div. 2) | FINISHED | False | 7200 | 207840263 | June 18, 2018, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1666 ) | D | Nastya and a Game | PROGRAMMING | brute force implementation math | 2100 |
B'Nastya received one more array on her birthday, this array can be used to play a traditional Byteland game on it. However, to play the game the players should first select such a subsegment of the array that , where p is the product of all integers on the given array, s is their sum, and k is a given constant for all subsegments. Nastya wonders how many subsegments of the array fit the described conditions. A subsegment of an array is several consecutive integers of the array. The first line contains two integers n and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105), where n is the length of the array and k is the constant described above. The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89108) -- the elements of the array. In the only line print the number of subsegments such that the ratio between the product and the sum on them is equal to k. In the first example the only subsegment is [1]. The sum equals 1, the product equals 1, so it suits us because . There are two suitable subsegments in the second example -- [6, xe2 x80 x893] and [3, xe2 x80 x898, xe2 x80 x891]. Subsegment [6, xe2 x80 x893] has sum 9 and product 18, so it suits us because . Subsegment [3, xe2 x80 x898, xe2 x80 x891] has sum 12 and product 24, so it suits us because . '... |
60083 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
65547496 | LaSWeeG | D | Nov. 22, 2019, 5:37 p.m. | OK | FPC | TESTS | 134 | 171 | 6451200 | 2100 | |
39544856 | forlfs | D | June 23, 2018, 3:23 p.m. | OK | GNU C | TESTS | 134 | 218 | 1638400 | 2100 | |
39416482 | forlfs | D | June 19, 2018, 4:19 p.m. | OK | GNU C | TESTS | 134 | 468 | 1638400 | 2100 | |
41620671 | SylvanasS | D | Aug. 15, 2018, 11:51 a.m. | OK | GNU C++ | TESTS | 134 | 78 | 3993600 | 2100 | |
39865176 | ILLENIUM | D | July 2, 2018, 10:40 a.m. | OK | GNU C++ | TESTS | 134 | 108 | 12083200 | 2100 | |
39757496 | xielinhan | D | June 29, 2018, 3:54 a.m. | OK | GNU C++ | TESTS | 134 | 108 | 12083200 | 2100 | |
41158472 | luogu_bot4 | D | Aug. 3, 2018, 1:43 p.m. | OK | GNU C++ | TESTS | 134 | 124 | 3993600 | 2100 | |
40760106 | fwat | D | July 26, 2018, 2:52 a.m. | OK | GNU C++ | TESTS | 134 | 140 | 7782400 | 2100 | |
40760089 | fwat | D | July 26, 2018, 2:51 a.m. | OK | GNU C++ | TESTS | 134 | 140 | 7782400 | 2100 | |
39462733 | vjudge4 | D | June 21, 2018, 12:58 p.m. | OK | GNU C++ | TESTS | 134 | 155 | 3276800 | 2100 | |
39462639 | zhuyh | D | June 21, 2018, 12:54 p.m. | OK | GNU C++ | TESTS | 134 | 171 | 3276800 | 2100 | |
39391560 | Zailton | D | June 18, 2018, 8:49 p.m. | OK | GNU C++ | TESTS | 133 | 171 | 7987200 | 2100 | |
39429821 | lhylhy | D | June 20, 2018, 8:16 a.m. | OK | GNU C++ | TESTS | 134 | 202 | 3276800 | 2100 | |
40931860 | ReaLNero1 | D | July 30, 2018, 1:24 a.m. | OK | GNU C++11 | TESTS | 134 | 62 | 2457600 | 2100 | |
39403174 | ihopenot | D | June 19, 2018, 8:16 a.m. | OK | GNU C++11 | TESTS | 134 | 62 | 2457600 | 2100 | |
49996348 | luogu_bot5 | D | Feb. 16, 2019, 3:08 p.m. | OK | GNU C++11 | TESTS | 134 | 62 | 94924800 | 2100 | |
40977195 | ReaLNero1 | D | July 30, 2018, 4:05 p.m. | OK | GNU C++11 | TESTS | 134 | 77 | 2457600 | 2100 | |
39386338 | karin0 | D | June 18, 2018, 6:27 p.m. | OK | GNU C++11 | TESTS | 133 | 77 | 6041600 | 2100 | |
48551995 | luogu_bot3 | D | Jan. 19, 2019, 2:34 a.m. | OK | GNU C++11 | TESTS | 134 | 78 | 2457600 | 2100 | |
48544337 | UESTC_Forsaken | D | Jan. 18, 2019, 6:28 p.m. | OK | GNU C++11 | TESTS | 134 | 78 | 2457600 | 2100 | |
42846771 | zhaotiensn | D | Sept. 14, 2018, 12:51 a.m. | OK | GNU C++11 | TESTS | 134 | 78 | 3174400 | 2100 | |
63985304 | vjudge3 | D | Nov. 1, 2019, 11:33 a.m. | OK | GNU C++11 | TESTS | 134 | 78 | 3993600 | 2100 | |
63984325 | oh_yes | D | Nov. 1, 2019, 11:17 a.m. | OK | GNU C++11 | TESTS | 134 | 78 | 3993600 | 2100 | |
57572738 | vjudge3 | D | July 23, 2019, 5:55 a.m. | OK | GNU C++14 | TESTS | 134 | 78 | 1843200 | 2100 | |
39434256 | avv | D | June 20, 2018, 11:24 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 1638400 | 2100 | |
63970292 | vjudge2 | D | Nov. 1, 2019, 8:50 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 2457600 | 2100 | |
39409593 | Water_Sheep | D | June 19, 2018, 11:56 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 2457600 | 2100 | |
39397563 | xproxmess | D | June 19, 2018, 4:01 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 2457600 | 2100 | |
39397303 | shaanknight | D | June 19, 2018, 3:40 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 3174400 | 2100 | |
39433387 | satja | D | June 20, 2018, 10:48 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 3993600 | 2100 | |
39406389 | AgReB | D | June 19, 2018, 10:06 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 3993600 | 2100 | |
39400000 | CuongCuong | D | June 19, 2018, 6:10 a.m. | OK | GNU C++14 | TESTS | 134 | 93 | 3993600 | 2100 | |
69065196 | appleofdiscord | D | Jan. 18, 2020, 6:17 p.m. | OK | GNU C++14 | TESTS | 134 | 93 | 4812800 | 2100 | |
67969662 | dorijanlendvaj | D | Dec. 30, 2019, 2:33 p.m. | OK | GNU C++17 | TESTS | 134 | 78 | 4300800 | 2100 | |
57885911 | nagpaljatin1411 | D | July 28, 2019, 9:52 a.m. | OK | GNU C++17 | TESTS | 134 | 78 | 4812800 | 2100 | |
39392133 | Kelang | D | June 18, 2018, 9:11 p.m. | OK | GNU C++17 | TESTS | 134 | 93 | 3174400 | 2100 | |
57579188 | vjudge2 | D | July 23, 2019, 8:14 a.m. | OK | GNU C++17 | TESTS | 134 | 93 | 4812800 | 2100 | |
39444065 | panda42 | D | June 20, 2018, 6:35 p.m. | OK | GNU C++17 | TESTS | 134 | 93 | 7168000 | 2100 | |
39391636 | cai_lw | D | June 18, 2018, 8:52 p.m. | OK | GNU C++17 | TESTS | 133 | 108 | 1536000 | 2100 | |
58504075 | Jaydeep999997 | D | Aug. 9, 2019, 3:36 p.m. | OK | GNU C++17 | TESTS | 134 | 108 | 3174400 | 2100 | |
39389906 | caguamafria | D | June 18, 2018, 8:05 p.m. | OK | GNU C++17 | TESTS | 133 | 108 | 6451200 | 2100 | |
39742919 | cjnwq | D | June 28, 2018, 12:34 p.m. | OK | GNU C++17 | TESTS | 134 | 109 | 1638400 | 2100 | |
62592347 | Rahul | D | Oct. 14, 2019, 10:03 p.m. | OK | GNU C++17 | TESTS | 134 | 109 | 2457600 | 2100 | |
45670739 | wadissimo | D | Nov. 13, 2018, 10:30 a.m. | OK | Java 8 | TESTS | 134 | 155 | 2867200 | 2100 | |
39389718 | alexyz | D | June 18, 2018, 8:03 p.m. | OK | Java 8 | TESTS | 133 | 218 | 2867200 | 2100 | |
40078433 | 7dan | D | July 8, 2018, 7:31 a.m. | OK | Java 8 | TESTS | 134 | 218 | 3174400 | 2100 | |
39440685 | iamavalon | D | June 20, 2018, 3:56 p.m. | OK | Java 8 | TESTS | 134 | 249 | 3174400 | 2100 | |
39377894 | kessido | D | June 18, 2018, 5:45 p.m. | OK | Java 8 | TESTS | 133 | 249 | 3276800 | 2100 | |
39396289 | Hello.There | D | June 19, 2018, 2:40 a.m. | OK | Java 8 | TESTS | 134 | 264 | 6144000 | 2100 | |
39385077 | TLEvator | D | June 18, 2018, 6:21 p.m. | OK | Java 8 | TESTS | 133 | 295 | 5632000 | 2100 | |
39404750 | Wavator | D | June 19, 2018, 9:13 a.m. | OK | Java 8 | TESTS | 134 | 311 | 5632000 | 2100 | |
39391960 | fnch | D | June 18, 2018, 9:05 p.m. | OK | Java 8 | TESTS | 134 | 343 | 0 | 2100 | |
68496675 | yaoct | D | Jan. 10, 2020, 1:46 p.m. | OK | Java 8 | TESTS | 134 | 343 | 6451200 | 2100 | |
39490932 | pericle | D | June 21, 2018, 4:25 p.m. | OK | MS C++ | TESTS | 134 | 280 | 4915200 | 2100 | |
39436330 | MenOfPassion | D | June 20, 2018, 12:53 p.m. | OK | MS C++ | TESTS | 134 | 312 | 2457600 | 2100 | |
39436249 | MenOfPassion | D | June 20, 2018, 12:50 p.m. | OK | MS C++ | TESTS | 134 | 312 | 2457600 | 2100 | |
39455639 | nik1998 | D | June 21, 2018, 8:28 a.m. | OK | MS C++ | TESTS | 134 | 358 | 5017600 | 2100 | |
39410572 | Aleksandr2754 | D | June 19, 2018, 12:26 p.m. | OK | MS C++ | TESTS | 134 | 358 | 5120000 | 2100 | |
39455847 | nik1998 | D | June 21, 2018, 8:36 a.m. | OK | MS C++ | TESTS | 134 | 436 | 4915200 | 2100 | |
63303731 | AleksanderBalobanov | D | Oct. 24, 2019, 3 p.m. | OK | MS C++ 2017 | TESTS | 134 | 249 | 2662400 | 2100 | |
39378112 | pajenegod | D | June 18, 2018, 5:46 p.m. | OK | PyPy 2 | TESTS | 133 | 841 | 18534400 | 2100 | |
39414407 | mouse_wireless | D | June 19, 2018, 2:49 p.m. | OK | PyPy 2 | TESTS | 134 | 857 | 13004800 | 2100 | |
39414384 | caen | D | June 19, 2018, 2:49 p.m. | OK | PyPy 2 | TESTS | 134 | 888 | 13004800 | 2100 | |
39390539 | Ali_Pi | D | June 18, 2018, 8:17 p.m. | OK | PyPy 2 | TESTS | 133 | 888 | 19046400 | 2100 | |
46515590 | nishank.suresh | D | Dec. 2, 2018, 3:59 p.m. | OK | PyPy 2 | TESTS | 134 | 1777 | 18329600 | 2100 | |
39390730 | pyrus | D | June 18, 2018, 8:22 p.m. | OK | PyPy 3 | TESTS | 133 | 311 | 23142400 | 2100 | |
39402426 | asvasil | D | June 19, 2018, 7:49 a.m. | OK | PyPy 3 | TESTS | 134 | 342 | 22732800 | 2100 | |
46515553 | nishank.suresh | D | Dec. 2, 2018, 3:58 p.m. | OK | PyPy 3 | TESTS | 134 | 1668 | 24985600 | 2100 | |
39456858 | cyand1317 | D | June 21, 2018, 9:16 a.m. | OK | Rust | TESTS | 134 | 218 | 5529600 | 2100 | |
39404396 | FalseMirror | D | June 19, 2018, 9:01 a.m. | OK | Rust | TESTS | 134 | 1419 | 13107200 | 2100 |
Back to search problems