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 |
---|---|---|---|---|---|---|
348 | Codeforces Round 202 (Div. 1) | FINISHED | False | 7200 | 356884163 | Sept. 27, 2013, 3:30 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2244 ) | C | Subset Sums | PROGRAMMING | brute force data structures | 2600 |
B'You are given an array a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an and m sets S1, xe2 x80 x89S2, xe2 x80 x89..., xe2 x80 x89Sm of indices of elements of this array. Let 's denote Sk xe2 x80 x89= xe2 x80 x89{Sk, xe2 x80 x89i} (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|Sk|). In other words, Sk, xe2 x80 x89i is some element from set Sk. In this problem you have to answer q queries of the two types: After each first type query print the required sum. The first line contains integers n, xe2 x80 x89m, xe2 x80 x89q (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m, xe2 x80 x89q xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105). The second line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (|ai| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89108) -- elements of array a. Each of the following m lines describes one set of indices. The k-th line first contains a positive integer, representing the number of elements in set (|Sk|), then follow |Sk| distinct integers Sk, xe2 x80 x891, xe2 x80 x89Sk, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89Sk, xe2 x80 x89|Sk| (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89Sk, xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- elements of set Sk. The next q lines contain queries. Each query looks like either "? k" or "+ k x" and sits on a single line. For all queries the following limits are held: 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m, |x| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89108. The queries are given in order they need to be answered. It is guaranteed that the sum of sizes of all sets Sk doesn 't exceed 105. After each first type query print the required sum on a single line. Please, do not write 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.'... |
Editorial for Codeforces Round #202 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
4596728 | laoriu | C | Sept. 28, 2013, 10:03 a.m. | OK | FPC | TESTS | 62 | 780 | 95744000 | 2600 | |
5609514 | zhzq123 | C | Jan. 3, 2014, 9:19 a.m. | OK | FPC | TESTS | 62 | 1092 | 170803200 | 2600 | |
5130877 | pal3 | C | Nov. 17, 2013, 12:20 p.m. | OK | FPC | TESTS | 62 | 1154 | 164454400 | 2600 | |
5610253 | zhzq123 | C | Jan. 3, 2014, 12:51 p.m. | OK | FPC | TESTS | 62 | 1184 | 169984000 | 2600 | |
4613870 | Nik_Storm_2010 | C | Sept. 30, 2013, 4:27 p.m. | OK | FPC | TESTS | 62 | 1216 | 167321600 | 2600 | |
16280113 | ligerre | C | Feb. 22, 2016, 4:11 p.m. | OK | FPC | TESTS | 62 | 1434 | 167219200 | 2600 | |
4605270 | FancyCoder | C | Sept. 29, 2013, 12:56 p.m. | OK | GNU C++ | TESTS | 62 | 186 | 6451200 | 2600 | |
14003360 | immortalCO | C | Nov. 1, 2015, 8:35 a.m. | OK | GNU C++ | TESTS | 62 | 186 | 155852800 | 2600 | |
4928049 | Skeas | C | Oct. 29, 2013, 11:14 a.m. | OK | GNU C++ | TESTS | 62 | 187 | 8601600 | 2600 | |
4919609 | Logsha | C | Oct. 28, 2013, 1:11 p.m. | OK | GNU C++ | TESTS | 62 | 187 | 129945600 | 2600 | |
4919000 | Logsha | C | Oct. 28, 2013, 11:09 a.m. | OK | GNU C++ | TESTS | 62 | 187 | 206131200 | 2600 | |
40989519 | ReaLNero1 | C | July 30, 2018, 11 p.m. | OK | GNU C++ | TESTS | 62 | 248 | 6348800 | 2600 | |
25411956 | Minology | C | March 11, 2017, 4:26 p.m. | OK | GNU C++ | TESTS | 62 | 312 | 10547200 | 2600 | |
25411890 | Minology | C | March 11, 2017, 4:24 p.m. | OK | GNU C++ | TESTS | 62 | 312 | 10649600 | 2600 | |
4617223 | niquefa_diego | C | Oct. 1, 2013, 4:27 a.m. | OK | GNU C++ | TESTS | 62 | 312 | 168038400 | 2600 | |
10429738 | Memory120 | C | March 25, 2015, 7:30 a.m. | OK | GNU C++ | TESTS | 62 | 340 | 143462400 | 2600 | |
8862156 | Marcin_smu | C | Nov. 26, 2014, 5 p.m. | OK | GNU C++0x | TESTS | 62 | 310 | 9318400 | 2600 | |
8862085 | Marcin_smu | C | Nov. 26, 2014, 4:54 p.m. | OK | GNU C++0x | TESTS | 62 | 310 | 9318400 | 2600 | |
8862056 | Marcin_smu | C | Nov. 26, 2014, 4:51 p.m. | OK | GNU C++0x | TESTS | 62 | 310 | 9318400 | 2600 | |
8862169 | Marcin_smu | C | Nov. 26, 2014, 5 p.m. | OK | GNU C++0x | TESTS | 62 | 312 | 9318400 | 2600 | |
8862123 | Marcin_smu | C | Nov. 26, 2014, 4:57 p.m. | OK | GNU C++0x | TESTS | 62 | 312 | 9318400 | 2600 | |
8862058 | Marcin_smu | C | Nov. 26, 2014, 4:52 p.m. | OK | GNU C++0x | TESTS | 62 | 312 | 9318400 | 2600 | |
8862144 | Marcin_smu | C | Nov. 26, 2014, 4:58 p.m. | OK | GNU C++0x | TESTS | 62 | 340 | 9318400 | 2600 | |
8862206 | Marcin_smu | C | Nov. 26, 2014, 5:04 p.m. | OK | GNU C++0x | TESTS | 62 | 342 | 9318400 | 2600 | |
8862194 | Marcin_smu | C | Nov. 26, 2014, 5:03 p.m. | OK | GNU C++0x | TESTS | 62 | 342 | 9318400 | 2600 | |
8862109 | Marcin_smu | C | Nov. 26, 2014, 4:56 p.m. | OK | GNU C++0x | TESTS | 62 | 342 | 9318400 | 2600 | |
51018966 | PHenning | C | March 8, 2019, 10:41 a.m. | OK | GNU C++11 | TESTS | 62 | 216 | 15155200 | 2600 | |
51065360 | PHenning | C | March 9, 2019, 5:36 a.m. | OK | GNU C++11 | TESTS | 62 | 248 | 17100800 | 2600 | |
51280334 | Umi | C | March 14, 2019, 3:08 a.m. | OK | GNU C++11 | TESTS | 62 | 280 | 131584000 | 2600 | |
12398798 | syc1999 | C | Aug. 7, 2015, 7:49 a.m. | OK | GNU C++11 | TESTS | 62 | 280 | 249753600 | 2600 | |
31101095 | Amphetamine | C | Oct. 7, 2017, 5:57 a.m. | OK | GNU C++11 | TESTS | 62 | 310 | 146534400 | 2600 | |
12602892 | huantwofat | C | Aug. 19, 2015, 12:30 p.m. | OK | GNU C++11 | TESTS | 62 | 342 | 9113600 | 2600 | |
25220074 | lawyerphx | C | March 4, 2017, 4:04 p.m. | OK | GNU C++11 | TESTS | 62 | 342 | 10649600 | 2600 | |
64786459 | Gnoud__ | C | Nov. 13, 2019, 9:18 a.m. | OK | GNU C++11 | TESTS | 62 | 342 | 92057600 | 2600 | |
56865454 | makacha | C | July 12, 2019, 2:45 a.m. | OK | GNU C++11 | TESTS | 62 | 342 | 136089600 | 2600 | |
45688818 | Shayan.Kashefi_A | C | Nov. 13, 2018, 7:42 p.m. | OK | GNU C++11 | TESTS | 62 | 342 | 148172800 | 2600 | |
28865935 | LiChenKoh | C | July 25, 2017, 5:10 a.m. | OK | GNU C++14 | TESTS | 62 | 312 | 137420800 | 2600 | |
58486498 | 14_2 | C | Aug. 9, 2019, 7:52 a.m. | OK | GNU C++14 | TESTS | 62 | 374 | 138342400 | 2600 | |
29727463 | Dalgerok | C | Aug. 24, 2017, 9:35 a.m. | OK | GNU C++14 | TESTS | 62 | 374 | 164556800 | 2600 | |
32491786 | Deathly_Hallows | C | Nov. 20, 2017, 7:17 a.m. | OK | GNU C++14 | TESTS | 62 | 404 | 6656000 | 2600 | |
32125504 | vjudge1 | C | Nov. 7, 2017, 4:35 p.m. | OK | GNU C++14 | TESTS | 62 | 404 | 10137600 | 2600 | |
22673619 | Mohammad.Sj | C | Dec. 3, 2016, 9:58 a.m. | OK | GNU C++14 | TESTS | 62 | 404 | 121344000 | 2600 | |
64786878 | MakeSPGreatAgain | C | Nov. 13, 2019, 9:28 a.m. | OK | GNU C++14 | TESTS | 62 | 404 | 132812800 | 2600 | |
36027287 | Fischer | C | March 6, 2018, 8:12 p.m. | OK | GNU C++14 | TESTS | 62 | 404 | 134041600 | 2600 | |
51459615 | KATATONIA | C | March 18, 2019, 6:50 p.m. | OK | GNU C++14 | TESTS | 62 | 404 | 135270400 | 2600 | |
23636991 | PedramAghazadeh | C | Jan. 7, 2017, 9:08 p.m. | OK | GNU C++14 | TESTS | 62 | 404 | 135680000 | 2600 | |
44749985 | idgaf | C | Oct. 23, 2018, 7:09 p.m. | OK | GNU C++17 | TESTS | 62 | 342 | 8601600 | 2600 | |
58198396 | neal | C | Aug. 3, 2019, 2:27 a.m. | OK | GNU C++17 | TESTS | 62 | 342 | 87552000 | 2600 | |
59232275 | Tourist_Sa_Dec | C | Aug. 21, 2019, 3:59 p.m. | OK | GNU C++17 | TESTS | 62 | 372 | 30003200 | 2600 | |
55433908 | Lawali | C | June 11, 2019, 12:56 p.m. | OK | GNU C++17 | TESTS | 62 | 374 | 9932800 | 2600 | |
64786733 | I_love_Inori_Yuzuriha | C | Nov. 13, 2019, 9:24 a.m. | OK | GNU C++17 | TESTS | 62 | 374 | 12902400 | 2600 | |
67626975 | Bielik | C | Dec. 25, 2019, 10:47 p.m. | OK | GNU C++17 | TESTS | 62 | 374 | 137625600 | 2600 | |
58424451 | 89264270823 | C | Aug. 7, 2019, 9:04 a.m. | OK | GNU C++17 | TESTS | 62 | 404 | 16896000 | 2600 | |
51328636 | modestas_ | C | March 15, 2019, 11:09 a.m. | OK | GNU C++17 | TESTS | 62 | 404 | 26112000 | 2600 | |
42350187 | NePbo.exe | C | Sept. 2, 2018, 4:21 a.m. | OK | GNU C++17 | TESTS | 62 | 434 | 132812800 | 2600 | |
40070443 | erfanesm | C | July 7, 2018, 9:10 p.m. | OK | GNU C++17 | TESTS | 62 | 434 | 264499200 | 2600 | |
5091493 | myIdols-TimAndArul | C | Nov. 13, 2013, 5:27 p.m. | OK | Java 6 | TESTS | 62 | 2900 | 5836800 | 2600 | |
4589661 | yarrr | C | Sept. 27, 2013, 6:10 p.m. | OK | Java 7 | TESTS | 62 | 966 | 8704000 | 2600 | |
4597160 | ftiasch | C | Sept. 28, 2013, 10:54 a.m. | OK | Java 7 | TESTS | 62 | 998 | 42086400 | 2600 | |
4782711 | mostafa_fahim | C | Oct. 14, 2013, 9:45 a.m. | OK | Java 7 | TESTS | 62 | 1216 | 112640000 | 2600 | |
4938054 | uwi | C | Oct. 30, 2013, 7:15 p.m. | OK | Java 7 | TESTS | 62 | 1310 | 138240000 | 2600 | |
4585366 | mmaxio | C | Sept. 27, 2013, 4:52 p.m. | OK | Java 7 | TESTS | 62 | 1496 | 63078400 | 2600 | |
15495356 | SEFI2 | C | Jan. 22, 2016, 9:01 a.m. | OK | Java 7 | TESTS | 62 | 1840 | 129740800 | 2600 | |
4699198 | gcd_fuck | C | Oct. 7, 2013, 5:50 a.m. | OK | Java 7 | TESTS | 62 | 1902 | 207155200 | 2600 | |
4699179 | gcd_fuck | C | Oct. 7, 2013, 5:43 a.m. | OK | Java 7 | TESTS | 62 | 2120 | 86425600 | 2600 | |
4699177 | gcd_fuck | C | Oct. 7, 2013, 5:42 a.m. | OK | Java 7 | TESTS | 62 | 2870 | 31129600 | 2600 | |
10122303 | n1tz53 | C | March 2, 2015, 4:28 p.m. | OK | Java 8 | TESTS | 62 | 2026 | 67072000 | 2600 | |
20078217 | alibaba | C | Aug. 23, 2016, 6:04 a.m. | OK | Java 8 | TESTS | 62 | 2806 | 64409600 | 2600 | |
13416472 | Dadaxon | C | Oct. 5, 2015, 1:15 p.m. | OK | MS C++ | TESTS | 62 | 278 | 137625600 | 2600 | |
13416408 | Dadaxon | C | Oct. 5, 2015, 1:12 p.m. | OK | MS C++ | TESTS | 62 | 280 | 111616000 | 2600 | |
4585699 | Seyaua | C | Sept. 27, 2013, 4:55 p.m. | OK | MS C++ | TESTS | 62 | 342 | 152166400 | 2600 | |
4585572 | Merkurev | C | Sept. 27, 2013, 4:54 p.m. | OK | MS C++ | TESTS | 62 | 374 | 135372800 | 2600 | |
4591933 | Monyura | C | Sept. 27, 2013, 8:40 p.m. | OK | MS C++ | TESTS | 62 | 404 | 14848000 | 2600 | |
18836079 | Filyan | C | July 1, 2016, 7:18 a.m. | OK | MS C++ | TESTS | 62 | 404 | 129536000 | 2600 | |
4595321 | stgatilov | C | Sept. 28, 2013, 7:12 a.m. | OK | MS C++ | TESTS | 62 | 404 | 171929600 | 2600 | |
4617437 | lzsb | C | Oct. 1, 2013, 5:30 a.m. | OK | MS C++ | TESTS | 62 | 468 | 19558400 | 2600 | |
7691075 | adream | C | Sept. 6, 2014, 1:45 a.m. | OK | MS C++ | TESTS | 62 | 498 | 140697600 | 2600 | |
5784614 | AleksanderBalobanov | C | Jan. 24, 2014, 11:57 a.m. | OK | MS C++ | TESTS | 62 | 530 | 215244800 | 2600 | |
59225965 | vjudge1 | C | Aug. 21, 2019, 1:46 p.m. | OK | MS C++ 2017 | TESTS | 62 | 684 | 179404800 | 2600 | |
4607278 | limed | C | Sept. 29, 2013, 6:27 p.m. | OK | Scala | TESTS | 62 | 2464 | 36249600 | 2600 | |
4607295 | limed | C | Sept. 29, 2013, 6:29 p.m. | OK | Scala | TESTS | 62 | 2900 | 34713600 | 2600 |
Back to search problems