Codeforces Round 140 (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
226 Codeforces Round 140 (Div. 1) FINISHED False 7200 383322599 Sept. 24, 2012, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 967 ) D The table PROGRAMMING constructive algorithms greedy 2100

B"Harry Potter has a difficult homework. Given a rectangular table, consisting of n xe2 x80 x89 xc3 x97 xe2 x80 x89m cells. Each cell of the table contains the integer. Harry knows how to use two spells: the first spell change the sign of the integers in the selected row, the second -- in the selected column. Harry's task is to make non-negative the sum of the numbers in each row and each column using these spells. Alone, the boy can not cope. Help the young magician! The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89 m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of rows and the number of columns. Next n lines follow, each contains m integers: j-th integer in the i-th line is ai, xe2 x80 x89j (|ai, xe2 x80 x89j| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100), the number in the i-th row and j-th column of the table. The rows of the table numbered from 1 to n. The columns of the table numbered from 1 to m. In the first line print the number a -- the number of required applications of the first spell. Next print a space-separated integers -- the row numbers, you want to apply a spell. These row numbers must be distinct! In the second line print the number b -- the number of required applications of the second spell. Next print b space-separated integers -- the column numbers, you want to apply a spell. These column numbers must be distinct! If there are several solutions are allowed to print any of them."...

Tutorials

