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 |
---|---|---|---|---|---|---|
617 | Codeforces Round 340 (Div. 2) | FINISHED | False | 7200 | 278259899 | Jan. 23, 2016, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 8535 ) | E | XOR and Favorite Number | PROGRAMMING | data structures | 2300 |
B"Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the number of pairs of integers i and j, such that l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89j xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r and the xor of the numbers ai, xe2 x80 x89ai xe2 x80 x89+ xe2 x80 x891, xe2 x80 x89..., xe2 x80 x89aj is equal to k. The first line of the input contains integers n, m and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 xe2 x80 x89000 xe2 x80 x89000) -- the length of the array, the number of queries and Bob's favorite number respectively. The second line contains n integers ai (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891 xe2 x80 x89000 xe2 x80 x89000) -- Bob's array. Then m lines follow. The i-th line contains integers li and ri (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89li xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ri xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the parameters of the i-th query. Print m lines, answer the queries in the order they appear in the input. In the first sample the suitable pairs of i and j for the first query are: (1, 2), (1, 4), (1, 5), (2, 3), (3, 6), (5, 6), (6, 6). Not a single of these pairs is suitable for the second query. In the second sample xor equals 1 for all subarrays of an odd length."... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
50348458 | mrclr | E | Feb. 23, 2019, 7:28 a.m. | OK | Clang++17 Diagnostics | TESTS | 36 | 3900 | 22528000 | 2300 | |
37562951 | forlfs | E | April 24, 2018, 3:15 a.m. | OK | GNU C | TESTS | 36 | 873 | 14950400 | 2300 | |
37588419 | forlfs | E | April 25, 2018, 5:46 a.m. | OK | GNU C | TESTS | 36 | 904 | 14950400 | 2300 | |
37587961 | forlfs | E | April 25, 2018, 5:09 a.m. | OK | GNU C | TESTS | 36 | 998 | 14950400 | 2300 | |
37563016 | forlfs | E | April 24, 2018, 3:25 a.m. | OK | GNU C | TESTS | 36 | 1357 | 14950400 | 2300 | |
40708041 | hl666 | E | July 24, 2018, 2:17 p.m. | OK | GNU C++ | TESTS | 36 | 265 | 11571200 | 2300 | |
37505037 | luogu_bot1 | E | April 21, 2018, 6:25 a.m. | OK | GNU C++ | TESTS | 36 | 265 | 13721600 | 2300 | |
39732363 | Skqliao | E | June 28, 2018, 4:33 a.m. | OK | GNU C++ | TESTS | 36 | 265 | 19251200 | 2300 | |
37796329 | HN-001 | E | May 1, 2018, 11:13 a.m. | OK | GNU C++ | TESTS | 36 | 312 | 10752000 | 2300 | |
38886719 | SuperBlueCat | E | June 2, 2018, 11:05 a.m. | OK | GNU C++ | TESTS | 36 | 374 | 29593600 | 2300 | |
38886617 | luogu_bot3 | E | June 2, 2018, 11:02 a.m. | OK | GNU C++ | TESTS | 36 | 374 | 29593600 | 2300 | |
37924626 | Vixbob | E | May 6, 2018, 9:16 a.m. | OK | GNU C++ | TESTS | 36 | 374 | 46387200 | 2300 | |
37504940 | luogu_bot5 | E | April 21, 2018, 6:21 a.m. | OK | GNU C++ | TESTS | 36 | 389 | 11366400 | 2300 | |
38883892 | Kspywdz | E | June 2, 2018, 10:43 a.m. | OK | GNU C++ | TESTS | 36 | 389 | 14336000 | 2300 | |
35170497 | vjudge4 | E | Feb. 12, 2018, 6:39 a.m. | OK | GNU C++ | TESTS | 36 | 390 | 9216000 | 2300 | |
60313268 | rainboy | E | Sept. 9, 2019, 4:46 p.m. | OK | GNU C11 | TESTS | 36 | 561 | 6656000 | 2300 | |
50707266 | tyler178 | E | March 3, 2019, 4:58 a.m. | OK | GNU C++11 | TESTS | 36 | 124 | 10854400 | 2300 | |
66012332 | tianbu | E | Nov. 30, 2019, 3:21 a.m. | OK | GNU C++11 | TESTS | 36 | 124 | 11468800 | 2300 | |
58480880 | chenyewei_1234 | E | Aug. 9, 2019, 5:30 a.m. | OK | GNU C++11 | TESTS | 36 | 124 | 12800000 | 2300 | |
65701897 | smsylby | E | Nov. 25, 2019, 11:04 a.m. | OK | GNU C++11 | TESTS | 36 | 124 | 15462400 | 2300 | |
67515187 | liuxinyuanxy | E | Dec. 24, 2019, 10:34 a.m. | OK | GNU C++11 | TESTS | 36 | 139 | 15667200 | 2300 | |
46201358 | _zay | E | Nov. 25, 2018, 11:36 a.m. | OK | GNU C++11 | TESTS | 36 | 139 | 87961600 | 2300 | |
44735338 | Unlimited | E | Oct. 23, 2018, 12:35 p.m. | OK | GNU C++11 | TESTS | 36 | 140 | 7372800 | 2300 | |
54439019 | luogu_bot2 | E | May 21, 2019, 7:34 a.m. | OK | GNU C++11 | TESTS | 36 | 140 | 14643200 | 2300 | |
62096558 | gsyz | E | Oct. 8, 2019, 7:44 a.m. | OK | GNU C++11 | TESTS | 36 | 140 | 14848000 | 2300 | |
54407564 | SharpnessV | E | May 20, 2019, 7:26 a.m. | OK | GNU C++11 | TESTS | 36 | 140 | 22835200 | 2300 | |
46353899 | neal | E | Nov. 29, 2018, 7:02 a.m. | OK | GNU C++14 | TESTS | 36 | 109 | 9523200 | 2300 | |
46182513 | neal | E | Nov. 24, 2018, 6:53 p.m. | OK | GNU C++14 | TESTS | 36 | 124 | 9420800 | 2300 | |
46182626 | neal | E | Nov. 24, 2018, 6:57 p.m. | OK | GNU C++14 | TESTS | 36 | 140 | 9420800 | 2300 | |
46182634 | neal | E | Nov. 24, 2018, 6:57 p.m. | OK | GNU C++14 | TESTS | 36 | 155 | 9420800 | 2300 | |
46353887 | neal | E | Nov. 29, 2018, 7:02 a.m. | OK | GNU C++14 | TESTS | 36 | 156 | 9523200 | 2300 | |
46182429 | neal | E | Nov. 24, 2018, 6:50 p.m. | OK | GNU C++14 | TESTS | 36 | 171 | 9420800 | 2300 | |
65793481 | tcm | E | Nov. 27, 2019, 1:42 a.m. | OK | GNU C++14 | TESTS | 36 | 171 | 18432000 | 2300 | |
52584471 | xiaowuc1 | E | April 10, 2019, 10:02 p.m. | OK | GNU C++14 | TESTS | 36 | 187 | 11776000 | 2300 | |
60495464 | Bakry_ | E | Sept. 13, 2019, 4:10 p.m. | OK | GNU C++14 | TESTS | 36 | 187 | 44134400 | 2300 | |
51056715 | lucasturci | E | March 8, 2019, 11:18 p.m. | OK | GNU C++14 | TESTS | 36 | 187 | 44851200 | 2300 | |
68380861 | RedStone | E | Jan. 8, 2020, 12:54 a.m. | OK | GNU C++17 | TESTS | 36 | 124 | 7065600 | 2300 | |
51243750 | fakhoury | E | March 13, 2019, 2:23 a.m. | OK | GNU C++17 | TESTS | 36 | 171 | 10342400 | 2300 | |
51543313 | SLIFER | E | March 19, 2019, 7:08 p.m. | OK | GNU C++17 | TESTS | 36 | 171 | 13619200 | 2300 | |
58713596 | vjudge5 | E | Aug. 13, 2019, 1:12 p.m. | OK | GNU C++17 | TESTS | 36 | 186 | 11264000 | 2300 | |
59516996 | Mahir83 | E | Aug. 26, 2019, 10:31 a.m. | OK | GNU C++17 | TESTS | 36 | 187 | 7782400 | 2300 | |
44275588 | CPX | E | Oct. 13, 2018, 9:14 p.m. | OK | GNU C++17 | TESTS | 36 | 187 | 13926400 | 2300 | |
58790446 | vjudge1 | E | Aug. 14, 2019, 2:07 a.m. | OK | GNU C++17 | TESTS | 36 | 187 | 160665600 | 2300 | |
57810066 | Phortox | E | July 26, 2019, 4:52 p.m. | OK | GNU C++17 | TESTS | 36 | 202 | 6656000 | 2300 | |
50586525 | TD2R | E | Feb. 28, 2019, 4:16 a.m. | OK | GNU C++17 | TESTS | 36 | 202 | 6963200 | 2300 | |
68380831 | RedStone | E | Jan. 8, 2020, 12:52 a.m. | OK | GNU C++17 | TESTS | 36 | 202 | 7065600 | 2300 | |
68667506 | synapse | E | Jan. 12, 2020, 3:39 p.m. | OK | Go | TESTS | 36 | 405 | 4505600 | 2300 | |
68667440 | synapse | E | Jan. 12, 2020, 3:38 p.m. | OK | Go | TESTS | 36 | 499 | 9011200 | 2300 | |
68667104 | synapse | E | Jan. 12, 2020, 3:32 p.m. | OK | Go | TESTS | 36 | 639 | 13414400 | 2300 | |
68105709 | synapse | E | Jan. 3, 2020, 6:55 a.m. | OK | Go | TESTS | 36 | 779 | 9318400 | 2300 | |
68105524 | synapse | E | Jan. 3, 2020, 6:50 a.m. | OK | Go | TESTS | 36 | 795 | 9318400 | 2300 | |
68105065 | synapse | E | Jan. 3, 2020, 6:32 a.m. | OK | Go | TESTS | 36 | 1014 | 13414400 | 2300 | |
67408709 | Nutella3000 | E | Dec. 22, 2019, 7:28 a.m. | OK | Java 8 | TESTS | 36 | 420 | 6963200 | 2300 | |
42246023 | aman28rwt | E | Aug. 29, 2018, 3:20 p.m. | OK | Java 8 | TESTS | 36 | 467 | 6758400 | 2300 | |
41632895 | Harpae | E | Aug. 15, 2018, 7:44 p.m. | OK | Java 8 | TESTS | 36 | 561 | 16076800 | 2300 | |
61037942 | Ahmed_Diab | E | Sept. 21, 2019, 9:02 p.m. | OK | Java 8 | TESTS | 36 | 561 | 40243200 | 2300 | |
53677439 | mennafadali | E | May 2, 2019, 4:48 p.m. | OK | Java 8 | TESTS | 36 | 607 | 38604800 | 2300 | |
41632794 | Harpae | E | Aug. 15, 2018, 7:39 p.m. | OK | Java 8 | TESTS | 36 | 670 | 14438400 | 2300 | |
40981660 | prabhat236218 | E | July 30, 2018, 6:05 p.m. | OK | Java 8 | TESTS | 36 | 686 | 80384000 | 2300 | |
40622515 | jport | E | July 22, 2018, 2:57 a.m. | OK | Java 8 | TESTS | 36 | 701 | 3788800 | 2300 | |
44015087 | ZeyadKhattab | E | Oct. 8, 2018, 8:26 p.m. | OK | Java 8 | TESTS | 36 | 701 | 38195200 | 2300 | |
68028042 | StayAwayFromBitches | E | Jan. 1, 2020, 7:21 a.m. | OK | Java 8 | TESTS | 36 | 779 | 6860800 | 2300 | |
66013013 | vjudge3 | E | Nov. 30, 2019, 3:47 a.m. | OK | MS C++ | TESTS | 36 | 171 | 26112000 | 2300 | |
66013250 | vjudge2 | E | Nov. 30, 2019, 3:56 a.m. | OK | MS C++ | TESTS | 36 | 218 | 26112000 | 2300 | |
58364452 | ekko101 | E | Aug. 6, 2019, 2:53 a.m. | OK | MS C++ | TESTS | 36 | 296 | 36966400 | 2300 | |
66032860 | vjudge2 | E | Nov. 30, 2019, 10:44 a.m. | OK | MS C++ | TESTS | 36 | 311 | 72192000 | 2300 | |
58378914 | vjudge2 | E | Aug. 6, 2019, 9:11 a.m. | OK | MS C++ | TESTS | 36 | 343 | 36966400 | 2300 | |
59650427 | vjudge5 | E | Aug. 29, 2019, 7:58 a.m. | OK | MS C++ | TESTS | 36 | 405 | 96153600 | 2300 | |
59650335 | vjudge2 | E | Aug. 29, 2019, 7:55 a.m. | OK | MS C++ | TESTS | 36 | 421 | 96153600 | 2300 | |
66032935 | vjudge5 | E | Nov. 30, 2019, 10:46 a.m. | OK | MS C++ | TESTS | 36 | 436 | 72192000 | 2300 | |
56506293 | vjudge3 | E | July 4, 2019, 8:35 a.m. | OK | MS C++ | TESTS | 36 | 452 | 224460800 | 2300 | |
54783125 | vjudge1 | E | May 29, 2019, 12:53 a.m. | OK | MS C++ | TESTS | 36 | 468 | 41267200 | 2300 | |
68697831 | vjudge5 | E | Jan. 13, 2020, 8:29 a.m. | OK | MS C++ 2017 | TESTS | 36 | 358 | 52940800 | 2300 | |
65953799 | vjudge5 | E | Nov. 29, 2019, 11:58 a.m. | OK | MS C++ 2017 | TESTS | 36 | 358 | 64102400 | 2300 | |
57745776 | 529886336 | E | July 25, 2019, 12:58 p.m. | OK | MS C++ 2017 | TESTS | 36 | 451 | 41984000 | 2300 | |
58364217 | mie_mie | E | Aug. 6, 2019, 2:45 a.m. | OK | MS C++ 2017 | TESTS | 36 | 498 | 200396800 | 2300 | |
58364267 | vjudge5 | E | Aug. 6, 2019, 2:47 a.m. | OK | MS C++ 2017 | TESTS | 36 | 514 | 27238400 | 2300 | |
58373963 | vjudge1 | E | Aug. 6, 2019, 7:38 a.m. | OK | MS C++ 2017 | TESTS | 36 | 514 | 67276800 | 2300 | |
58374089 | vjudge4 | E | Aug. 6, 2019, 7:40 a.m. | OK | MS C++ 2017 | TESTS | 36 | 514 | 84172800 | 2300 | |
58378492 | vjudge5 | E | Aug. 6, 2019, 9:03 a.m. | OK | MS C++ 2017 | TESTS | 36 | 514 | 200396800 | 2300 | |
58518259 | vjudge2 | E | Aug. 10, 2019, 2:15 a.m. | OK | MS C++ 2017 | TESTS | 36 | 545 | 27238400 | 2300 | |
58378372 | vjudge1 | E | Aug. 6, 2019, 9:01 a.m. | OK | MS C++ 2017 | TESTS | 36 | 545 | 200396800 | 2300 |
Back to search problems