Codeforces Round #FF (Div. 1)

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
446 Codeforces Round #FF (Div. 1) FINISHED False 7200 371149223 July 13, 2014, 1 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 143 ) E DZY Loves Bridges PROGRAMMING math matrices 3100

DZY owns 2 m islands near his home, numbered from 1 to 2 m . He loves building bridges to connect the islands. Every bridge he builds takes one day's time to walk across. DZY has a strange rule of building the bridges. For every pair of islands u , v ( u ≠ v ) , he has built 2 k different bridges connecting them, where ( a | b means b is divisible by a ). These bridges are bidirectional. Also, DZY has built some bridges connecting his home with the islands. Specifically, there are a i different bridges from his home to the i -th island. These are one-way bridges, so after he leaves his home he will never come back. DZY decides to go to the islands for sightseeing. At first he is at home. He chooses and walks across one of the bridges connecting with his home, and arrives at some island. After that, he will spend t day(s) on the islands. Each day, he can choose to stay and rest, or to walk to another island across the bridge. It is allowed to stay at an island for more than one day. It's also allowed to cross one bridge more than once. Suppose that right after the t -th day DZY stands at the i -th island. Let ans i be the number of ways for DZY to reach the i -th island after t -th day. Your task is to calculate ans i for each i modulo 1051131 . To avoid huge input, we use the following way to generate the array a . You are given the first s elements of array: a 1 , a 2 , ..., a s . All the other elements should be calculated by formula: a i = (101· a i - s + 10007) mod 1051131 ( s < i ≤ 2 m ) . The first line contains three integers m , t , s (1 ≤ m ≤ 25; 1 ≤ t ≤ 10 18 ; 1 ≤ s ≤ min (2 m , 10 5 )) . The second line contains s integers a 1 , a 2 , ..., a s (1 ≤ a i ≤ 10 6 ) . To avoid huge output, you only need to output xor-sum of all the answers for all i modulo 1051131 (1 ≤ i ≤ 2 m ) , i.e. ( ans 1 mod 1051131) xor ( ans 2 mod 1051131) xor ... xor ( ans n mod 1051131) . In the first sample, ans = 6, 7, 6, 6 . If he wants to be at island

Tutorials

Codeforces Round #FF(255) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
7361035 hos.lyric E Aug. 6, 2014, 1:05 p.m. OK D TESTS 25 4211 408166400 3100
40988267 ReaLNero1 E July 30, 2018, 9:51 p.m. OK GNU C++ TESTS 25 888 140288000 3100
13999284 130705009 E Nov. 1, 2015, 3:40 a.m. OK GNU C++ TESTS 25 935 134246400 3100
7111085 Shapo E July 15, 2014, 5:51 p.m. OK GNU C++ TESTS 25 951 140288000 3100
7667174 beantan1 E Sept. 2, 2014, 11:41 a.m. OK GNU C++ TESTS 25 1029 134451200 3100
7111006 Shapo E July 15, 2014, 5:34 p.m. OK GNU C++ TESTS 25 1060 140288000 3100
7817992 Philipsweng E Sept. 17, 2014, 12:58 p.m. OK GNU C++ TESTS 25 1138 134451200 3100
35872730 ______u______ E March 3, 2018, 7:16 a.m. OK GNU C++ TESTS 25 1138 136396800 3100
35872496 ______n______ E March 3, 2018, 7:10 a.m. OK GNU C++ TESTS 25 1138 136396800 3100
35871881 _____k_____ E March 3, 2018, 6:58 a.m. OK GNU C++ TESTS 25 1138 136396800 3100
35871880 _____i_____ E March 3, 2018, 6:58 a.m. OK GNU C++ TESTS 25 1138 136396800 3100
7298993 step5 E July 31, 2014, 11:07 a.m. OK GNU C++0x TESTS 25 1497 403456000 3100
7298999 step5 E July 31, 2014, 11:08 a.m. OK GNU C++0x TESTS 25 1544 403456000 3100
7366622 kolina E Aug. 7, 2014, 11:18 a.m. OK GNU C++0x TESTS 25 1575 470937600 3100
8248834 zhj E Oct. 16, 2014, 2:27 p.m. OK GNU C++0x TESTS 25 1762 269004800 3100
7152282 Orfest E July 18, 2014, 9:29 p.m. OK GNU C++0x TESTS 25 2776 403456000 3100
7678625 desert97 E Sept. 4, 2014, 3:41 a.m. OK GNU C++0x TESTS 25 4601 403456000 3100
7678614 desert97 E Sept. 4, 2014, 3:38 a.m. OK GNU C++0x TESTS 25 4648 403456000 3100
63273775 ffffxk E Oct. 24, 2019, 5:48 a.m. OK GNU C++11 TESTS 25 826 269004800 3100
67274616 ElangBondol E Dec. 20, 2019, 9:42 a.m. OK GNU C++11 TESTS 25 873 269004800 3100
57889588 lopare E July 28, 2019, 11:19 a.m. OK GNU C++11 TESTS 25 919 134348800 3100
57819245 py_ultron E July 26, 2019, 9:45 p.m. OK GNU C++11 TESTS 25 950 134348800 3100
63215251 luogu_bot2 E Oct. 23, 2019, 5:50 a.m. OK GNU C++11 TESTS 25 966 134348800 3100
17147195 freebsdx E April 3, 2016, 3:19 p.m. OK GNU C++11 TESTS 25 966 136499200 3100
40780673 zhouyuyang E July 26, 2018, 1:35 p.m. OK GNU C++11 TESTS 25 982 134451200 3100
63232990 luogu_bot5 E Oct. 23, 2019, 11:32 a.m. OK GNU C++11 TESTS 25 1060 134451200 3100
50550543 QAQAutoMaton E Feb. 27, 2019, 3:43 a.m. OK GNU C++11 TESTS 25 1419 407654400 3100
11905126 Remilia-Scarlet E July 3, 2015, 3:27 a.m. OK GNU C++11 TESTS 25 1559 134451200 3100
60418773 Scut82 E Sept. 12, 2019, 4:28 a.m. OK GNU C++14 TESTS 25 670 134451200 3100
23532188 Ali.Pi E Jan. 4, 2017, 9:30 a.m. OK GNU C++14 TESTS 25 1170 270848000 3100
59380589 ruo E Aug. 24, 2019, 2:44 a.m. OK GNU C++17 TESTS 25 842 134451200 3100
49986467 Mandir_Wahi_Banayenge E Feb. 16, 2019, 10:45 a.m. OK GNU C++17 TESTS 25 951 269004800 3100
40673156 des1997 E July 23, 2018, 1:47 p.m. OK GNU C++17 TESTS 25 1169 269004800 3100
51464203 ivan100sic E March 18, 2019, 10:45 p.m. OK GNU C++17 TESTS 25 3337 403456000 3100
51464189 ivan100sic E March 18, 2019, 10:44 p.m. OK GNU C++17 TESTS 25 3478 403456000 3100
7112822 dnk E July 16, 2014, 3:01 a.m. OK Java 6 TESTS 25 3977 521728000 3100
7112820 dnk E July 16, 2014, 3:01 a.m. OK Java 7 TESTS 25 3930 521728000 3100
7112815 dnk E July 16, 2014, 2:59 a.m. OK Java 8 TESTS 25 2652 471756800 3100
7101594 Rivx E July 14, 2014, 2:17 p.m. OK MS C++ TESTS 25 1481 134451200 3100

remove filters

Back to search problems