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 |
---|---|---|---|---|---|---|
1815 | Codeforces Round 865 (Div. 1) | FINISHED | False | 8100 | 56128463 | April 9, 2023, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1219 ) | D | XOR Counting | PROGRAMMING | bitmasks combinatorics dp math | 2600 |
B"Given two positive integers n and m . Find the sum of all possible values of a_1 bigoplus a_2 bigoplus ldots bigoplus a_m , where a_1,a_2, ldots,a_m are non-negative integers such that a_1+a_2+ ldots+a_m=n . Note that all possible values a_1 bigoplus a_2 bigoplus ldots bigoplus a_m should be counted in the sum exactly once. As the answer may be too large, output your answer modulo 998244353 . Here, bigoplus denotes the bitwise XOR operation. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of test cases follows. The first and only line of each test case contains two integers n and m ( 0 <= n <= 10^{18}, 1 <= m <= 10^5 ) -- the sum and the number of integers in the set, respectively. For each test case, output the sum of all possible values of a_1 bigoplus a_2 bigoplus ldots bigoplus a_m among all non-negative integers a_1,a_2, ldots,a_m with a_1+a_2+ ldots+a_m=n . As the answer may be too large, output your answer modulo 998244353 . For the first test case, we must have a_1=69 , so it's the only possible value of a_1 , therefore our answer is 69 . For the second test case, (a_1,a_2) can be (0,5), (1,4), (2,3), (3,2), (4,1) or (5,0) , in which a_1 bigoplus a_2 are 5,5,1,1,5,5 respectively. So a_1 bigoplus a_2 can be 1 or 5 , therefore our answer is 1+5=6 . For the third test case, a_1,a_2, ldots,a_{10} must be all 0 , so a_1 bigoplus a_2 bigoplus ldots bigoplus a_{10}=0 . Therefore our answer is 0 . "... |
Editorial of Codeforces Round #865 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
201522091 | hos.lyric | D | April 9, 2023, 3:34 p.m. | OK | D | TESTS | 93 | 342 | 59392000 | 2600 | |
201583101 | rainboy | D | April 9, 2023, 8:05 p.m. | OK | GNU C11 | TESTS | 93 | 93 | 0 | 2600 | |
201551001 | ztcakioi | D | April 9, 2023, 4:30 p.m. | OK | GNU C++14 | TESTS | 93 | 31 | 0 | 2600 | |
201560986 | le0n | D | April 9, 2023, 4:55 p.m. | OK | GNU C++14 | TESTS | 93 | 31 | 0 | 2600 | |
201549337 | MakaPakka | D | April 9, 2023, 4:26 p.m. | OK | GNU C++14 | TESTS | 93 | 62 | 0 | 2600 | |
201553175 | al3xstr33t | D | April 9, 2023, 4:35 p.m. | OK | GNU C++14 | TESTS | 93 | 62 | 16076800 | 2600 | |
201561640 | Kaitokid | D | April 9, 2023, 4:56 p.m. | OK | GNU C++14 | TESTS | 93 | 77 | 0 | 2600 | |
201554968 | peiwenjun | D | April 9, 2023, 4:40 p.m. | OK | GNU C++14 | TESTS | 93 | 78 | 0 | 2600 | |
201600502 | mirror233 | D | April 10, 2023, 12:45 a.m. | OK | GNU C++14 | TESTS | 93 | 78 | 3993600 | 2600 | |
201559572 | newbie_wrz | D | April 9, 2023, 4:52 p.m. | OK | GNU C++14 | TESTS | 93 | 78 | 7270400 | 2600 | |
201535882 | paul2008 | D | April 9, 2023, 3:56 p.m. | OK | GNU C++14 | TESTS | 93 | 109 | 0 | 2600 | |
201602593 | stOzenghaoweiOrz | D | April 10, 2023, 1:29 a.m. | OK | GNU C++14 | TESTS | 93 | 124 | 0 | 2600 | |
201579297 | Ant_Man | D | April 9, 2023, 7:24 p.m. | OK | GNU C++17 | TESTS | 93 | 31 | 0 | 2600 | |
201578003 | UNIXBAS | D | April 9, 2023, 7:10 p.m. | OK | GNU C++17 | TESTS | 93 | 31 | 0 | 2600 | |
201576423 | frodakcin | D | April 9, 2023, 6:55 p.m. | OK | GNU C++17 | TESTS | 93 | 31 | 0 | 2600 | |
201556388 | TadijaSebez | D | April 9, 2023, 4:43 p.m. | OK | GNU C++17 | TESTS | 93 | 31 | 0 | 2600 | |
201610688 | zihao_intuition | D | April 10, 2023, 4 a.m. | OK | GNU C++17 | TESTS | 93 | 31 | 0 | 2600 | |
201566383 | SpaceJellyfish | D | April 9, 2023, 5:39 p.m. | OK | GNU C++17 | TESTS | 93 | 46 | 0 | 2600 | |
201557712 | IZONE | D | April 9, 2023, 4:47 p.m. | OK | GNU C++17 | TESTS | 93 | 46 | 0 | 2600 | |
201566994 | serotonin | D | April 9, 2023, 5:42 p.m. | OK | GNU C++17 | TESTS | 93 | 46 | 0 | 2600 | |
201550392 | feeder1 | D | April 9, 2023, 4:29 p.m. | OK | GNU C++17 | TESTS | 93 | 46 | 204800 | 2600 | |
201541700 | SHZhang | D | April 9, 2023, 4:08 p.m. | OK | GNU C++17 | TESTS | 93 | 61 | 0 | 2600 | |
201548418 | rniya | D | April 9, 2023, 4:23 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 15 | 0 | 2600 | |
201566395 | zhjxaoini | D | April 9, 2023, 5:39 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201585610 | fatemetmhr | D | April 9, 2023, 8:34 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201569891 | kotatsugame | D | April 9, 2023, 5:59 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201562206 | MateoCV | D | April 9, 2023, 4:58 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201559910 | clam | D | April 9, 2023, 4:52 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201547709 | Rubikun | D | April 9, 2023, 4:21 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201546836 | ttttan | D | April 9, 2023, 4:19 p.m. | OK | GNU C++17 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201605136 | szb | D | April 10, 2023, 2:24 a.m. | OK | GNU C++17 (64) | TESTS | 93 | 46 | 0 | 2600 | |
201606637 | q-w-q-w-q | D | April 10, 2023, 2:51 a.m. | OK | GNU C++17 (64) | TESTS | 93 | 46 | 0 | 2600 | |
201566677 | A_G | D | April 9, 2023, 5:40 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 15 | 0 | 2600 | |
201561747 | emthrm | D | April 9, 2023, 4:57 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 15 | 0 | 2600 | |
201585154 | maxplus | D | April 9, 2023, 8:29 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 15 | 0 | 2600 | |
201577781 | Be_dos | D | April 9, 2023, 7:08 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 30 | 0 | 2600 | |
201589083 | 244mhq | D | April 9, 2023, 9:13 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201610945 | watashikininarimasu | D | April 10, 2023, 4:05 a.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201600767 | flowerletter | D | April 10, 2023, 12:51 a.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201600090 | swift-zym | D | April 10, 2023, 12:38 a.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201598994 | natsugiri | D | April 10, 2023, 12:16 a.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201583437 | Anonymous_Noob | D | April 9, 2023, 8:09 p.m. | OK | GNU C++20 (64) | TESTS | 93 | 31 | 0 | 2600 | |
201546611 | iakovlev.zakhar | D | April 9, 2023, 4:19 p.m. | OK | Java 8 | TESTS | 93 | 202 | 0 | 2600 | |
201598520 | Maruzensky | D | April 10, 2023, 12:07 a.m. | OK | PyPy 3-64 | TESTS | 93 | 420 | 9830400 | 2600 | |
201566463 | toam | D | April 9, 2023, 5:40 p.m. | OK | PyPy 3-64 | TESTS | 93 | 436 | 11264000 | 2600 | |
201560054 | dyppp | D | April 9, 2023, 4:53 p.m. | OK | PyPy 3-64 | TESTS | 93 | 545 | 10035200 | 2600 | |
201608200 | Little_Sheep_Yawn | D | April 10, 2023, 3:19 a.m. | OK | PyPy 3-64 | TESTS | 93 | 935 | 21299200 | 2600 | |
201535540 | sansen | D | April 9, 2023, 3:56 p.m. | OK | Rust 2021 | TESTS | 93 | 46 | 512000 | 2600 |
Back to search problems