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 |
---|---|---|---|---|---|---|
1495 | Codeforces Round 706 (Div. 1) | FINISHED | False | 7200 | 121888463 | March 10, 2021, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 471 ) | E | Qingshan and Daniel | PROGRAMMING | brute force data structures greedy implementation |
B"Qingshan and Daniel are going to play a card game. But it will be so boring if only two persons play this. So they will make n robots in total to play this game automatically. Robots made by Qingshan belong to the team 1 , and robots made by Daniel belong to the team 2 . Robot i belongs to team t_i . Before the game starts, a_i cards are given for robot i . The rules for this card game are simple: We define the distance from robot x to robot y as dist(x,y)=(y-x+n) bmod n . It is similar to the oriented distance on the circle. For example, when n=5 , the distance from 1 to 3 is dist(1,3)=(3-1+5) bmod 5=2 , the distance from 3 to 1 is dist(3,1)=(1-3+5) bmod 5 =3 . Later, Qingshan finds out that it will take so much time to see how robots play. She wants to know the result as quickly as possible. You, as Qingshan's fan, are asked to calculate an array [ans_1,ans_2, ldots,ans_n] -- ans_i is equal to the number of cards, that i -th robot will discard during the game. You need to hurry! To avoid the large size of the input, the team and the number of cards of each robot will be generated in your code with some auxiliary arrays. The first line contains one integer n ( 1 <= n <= 5 cdot 10^6 ) -- the number of robots playing this game. The second line contains one integer m ( 1 <= m <= min(n,200 ,000) ). Each of the next m line contains four integers p_i , k_i , b_i , w_i ( 1 <= p_i <= n , 1 <= k_i <= 10^9+7 , 0 <= b_i ,w_i< k_i ). It's guaranteed that p_m=n and p_{j-1}<p_{j} ( 2 <= j <= m ). Arrays a_j and t_j should be generated by the following pseudo code: Print a single integer <= ft( prod_{i=1}^{n} ((ans_i oplus i^2)+1) right) bmod 10^9+7 , where oplus denotes the bitwise XOR operation. In the first test case a=[5,5,1] and $$"... |
Codeforces Round #706 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
109661025 | rainboy | E | March 10, 2021, 10:53 p.m. | OK | GNU C11 | TESTS | 17 | 358 | 60108800 | ||
109628977 | Imakf | E | March 10, 2021, 2:47 p.m. | OK | GNU C++11 | TESTS | 17 | 296 | 60108800 | ||
109668085 | eecs | E | March 11, 2021, 3:30 a.m. | OK | GNU C++11 | TESTS | 17 | 374 | 60108800 | ||
109616566 | Tommyr7 | E | March 10, 2021, 1:53 p.m. | OK | GNU C++11 | TESTS | 17 | 436 | 68300800 | ||
109672978 | Lucky_Glass | E | March 11, 2021, 5:19 a.m. | OK | GNU C++11 | TESTS | 17 | 452 | 59904000 | ||
109664833 | dengyipeng | E | March 11, 2021, 1:47 a.m. | OK | GNU C++11 | TESTS | 17 | 576 | 180121600 | ||
109645244 | atoiz | E | March 10, 2021, 5:17 p.m. | OK | GNU C++11 | TESTS | 17 | 716 | 85196800 | ||
109666435 | WarrenWN | E | March 11, 2021, 2:43 a.m. | OK | GNU C++11 | TESTS | 17 | 717 | 83353600 | ||
109667651 | TiwAirOAO | E | March 11, 2021, 3:18 a.m. | OK | GNU C++14 | TESTS | 17 | 420 | 63283200 | ||
109616350 | hank55663 | E | March 10, 2021, 1:52 p.m. | OK | GNU C++17 | TESTS | 17 | 451 | 63283200 | ||
109650099 | Ronnie007 | E | March 10, 2021, 6:23 p.m. | OK | GNU C++17 | TESTS | 17 | 452 | 60108800 | ||
109667297 | Isoeasy | E | March 11, 2021, 3:06 a.m. | OK | GNU C++17 | TESTS | 17 | 467 | 180633600 | ||
109669741 | DevourThemAll | E | March 11, 2021, 4:13 a.m. | OK | GNU C++17 | TESTS | 17 | 498 | 180428800 | ||
109625626 | yokozuna57 | E | March 10, 2021, 2:32 p.m. | OK | GNU C++17 | TESTS | 17 | 545 | 120217600 | ||
109630263 | natsugiri | E | March 10, 2021, 2:55 p.m. | OK | GNU C++17 | TESTS | 17 | 576 | 188518400 | ||
109649138 | tenkei | E | March 10, 2021, 6:09 p.m. | OK | GNU C++17 | TESTS | 17 | 592 | 63385600 | ||
109670741 | ftuknights | E | March 11, 2021, 4:37 a.m. | OK | GNU C++17 | TESTS | 17 | 592 | 126566400 | ||
109665178 | dengyipeng | E | March 11, 2021, 2:01 a.m. | OK | GNU C++17 | TESTS | 17 | 638 | 180326400 | ||
109628735 | Fulisike | E | March 10, 2021, 2:46 p.m. | OK | GNU C++17 | TESTS | 17 | 685 | 206848000 | ||
109613793 | LayCurse | E | March 10, 2021, 1:47 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 234 | 108748800 | ||
109629566 | jiangly | E | March 10, 2021, 2:51 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 311 | 63385600 | ||
109609900 | gamegame | E | March 10, 2021, 1:38 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 311 | 123494400 | ||
109606921 | ksun48 | E | March 10, 2021, 1:32 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 327 | 100966400 | ||
109648616 | Benq | E | March 10, 2021, 6:02 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 327 | 140288000 | ||
109666603 | dqa2021 | E | March 11, 2021, 2:47 a.m. | OK | GNU C++17 (64) | TESTS | 17 | 373 | 60108800 | ||
109618626 | AndreySergunin | E | March 10, 2021, 1:57 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 373 | 200396800 | ||
109615437 | tourist | E | March 10, 2021, 1:50 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 374 | 103424000 | ||
109595998 | Egor | E | March 10, 2021, 1:10 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 389 | 63385600 | ||
109614588 | maroonrk | E | March 10, 2021, 1:49 p.m. | OK | GNU C++17 (64) | TESTS | 17 | 405 | 145510400 | ||
109617561 | ocamler | E | March 10, 2021, 1:55 p.m. | OK | Rust | TESTS | 17 | 748 | 121036800 |
Back to search problems