Codeforces Round #140 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
2299383 Oryshych D Oct. 4, 2012, 1:43 p.m. OK Delphi TESTS 95 31 0 2100
2253562 rais.fathin38 D Sept. 26, 2012, 3:57 p.m. OK Delphi TESTS 95 31 0 2100
2254110 Timur_Keks D Sept. 26, 2012, 6:47 p.m. OK Delphi TESTS 95 31 102400 2100
5916476 Scrat D Feb. 7, 2014, 12:19 p.m. OK FPC TESTS 95 30 102400 2100
2248418 vilcheuski D Sept. 25, 2012, 7:18 a.m. OK FPC TESTS 95 31 0 2100
2250524 Alex_2oo8 D Sept. 25, 2012, 3:34 p.m. OK FPC TESTS 95 31 0 2100
2265173 beckychow D Sept. 28, 2012, 7:26 a.m. OK FPC TESTS 95 31 0 2100
2382908 wxyz1234 D Oct. 18, 2012, 9:27 a.m. OK FPC TESTS 95 31 0 2100
2246113 scorpion D Sept. 24, 2012, 6:38 p.m. OK FPC TESTS 95 31 204800 2100
2254201 Electronick D Sept. 26, 2012, 7:21 p.m. OK FPC TESTS 95 31 4812800 2100
2243178 artyom.kazak D Sept. 24, 2012, 4:49 p.m. OK FPC TESTS 95 46 0 2100
2298552 con_nha_ngheo D Oct. 4, 2012, 9:47 a.m. OK FPC TESTS 95 46 204800 2100
2310191 vlad107 D Oct. 7, 2012, 7:58 a.m. OK FPC TESTS 95 46 9011200 2100
2245912 kawatea D Sept. 24, 2012, 6:31 p.m. OK GNU C TESTS 95 31 0 2100
2265390 coderbd D Sept. 28, 2012, 8:26 a.m. OK GNU C TESTS 95 218 0 2100
4134478 monajem D July 22, 2013, 10:06 a.m. OK GNU C++ TESTS 95 15 0 2100
3922842 ycid D June 20, 2013, 4:54 a.m. OK GNU C++ TESTS 95 15 0 2100
3914210 ShadowSong D June 18, 2013, 2:47 p.m. OK GNU C++ TESTS 95 15 0 2100
3600805 vjudge3 D April 22, 2013, 12:51 p.m. OK GNU C++ TESTS 95 15 0 2100
3474770 asadthehell D April 4, 2013, 9:18 p.m. OK GNU C++ TESTS 95 15 0 2100
3468959 data_h D April 3, 2013, 12:58 p.m. OK GNU C++ TESTS 95 15 0 2100
3410686 evima D March 27, 2013, 7:36 a.m. OK GNU C++ TESTS 95 15 0 2100
3404456 tmt514 D March 25, 2013, 1:34 p.m. OK GNU C++ TESTS 95 15 0 2100
3359350 Robert D March 20, 2013, 4:56 a.m. OK GNU C++ TESTS 95 15 0 2100
4052403 vjudge4 D July 11, 2013, 9:52 p.m. OK GNU C++ TESTS 95 15 102400 2100
3724025 kraskevich D May 15, 2013, 3:03 p.m. OK GNU C++0x TESTS 95 15 0 2100
6689807 Zuza D May 23, 2014, 10:26 p.m. OK GNU C++0x TESTS 95 30 102400 2100
7217428 aliasadiiii D July 24, 2014, 2:47 p.m. OK GNU C++0x TESTS 95 30 102400 2100
7662043 maxkvant D Sept. 1, 2014, 3:36 p.m. OK GNU C++0x TESTS 95 30 204800 2100
2245331 nk.karpov D Sept. 24, 2012, 5:24 p.m. OK GNU C++0x TESTS 95 31 307200 2100
2244564 watashi D Sept. 24, 2012, 5:13 p.m. OK GNU C++0x TESTS 95 31 4198400 2100
2247677 Archon.JK D Sept. 25, 2012, 2:26 a.m. OK GNU C++0x TESTS 95 46 0 2100
2861528 ArkChar D Dec. 31, 2012, 3:15 p.m. OK GNU C++0x TESTS 95 46 102400 2100
2239190 MinakoKojima D Sept. 24, 2012, 3:56 p.m. OK GNU C++0x TESTS 95 46 102400 2100
9767765 HandIeNeeded D Feb. 8, 2015, 3:41 a.m. OK GNU C++0x TESTS 95 60 102400 2100
45550280 vjudge4 D Nov. 11, 2018, 4:32 a.m. OK GNU C11 TESTS 95 62 0 2100
45558341 vjudge5 D Nov. 11, 2018, 10:03 a.m. OK GNU C11 TESTS 95 62 0 2100
14429007 vjudge1 D Nov. 23, 2015, 3:33 p.m. OK GNU C++11 TESTS 95 30 0 2100
22005544 BBuf D Nov. 3, 2016, 3:43 a.m. OK GNU C++11 TESTS 95 30 0 2100
19153800 Serious-Man D July 15, 2016, 12:58 p.m. OK GNU C++11 TESTS 95 30 102400 2100
27470639 noor148 D May 31, 2017, 4:01 p.m. OK GNU C++11 TESTS 95 30 102400 2100
27301762 2360 D May 23, 2017, 1:02 p.m. OK GNU C++11 TESTS 95 30 102400 2100
21889563 Noureldin D Oct. 30, 2016, 9:24 a.m. OK GNU C++11 TESTS 95 30 102400 2100
19152899 DeLus1oN D July 15, 2016, 12:20 p.m. OK GNU C++11 TESTS 95 30 102400 2100
18511532 gvaibhav22 D June 16, 2016, 4:03 a.m. OK GNU C++11 TESTS 95 30 102400 2100
15621453 lawrenceli D Jan. 28, 2016, 1:15 a.m. OK GNU C++11 TESTS 95 30 102400 2100
15578801 Qoogle D Jan. 25, 2016, 5:17 p.m. OK GNU C++11 TESTS 95 30 102400 2100
30819986 Svyat D Sept. 29, 2017, 4:20 a.m. OK GNU C++14 TESTS 95 30 102400 2100
27545438 VastoLorde95 D June 3, 2017, 1:05 p.m. OK GNU C++14 TESTS 95 30 102400 2100
29825372 Egor.Lifar D Aug. 27, 2017, 11:31 a.m. OK GNU C++14 TESTS 95 30 102400 2100
30810949 LiChenKoh D Sept. 28, 2017, 4:48 p.m. OK GNU C++14 TESTS 95 30 102400 2100
30955155 born2rule D Oct. 3, 2017, 12:39 a.m. OK GNU C++14 TESTS 95 30 102400 2100
22840403 OMRailgun D Dec. 9, 2016, 5:49 p.m. OK GNU C++14 TESTS 95 30 102400 2100
28786396 comfi D July 22, 2017, 8:17 p.m. OK GNU C++14 TESTS 95 30 1945600 2100
33902691 compiler_101 D Jan. 4, 2018, 12:14 p.m. OK GNU C++14 TESTS 95 30 1945600 2100
34345170 akashdeep D Jan. 20, 2018, 8:44 a.m. OK GNU C++14 TESTS 95 30 1945600 2100
34355149 Artemis_Fowl D Jan. 20, 2018, 2:03 p.m. OK GNU C++14 TESTS 95 30 1945600 2100
66234507 vjudge1 D Dec. 3, 2019, 3:38 p.m. OK GNU C++17 TESTS 95 60 102400 2100
58557930 rapel D Aug. 11, 2019, 3:38 a.m. OK GNU C++17 TESTS 95 60 102400 2100
37875031 smu201111192 D May 4, 2018, 4:53 a.m. OK GNU C++17 TESTS 95 60 3379200 2100
49849437 ruo D Feb. 13, 2019, 2:03 a.m. OK GNU C++17 TESTS 95 62 0 2100
45998086 Hiasat D Nov. 20, 2018, 1:16 p.m. OK GNU C++17 TESTS 95 62 0 2100
44925917 SendThemToHell D Oct. 26, 2018, 8:07 p.m. OK GNU C++17 TESTS 95 62 0 2100
50601558 ivan100sic D Feb. 28, 2019, 12:55 p.m. OK GNU C++17 TESTS 95 62 0 2100
62256518 Phortox D Oct. 10, 2019, 10:58 a.m. OK GNU C++17 TESTS 95 62 0 2100
67004436 tnakao D Dec. 16, 2019, 7:19 a.m. OK GNU C++17 TESTS 95 62 102400 2100
67369582 lungualex00 D Dec. 21, 2019, 1:23 p.m. OK GNU C++17 TESTS 95 62 102400 2100
2252366 DimsFromDergachy D Sept. 26, 2012, 9:08 a.m. OK Haskell TESTS 95 109 1024000 2100
2245178 uwi D Sept. 24, 2012, 5:22 p.m. OK Java 6 TESTS 95 93 0 2100
2270647 sunnywkn D Sept. 30, 2012, 8:52 a.m. OK Java 6 TESTS 95 109 0 2100
2272003 Kornacker D Sept. 30, 2012, 10:59 p.m. OK Java 6 TESTS 95 109 0 2100
2240665 Egor D Sept. 24, 2012, 4:14 p.m. OK Java 6 TESTS 95 109 0 2100
2243575 VArtem D Sept. 24, 2012, 4:56 p.m. OK Java 6 TESTS 95 109 0 2100
2248551 mashinist D Sept. 25, 2012, 8:06 a.m. OK Java 6 TESTS 95 109 0 2100
2251500 tsun D Sept. 26, 2012, 1:06 a.m. OK Java 6 TESTS 95 109 102400 2100
2373468 hama-du D Oct. 16, 2012, 1:02 p.m. OK Java 6 TESTS 95 109 102400 2100
2242201 Hadi_Asiaie D Sept. 24, 2012, 4:34 p.m. OK Java 6 TESTS 95 125 0 2100
2270688 nguyenhaduy2003 D Sept. 30, 2012, 9:20 a.m. OK Java 6 TESTS 95 171 102400 2100
2248359 nitegazer D Sept. 25, 2012, 6:57 a.m. OK Java 7 TESTS 95 93 0 2100
2516409 PlayLikeNeverB4 D Nov. 6, 2012, 8:26 p.m. OK Java 7 TESTS 95 109 0 2100
2298244 trunghieu11 D Oct. 4, 2012, 8:10 a.m. OK Java 7 TESTS 95 109 0 2100
2243697 yaro D Sept. 24, 2012, 4:58 p.m. OK Java 7 TESTS 95 109 0 2100
2256303 jjd5 D Sept. 27, 2012, 3:09 p.m. OK Java 7 TESTS 95 109 102400 2100
2248979 alexey.enkov D Sept. 25, 2012, 10:08 a.m. OK Java 7 TESTS 95 109 102400 2100
2246597 GR1n D Sept. 24, 2012, 7:05 p.m. OK Java 7 TESTS 95 109 102400 2100
2242728 oimaster D Sept. 24, 2012, 4:42 p.m. OK Java 7 TESTS 95 109 102400 2100
2246035 S.Yesipenko D Sept. 24, 2012, 6:35 p.m. OK Java 7 TESTS 95 125 0 2100
2246905 sas4eka D Sept. 24, 2012, 7:45 p.m. OK Java 7 TESTS 95 125 409600 2100
12035355 santa_calus D July 14, 2015, 2:36 a.m. OK Java 8 TESTS 95 248 0 2100
39496846 flyman3046 D June 21, 2018, 5:52 p.m. OK Java 8 TESTS 95 280 0 2100
40051539 Scut82 D July 7, 2018, 5:11 a.m. OK Java 8 TESTS 95 404 0 2100
2339362 mylifefordota D Oct. 11, 2012, 2:11 p.m. OK Mono C# TESTS 95 125 3584000 2100
2245404 it4.kp D Sept. 24, 2012, 5:25 p.m. OK Mono C# TESTS 95 843 2048000 2100
3600360 vjudge2 D April 22, 2013, 10:40 a.m. OK MS C++ TESTS 95 15 0 2100
3424170 RAD D March 30, 2013, 6:51 p.m. OK MS C++ TESTS 95 15 4915200 2100
17804129 vjudge1 D May 8, 2016, 7:31 a.m. OK MS C++ TESTS 95 30 2252800 2100
6836028 AleksanderBalobanov D June 8, 2014, 8:25 a.m. OK MS C++ TESTS 95 30 3993600 2100
2264127 macs D Sept. 28, 2012, 12:15 a.m. OK MS C++ TESTS 95 31 0 2100
2252983 acrux D Sept. 26, 2012, 1:04 p.m. OK MS C++ TESTS 95 31 0 2100
2246340 caustique D Sept. 24, 2012, 6:46 p.m. OK MS C++ TESTS 95 31 0 2100
2336206 LovelyPenguin D Oct. 10, 2012, 3:35 p.m. OK MS C++ TESTS 95 31 0 2100
2245223 mugurelionut D Sept. 24, 2012, 5:23 p.m. OK MS C++ TESTS 95 31 0 2100
2272580 Myungwoo D Oct. 1, 2012, 9:04 a.m. OK MS C++ TESTS 95 31 0 2100
66231728 vjudge1 D Dec. 3, 2019, 2:40 p.m. OK MS C++ 2017 TESTS 95 92 307200 2100
2556167 lyrics D Nov. 14, 2012, 10:05 a.m. OK Python 2 TESTS 95 78 102400 2100
2249338 dut200901102 D Sept. 25, 2012, 11:33 a.m. OK Python 2 TESTS 95 93 102400 2100
3349812 july D March 18, 2013, 9:10 a.m. OK Ruby TESTS 95 281 102400 2100

remove filters

Back to search problems