Codeforces Round 122 (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
193 Codeforces Round 122 (Div. 1) FINISHED False 7200 399133786 June 3, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1021 ) B Xor PROGRAMMING brute force 2100

B"John Doe has four arrays: a, b, k, and p. Each array consists of n integers. Elements of all arrays are indexed starting from 1. Array p is a permutation of integers 1 to n. John invented a game for his friends and himself. Initially a player is given array a. The player must consecutively execute exactly u operations on a. You are permitted to execute the following operations: After all u operations are applied, the number of points the player gets is determined by the formula . John wants to find out what maximum number of points a player can win in his game. Help him. The first line contains space-separated integers n, u and r (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89u xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8930, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of elements in each array, the number of operations and the number that describes one of the operations. Each of the next four lines contains n space-separated integers -- arrays a, b, k, p. The first line has array a, the second line has array b, the third line has array k and the fourth one has array p. It is guaranteed that elements of arrays a and b are positive and do not exceed 104 (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104), elements of array k do not exceed 104 in the absolute value (|k| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89104) and p is a permutation of numbers from 1 to n. On a single line print number s -- the maximum number of points that a player can win in John's game. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier. In the first sample you should first apply the operation of the first type, then the operation of the second type."...

Tutorials

Editoral Codeforces Round #122

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1754726 tourist B June 3, 2012, 3:43 p.m. OK Delphi TESTS 45 1230 9318400 2100
1763065 Oryshych B June 4, 2012, 7:23 a.m. OK Delphi TESTS 45 1300 9318400 2100
1768300 Ramp B June 6, 2012, 9:26 p.m. OK Delphi TESTS 45 1440 9523200 2100
1760415 Sereja B June 3, 2012, 5:25 p.m. OK Delphi TESTS 45 1830 9420800 2100
1763271 AleksanderBalobanov B June 4, 2012, 8:45 a.m. OK Delphi TESTS 45 3730 9420800 2100
1761163 vlad107 B June 3, 2012, 5:50 p.m. OK FPC TESTS 45 840 1024000 2100
1763393 ACTheory B June 4, 2012, 9:32 a.m. OK FPC TESTS 45 1300 1126400 2100
1764410 scorpion B June 4, 2012, 3:54 p.m. OK FPC TESTS 45 1410 1126400 2100
1764248 Mars314 B June 4, 2012, 2:51 p.m. OK FPC TESTS 45 2160 1228800 2100
1761321 Rubanenko B June 3, 2012, 5:58 p.m. OK FPC TESTS 45 2580 1228800 2100
1759943 kawatea B June 3, 2012, 5:15 p.m. OK GNU C TESTS 45 440 1433600 2100
27475252 vjudge4 B May 31, 2017, 11:06 p.m. OK GNU C++ TESTS 45 249 0 2100
26901269 vjudge4 B May 6, 2017, 12:35 p.m. OK GNU C++ TESTS 45 249 0 2100
12698047 vjudge2 B Aug. 25, 2015, 4:16 p.m. OK GNU C++ TESTS 45 249 0 2100
42348187 Scut82 B Sept. 2, 2018, 1:10 a.m. OK GNU C++ TESTS 45 265 0 2100
42323953 Scut82 B Sept. 1, 2018, 2:24 a.m. OK GNU C++ TESTS 45 280 0 2100
26914996 vjudge1 B May 7, 2017, 3:17 a.m. OK GNU C++ TESTS 45 280 0 2100
26903261 vjudge4 B May 6, 2017, 2:16 p.m. OK GNU C++ TESTS 45 280 0 2100
18876038 vjudge5 B July 4, 2016, 3:42 a.m. OK GNU C++ TESTS 45 280 0 2100
18867197 vjudge2 B July 3, 2016, 11:52 a.m. OK GNU C++ TESTS 45 280 0 2100
7674297 vjudge5 B Sept. 3, 2014, 12:33 p.m. OK GNU C++ TESTS 45 280 0 2100
1760062 riadwaw B June 3, 2012, 5:18 p.m. OK GNU C++0x TESTS 45 450 1433600 2100
9419754 aliasadiiii B Jan. 12, 2015, 8:08 p.m. OK GNU C++0x TESTS 45 452 0 2100
1764753 Shapo B June 4, 2012, 6:43 p.m. OK GNU C++0x TESTS 45 520 1433600 2100
1755123 watashi B June 3, 2012, 3:47 p.m. OK GNU C++0x TESTS 45 530 1433600 2100
9855646 win_ay39 B Feb. 15, 2015, 6:42 a.m. OK GNU C++0x TESTS 45 686 0 2100
1761147 pablo.aguilar B June 3, 2012, 5:50 p.m. OK GNU C++0x TESTS 45 720 1433600 2100
1762639 wisterik B June 4, 2012, 3:59 a.m. OK GNU C++0x TESTS 45 730 1433600 2100
1762616 wisterik B June 4, 2012, 3:48 a.m. OK GNU C++0x TESTS 45 730 1433600 2100
5236054 2011330300713 B Nov. 25, 2013, 1:43 p.m. OK GNU C++0x TESTS 45 780 0 2100
5236030 2011330300713 B Nov. 25, 2013, 1:40 p.m. OK GNU C++0x TESTS 45 780 0 2100
48064078 skywalkert B Jan. 7, 2019, 5:03 p.m. OK GNU C++11 TESTS 45 233 0 2100
46253451 cristina_borza B Nov. 26, 2018, 3:19 p.m. OK GNU C++11 TESTS 45 249 0 2100
12698041 qingping95 B Aug. 25, 2015, 4:16 p.m. OK GNU C++11 TESTS 45 249 0 2100
12132834 ahmad.diaa B July 20, 2015, 4:19 p.m. OK GNU C++11 TESTS 45 265 0 2100
14830653 .I. B Dec. 16, 2015, 7:13 a.m. OK GNU C++11 TESTS 45 280 0 2100
12249144 hkglly B July 28, 2015, 7:56 a.m. OK GNU C++11 TESTS 45 280 0 2100
36567940 laoliumang B March 24, 2018, 8:20 a.m. OK GNU C++11 TESTS 45 296 3788800 2100
15737138 MaGaroo B Feb. 1, 2016, 5:48 p.m. OK GNU C++11 TESTS 45 312 0 2100
11094627 x.bryanc B May 14, 2015, 3:47 a.m. OK GNU C++11 TESTS 45 312 0 2100
17274744 fengsuiyan B April 11, 2016, 7:50 a.m. OK GNU C++11 TESTS 45 327 0 2100
26779227 Jubair_2147483647 B May 1, 2017, 5:21 a.m. OK GNU C++14 TESTS 45 265 1945600 2100
26921986 pr0grammer B May 7, 2017, 11:17 a.m. OK GNU C++14 TESTS 45 295 0 2100
35469800 ugly2333 B Feb. 19, 2018, 12:11 p.m. OK GNU C++14 TESTS 45 295 2048000 2100
34182570 tanujyadav97 B Jan. 14, 2018, 6:28 p.m. OK GNU C++14 TESTS 45 312 1945600 2100
34957396 wrinx B Feb. 5, 2018, 11:53 p.m. OK GNU C++14 TESTS 45 358 1945600 2100
26921974 vjudge5 B May 7, 2017, 11:16 a.m. OK GNU C++14 TESTS 45 374 0 2100
38805133 mredigonda B May 31, 2018, 2:34 p.m. OK GNU C++14 TESTS 45 452 3379200 2100
22147317 ascchrvalstr B Nov. 10, 2016, 11:57 a.m. OK GNU C++14 TESTS 45 468 0 2100
26733448 ConnorZhong B April 28, 2017, 6:39 p.m. OK GNU C++14 TESTS 45 483 1945600 2100
27117692 egoist B May 15, 2017, 8:20 a.m. OK GNU C++14 TESTS 45 546 0 2100
44909958 ruo B Oct. 26, 2018, 1:03 p.m. OK GNU C++17 TESTS 45 234 307200 2100
60507782 tfg B Sept. 13, 2019, 11:12 p.m. OK GNU C++17 TESTS 45 265 0 2100
60148921 Hoshi08 B Sept. 6, 2019, 2:36 a.m. OK GNU C++17 TESTS 45 280 0 2100
52453337 Nishihara B April 7, 2019, 10:43 a.m. OK GNU C++17 TESTS 45 280 204800 2100
52452991 Nishihara B April 7, 2019, 10:36 a.m. OK GNU C++17 TESTS 45 296 0 2100
52452806 Nishihara B April 7, 2019, 10:31 a.m. OK GNU C++17 TESTS 45 312 0 2100
52453859 Nishihara B April 7, 2019, 10:55 a.m. OK GNU C++17 TESTS 45 312 204800 2100
37550448 Jori B April 23, 2018, 12:22 p.m. OK GNU C++17 TESTS 45 374 3379200 2100
62260416 Phortox B Oct. 10, 2019, 12:01 p.m. OK GNU C++17 TESTS 45 468 0 2100
58557821 Legendary_27 B Aug. 11, 2019, 3:33 a.m. OK GNU C++17 TESTS 45 514 0 2100
1761856 nanikaka B June 3, 2012, 6:55 p.m. OK Java 6 TESTS 45 1090 43212800 2100
1775234 carber B June 10, 2012, 11:37 a.m. OK Java 6 TESTS 45 1140 43315200 2100
1757271 Petr B June 3, 2012, 4:17 p.m. OK Java 6 TESTS 45 1260 43110400 2100
1759855 piotr.kukla B June 3, 2012, 5:12 p.m. OK Java 6 TESTS 45 1310 43212800 2100
1755329 Egor B June 3, 2012, 3:49 p.m. OK Java 6 TESTS 45 1410 43110400 2100
1761344 Sergey.Bankevich B June 3, 2012, 5:59 p.m. OK Java 6 TESTS 45 1440 43417600 2100
1758764 sayuan B June 3, 2012, 4:46 p.m. OK Java 6 TESTS 45 1480 43110400 2100
1764188 AlexanderBolshakov B June 4, 2012, 2:19 p.m. OK Java 6 TESTS 45 1560 43110400 2100
2822599 ali.mashreghi B Dec. 24, 2012, 2:03 p.m. OK Java 6 TESTS 45 1578 102400 2100
1755816 uwi B June 3, 2012, 3:55 p.m. OK Java 6 TESTS 45 1750 43110400 2100
6569791 nickbuelich B May 8, 2014, 12:43 a.m. OK Java 7 TESTS 45 1014 0 2100
15727902 alibaba B Feb. 1, 2016, 9:06 a.m. OK Java 7 TESTS 45 1106 0 2100
1764588 bloops B June 4, 2012, 5:25 p.m. OK Java 7 TESTS 45 1250 44851200 2100
12550106 free.dom B Aug. 15, 2015, 4:23 p.m. OK Java 7 TESTS 45 1465 0 2100
1768291 mostafa_fahim B June 6, 2012, 9:10 p.m. OK Java 7 TESTS 45 1500 45158400 2100
1761810 yarrr B June 3, 2012, 6:47 p.m. OK Java 7 TESTS 45 1610 44851200 2100
1763814 littlepanda B June 4, 2012, 12:01 p.m. OK Java 7 TESTS 45 1800 45056000 2100
4384710 DoublePointer B Aug. 30, 2013, 11:30 p.m. OK Java 7 TESTS 45 1840 0 2100
1761110 yarrr B June 3, 2012, 5:49 p.m. OK Java 7 TESTS 45 1840 44851200 2100
1760122 mmaxio B June 3, 2012, 5:19 p.m. OK Java 7 TESTS 45 1840 44851200 2100
1759041 AlphaStream B June 3, 2012, 4:52 p.m. OK Mono C# TESTS 45 2420 13004800 2100
1761157 it4.kp B June 3, 2012, 5:50 p.m. OK Mono C# TESTS 45 2720 13619200 2100
7674716 915507430 B Sept. 3, 2014, 1:20 p.m. OK MS C++ TESTS 45 296 0 2100
1757934 DAle B June 3, 2012, 4:29 p.m. OK MS C++ TESTS 45 440 1433600 2100
1758680 Shef B June 3, 2012, 4:44 p.m. OK MS C++ TESTS 45 450 1433600 2100
1755179 maksay B June 3, 2012, 3:48 p.m. OK MS C++ TESTS 45 480 1433600 2100
1760404 ft.azadi B June 3, 2012, 5:25 p.m. OK MS C++ TESTS 45 500 1433600 2100
1756114 good_mood B June 3, 2012, 4 p.m. OK MS C++ TESTS 45 500 1433600 2100
1799879 sinesight B June 13, 2012, 9:10 a.m. OK MS C++ TESTS 45 520 1433600 2100
1762771 goo.gl_SsAhv B June 4, 2012, 5:11 a.m. OK MS C++ TESTS 45 520 1433600 2100
1768119 Tom. B June 6, 2012, 6:32 p.m. OK MS C++ TESTS 45 530 1433600 2100
1756720 witua B June 3, 2012, 4:09 p.m. OK MS C++ TESTS 45 560 1433600 2100

remove filters

Back to search problems