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 |
---|---|---|---|---|---|---|
689 | Codeforces Round 361 (Div. 2) | FINISHED | False | 7200 | 269789104 | July 6, 2016, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3533 ) | D | Friends and Subsequences | PROGRAMMING | binary search data structures | 2200 |
B'Mike and !Mike are old childhood rivals, they are opposite in everything they do, except programming. Today they have a problem they cannot solve on their own, but together (with you) -- who knows? Every one of them has an integer sequences a and b of length n. Being given a query of the form of pair of integers (l, xe2 x80 x89r), Mike can instantly tell the value of while !Mike can instantly tell the value of . Now suppose a robot (you!) asks them all possible different queries of pairs of integers (l, xe2 x80 x89r) (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) (so he will make exactly n(n xe2 x80 x89+ xe2 x80 x891) xe2 x80 x89/ xe2 x80 x892 queries) and counts how many times their answers coincide, thus for how many pairs is satisfied. How many occasions will the robot count? The first line contains only integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89200 xe2 x80 x89000). The second line contains n integer numbers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the sequence a. The third line contains n integer numbers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bn ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the sequence b. Print the only integer number -- the number of occasions the robot will count, thus for how many pairs is satisfied. The occasions in the first sample case are: 1.l xe2 x80 x89= xe2 x80 x894,r xe2 x80 x89= xe2 x80 x894 since max{2} xe2 x80 x89= xe2 x80 x89min{2}. 2.l xe2 x80 x89= xe2 x80 x894,r xe2 x80 x89= xe2 x80 x895 since max{2, xe2 x80 x891} xe2 x80 x89= xe2 x80 x89min{2, xe2 x80 x893}. There are no occasions in the second sample case since Mike will answer 3 to any query pair, but !Mike will always answer 1.'... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
41938449 | gaoqiong | D | Aug. 21, 2018, 2:03 p.m. | OK | Clang++17 Diagnostics | TESTS | 94 | 1621 | 50073600 | 2200 | |
18926753 | yosupo | D | July 6, 2016, 5:16 p.m. | OK | D | TESTS | 94 | 342 | 58880000 | 2200 | |
18931429 | MarisaKirisame | D | July 6, 2016, 5:57 p.m. | OK | D | TESTS | 94 | 1934 | 43929600 | 2200 | |
18944179 | lkmcfj | D | July 7, 2016, 6:21 a.m. | OK | FPC | TESTS | 94 | 93 | 4812800 | 2200 | |
19040540 | lerom | D | July 12, 2016, 3:30 a.m. | OK | FPC | TESTS | 94 | 124 | 4915200 | 2200 | |
19303091 | lkmcfj | D | July 21, 2016, 1:28 p.m. | OK | FPC | TESTS | 94 | 249 | 36249600 | 2200 | |
53951820 | chaorenhaha | D | May 10, 2019, 9:56 a.m. | OK | FPC | TESTS | 94 | 249 | 43315200 | 2200 | |
18951684 | MintGreen | D | July 7, 2016, 12:53 p.m. | OK | FPC | TESTS | 94 | 452 | 30515200 | 2200 | |
19069982 | thienanh1999 | D | July 13, 2016, 10:02 a.m. | OK | FPC | TESTS | 94 | 545 | 105984000 | 2200 | |
32345080 | hieutm211 | D | Nov. 16, 2017, 3:12 a.m. | OK | FPC | TESTS | 94 | 577 | 35328000 | 2200 | |
32344650 | PhuQuy | D | Nov. 16, 2017, 2:24 a.m. | OK | FPC | TESTS | 94 | 795 | 70553600 | 2200 | |
19453051 | WalkingDeade | D | July 28, 2016, 3:09 a.m. | OK | FPC | TESTS | 94 | 873 | 70553600 | 2200 | |
19404510 | WalkingDeade | D | July 25, 2016, 1:28 p.m. | OK | FPC | TESTS | 94 | 873 | 86528000 | 2200 | |
19761635 | Who1 | D | Aug. 10, 2016, 8:30 a.m. | OK | GNU C | TESTS | 94 | 295 | 36352000 | 2200 | |
22903595 | nir123 | D | Dec. 12, 2016, 12:25 p.m. | OK | GNU C | TESTS | 94 | 1855 | 15974400 | 2200 | |
18979191 | Arch0n | D | July 9, 2016, 4:07 a.m. | OK | GNU C++ | TESTS | 94 | 46 | 1638400 | 2200 | |
20337844 | THEHunter | D | Sept. 2, 2016, 9:37 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 1638400 | 2200 | |
19049965 | vjudge3 | D | July 12, 2016, 11:47 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 1638400 | 2200 | |
19215347 | sergiovieri | D | July 18, 2016, 3:14 p.m. | OK | GNU C++ | TESTS | 94 | 93 | 2969600 | 2200 | |
19925628 | daga | D | Aug. 17, 2016, 11:27 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 3686400 | 2200 | |
28664949 | LuckyM | D | July 18, 2017, 10:25 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 3788800 | 2200 | |
37237626 | Hahahahahahahhahaha | D | April 12, 2018, 2:20 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 5120000 | 2200 | |
31622382 | tswdfop157 | D | Oct. 23, 2017, 8:03 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 31027200 | 2200 | |
31621299 | tswdfop157 | D | Oct. 23, 2017, 6:55 a.m. | OK | GNU C++ | TESTS | 94 | 93 | 31027200 | 2200 | |
21366298 | danagi | D | Oct. 11, 2016, 6 p.m. | OK | GNU C++ | TESTS | 94 | 93 | 33382400 | 2200 | |
59577500 | rainboy | D | Aug. 27, 2019, 2:40 p.m. | OK | GNU C11 | TESTS | 94 | 93 | 3174400 | 2200 | |
19615422 | VAVAvile | D | Aug. 4, 2016, 12:57 p.m. | OK | GNU C++11 | TESTS | 94 | 46 | 1638400 | 2200 | |
40984198 | ReaLNero1 | D | July 30, 2018, 7:14 p.m. | OK | GNU C++11 | TESTS | 94 | 62 | 1638400 | 2200 | |
47023328 | GKxx | D | Dec. 15, 2018, 5:01 a.m. | OK | GNU C++11 | TESTS | 94 | 77 | 48742400 | 2200 | |
20545913 | diptanshu94 | D | Sept. 12, 2016, 9:16 a.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
18994851 | clovervy | D | July 10, 2016, 4:07 a.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
18978045 | sguar | D | July 9, 2016, 2:08 a.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
18933224 | h_noson | D | July 6, 2016, 6:15 p.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
18932392 | randomstr | D | July 6, 2016, 6:06 p.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
20810276 | Deng2X | D | Sept. 22, 2016, 5:02 a.m. | OK | GNU C++11 | TESTS | 94 | 93 | 1638400 | 2200 | |
26785280 | SalooP | D | May 1, 2017, 12:23 p.m. | OK | GNU C++11 | TESTS | 94 | 93 | 3686400 | 2200 | |
31259252 | akapros | D | Oct. 12, 2017, 7:30 p.m. | OK | GNU C++14 | TESTS | 94 | 124 | 1638400 | 2200 | |
30485012 | Phoenix1369 | D | Sept. 18, 2017, 9:40 p.m. | OK | GNU C++14 | TESTS | 94 | 124 | 1638400 | 2200 | |
61450375 | wangxwgk | D | Sept. 29, 2019, 2:05 a.m. | OK | GNU C++14 | TESTS | 94 | 124 | 1638400 | 2200 | |
33839023 | dionysios | D | Dec. 31, 2017, 9:36 p.m. | OK | GNU C++14 | TESTS | 94 | 124 | 3481600 | 2200 | |
26200018 | decoder123 | D | April 7, 2017, 5:21 p.m. | OK | GNU C++14 | TESTS | 94 | 124 | 3481600 | 2200 | |
34537141 | GooYap | D | Jan. 25, 2018, 6:20 a.m. | OK | GNU C++14 | TESTS | 94 | 124 | 3481600 | 2200 | |
26246516 | Enigma_Inu | D | April 10, 2017, 3:31 a.m. | OK | GNU C++14 | TESTS | 94 | 124 | 3584000 | 2200 | |
29527561 | Big_black_jujube | D | Aug. 17, 2017, 1:47 p.m. | OK | GNU C++14 | TESTS | 94 | 139 | 1740800 | 2200 | |
38460290 | AndreiCotor | D | May 20, 2018, 12:57 p.m. | OK | GNU C++14 | TESTS | 94 | 140 | 1843200 | 2200 | |
27570034 | knayam_sharma | D | June 4, 2017, 8:01 p.m. | OK | GNU C++14 | TESTS | 94 | 140 | 16076800 | 2200 | |
53808965 | hunghoang | D | May 6, 2019, 4:35 a.m. | OK | GNU C++17 | TESTS | 94 | 124 | 1638400 | 2200 | |
53808412 | vjudge1 | D | May 6, 2019, 3:57 a.m. | OK | GNU C++17 | TESTS | 94 | 124 | 1638400 | 2200 | |
61180431 | anakib1 | D | Sept. 23, 2019, 7:36 p.m. | OK | GNU C++17 | TESTS | 94 | 140 | 3174400 | 2200 | |
55012561 | thedragonslayer | D | June 3, 2019, 10:49 a.m. | OK | GNU C++17 | TESTS | 94 | 140 | 16076800 | 2200 | |
65938063 | dontquit | D | Nov. 29, 2019, 3:59 a.m. | OK | GNU C++17 | TESTS | 94 | 155 | 3174400 | 2200 | |
37478349 | Sanitator | D | April 20, 2018, 6:11 a.m. | OK | GNU C++17 | TESTS | 94 | 155 | 4915200 | 2200 | |
53810929 | trinam | D | May 6, 2019, 6:38 a.m. | OK | GNU C++17 | TESTS | 94 | 155 | 5324800 | 2200 | |
53811066 | vjudge1 | D | May 6, 2019, 6:46 a.m. | OK | GNU C++17 | TESTS | 94 | 155 | 5324800 | 2200 | |
64339143 | igba | D | Nov. 6, 2019, 12:56 a.m. | OK | GNU C++17 | TESTS | 94 | 155 | 32153600 | 2200 | |
55397067 | AK. | D | June 10, 2019, 12:15 p.m. | OK | GNU C++17 | TESTS | 94 | 156 | 3174400 | 2200 | |
19035328 | amtematem | D | July 11, 2016, 6:25 p.m. | OK | Java 7 | TESTS | 94 | 358 | 44544000 | 2200 | |
18934250 | pitfall | D | July 6, 2016, 6:26 p.m. | OK | Java 7 | TESTS | 94 | 467 | 61747200 | 2200 | |
19186443 | Genericcoder | D | July 17, 2016, 8:06 a.m. | OK | Java 7 | TESTS | 94 | 545 | 63488000 | 2200 | |
18956436 | chucha | D | July 7, 2016, 6:18 p.m. | OK | Java 7 | TESTS | 94 | 748 | 0 | 2200 | |
18951651 | MazzForces | D | July 7, 2016, 12:51 p.m. | OK | Java 7 | TESTS | 94 | 1091 | 171622400 | 2200 | |
18975953 | fnch | D | July 8, 2016, 9:17 p.m. | OK | Java 8 | TESTS | 94 | 186 | 13619200 | 2200 | |
20162749 | megaspazz | D | Aug. 25, 2016, 7:43 p.m. | OK | Java 8 | TESTS | 94 | 233 | 20992000 | 2200 | |
19747510 | hama-du | D | Aug. 9, 2016, 12:59 p.m. | OK | Java 8 | TESTS | 94 | 265 | 63385600 | 2200 | |
19199801 | gu_castle | D | July 18, 2016, 3:27 a.m. | OK | Java 8 | TESTS | 94 | 280 | 19046400 | 2200 | |
19371340 | kafy83 | D | July 23, 2016, 7:33 p.m. | OK | Java 8 | TESTS | 94 | 295 | 18227200 | 2200 | |
18961278 | alibaba | D | July 8, 2016, 4:20 a.m. | OK | Java 8 | TESTS | 94 | 311 | 20787200 | 2200 | |
18956764 | ankurverma1994 | D | July 7, 2016, 6:48 p.m. | OK | Java 8 | TESTS | 94 | 343 | 41062400 | 2200 | |
18945910 | Azat_Yusupov | D | July 7, 2016, 7:43 a.m. | OK | Java 8 | TESTS | 94 | 389 | 66048000 | 2200 | |
18932520 | Petruchcho | D | July 6, 2016, 6:08 p.m. | OK | Java 8 | TESTS | 94 | 404 | 57139200 | 2200 | |
25155250 | MazzForces | D | March 2, 2017, 6:09 p.m. | OK | Java 8 | TESTS | 94 | 405 | 83353600 | 2200 | |
18974188 | DigitalArtistKz | D | July 8, 2016, 6:10 p.m. | OK | MS C# | TESTS | 94 | 202 | 53248000 | 2200 | |
18930198 | azukun | D | July 6, 2016, 5:45 p.m. | OK | MS C# | TESTS | 94 | 404 | 81510400 | 2200 | |
18976064 | koyaaniqatsi | D | July 8, 2016, 9:30 p.m. | OK | MS C# | TESTS | 94 | 670 | 51200000 | 2200 | |
19111460 | stufi04 | D | July 14, 2016, 4:04 p.m. | OK | MS C# | TESTS | 94 | 1574 | 114380800 | 2200 | |
18976003 | koyaaniqatsi | D | July 8, 2016, 9:23 p.m. | OK | MS C# | TESTS | 94 | 1575 | 49459200 | 2200 | |
18975608 | koyaaniqatsi | D | July 8, 2016, 8:37 p.m. | OK | MS C# | TESTS | 94 | 1778 | 90112000 | 2200 | |
18971437 | koyaaniqatsi | D | July 8, 2016, 2:28 p.m. | OK | MS C# | TESTS | 94 | 1965 | 89600000 | 2200 | |
19479139 | mshcherba | D | July 29, 2016, 12:01 p.m. | OK | MS C++ | TESTS | 94 | 109 | 1638400 | 2200 | |
19211435 | sister_what_hate_most | D | July 18, 2016, 11:57 a.m. | OK | MS C++ | TESTS | 94 | 156 | 11264000 | 2200 | |
52591120 | vjudge2 | D | April 11, 2019, 5:43 a.m. | OK | MS C++ | TESTS | 94 | 171 | 40038400 | 2200 | |
19406757 | ALEXKIRNAS | D | July 25, 2016, 3:49 p.m. | OK | MS C++ | TESTS | 94 | 171 | 172339200 | 2200 | |
18948099 | lxn | D | July 7, 2016, 9:32 a.m. | OK | MS C++ | TESTS | 94 | 186 | 30515200 | 2200 | |
19418276 | vjudge5 | D | July 26, 2016, 8:19 a.m. | OK | MS C++ | TESTS | 94 | 186 | 36044800 | 2200 | |
52727265 | vjudge4 | D | April 14, 2019, 1:39 a.m. | OK | MS C++ | TESTS | 94 | 234 | 33689600 | 2200 | |
18959518 | 13048047792 | D | July 8, 2016, 1:26 a.m. | OK | MS C++ | TESTS | 94 | 234 | 35328000 | 2200 | |
53147190 | vjudge1 | D | April 22, 2019, 3:34 p.m. | OK | MS C++ | TESTS | 94 | 248 | 33689600 | 2200 | |
18927625 | Taube | D | July 6, 2016, 5:23 p.m. | OK | MS C++ | TESTS | 94 | 249 | 31232000 | 2200 | |
52823889 | shrubbroom | D | April 16, 2019, 1 p.m. | OK | MS C++ 2017 | TESTS | 94 | 545 | 424857600 | 2200 | |
62417089 | AleksanderBalobanov | D | Oct. 12, 2019, 11:54 a.m. | OK | MS C++ 2017 | TESTS | 94 | 717 | 41267200 | 2200 | |
60368456 | pajenegod | D | Sept. 10, 2019, 11:06 p.m. | OK | PyPy 2 | TESTS | 94 | 654 | 39526400 | 2200 | |
24253856 | absolutezero | D | Jan. 29, 2017, 6:28 p.m. | OK | PyPy 2 | TESTS | 94 | 951 | 98304000 | 2200 | |
24252221 | absolutezero | D | Jan. 29, 2017, 4:46 p.m. | OK | PyPy 2 | TESTS | 94 | 1403 | 94105600 | 2200 | |
24252136 | absolutezero | D | Jan. 29, 2017, 4:42 p.m. | OK | PyPy 2 | TESTS | 94 | 1404 | 93696000 | 2200 | |
18936907 | nwi | D | July 6, 2016, 7:27 p.m. | OK | Python 2 | TESTS | 94 | 561 | 15360000 | 2200 | |
18989215 | chi-shde | D | July 9, 2016, 4:40 p.m. | OK | Python 2 | TESTS | 94 | 624 | 15360000 | 2200 | |
19195145 | kuritzky | D | July 17, 2016, 6:54 p.m. | OK | Python 3 | TESTS | 94 | 1793 | 36352000 | 2200 |
Back to search problems