Codeforces Round 501 (Div. 3)

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
1015 Codeforces Round 501 (Div. 3) FINISHED False 7200 198775499 July 31, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5875 ) E1 Stars Drawing (Easy Edition) PROGRAMMING brute force dp greedy 1700

B'A star is a figure of the following type: an asterisk character '* ' in the center of the figure and four rays (to the left, right, top, bottom) of the same positive length. The size of a star is the length of its rays. The size of a star must be a positive number (i.e. rays of length 0 are not allowed). Let 's consider empty cells are denoted by '. ', then the following figures are stars: You are given a rectangular grid of size n x m consisting only of asterisks '* ' and periods (dots) '. '. Rows are numbered from 1 to n , columns are numbered from 1 to m . Your task is to draw this grid using any number of stars or find out that it is impossible. Stars can intersect, overlap or even coincide with each other. The number of stars in the output can 't exceed n cdot m . Each star should be completely inside the grid. You can use stars of same and arbitrary sizes. In this problem, you do not need to minimize the number of stars. Just find any way to draw the given grid with at most n cdot m stars. The first line of the input contains two integers n and m ( 3 <= n, m <= 100 ) -- the sizes of the given grid. The next n lines contains m characters each, the i -th line describes the i -th row of the grid. It is guaranteed that grid consists of characters '* ' and '. ' only. If it is impossible to draw the given grid using stars only, print "-1". Otherwise in the first line print one integer k ( 0 <= k <= n cdot m ) -- the number of stars needed to draw the given grid. The next k lines should contain three integers each -- x_j , y_j and s_j , where x_j is the row index of the central star character, y_j is the column index of the central star character and s_j is the size of the star. Each star should be completely inside the grid. In the first example the output is also correct. '...

Tutorials

60949

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42902508 selya E1 Sept. 15, 2018, 8:10 p.m. OK Clang++17 Diagnostics TESTS 37 249 102400 1700
41541984 rr_ E1 Aug. 13, 2018, 12:59 a.m. OK D TESTS 37 31 4198400 1700
41511316 nbdyn E1 Aug. 12, 2018, 2:28 a.m. OK GNU C TESTS 37 31 102400 1700
41460479 nbdyn E1 Aug. 11, 2018, 8:24 a.m. OK GNU C TESTS 37 31 102400 1700
41460457 nbdyn E1 Aug. 11, 2018, 8:23 a.m. OK GNU C TESTS 37 31 204800 1700
41213555 RenKai_Z E1 Aug. 4, 2018, 11:55 a.m. OK GNU C TESTS 37 31 204800 1700
41510862 nbdyn E1 Aug. 12, 2018, 2:07 a.m. OK GNU C TESTS 37 31 409600 1700
41459760 nbdyn E1 Aug. 11, 2018, 8:07 a.m. OK GNU C TESTS 37 31 512000 1700
41573540 stdio2016 E1 Aug. 14, 2018, 1:55 a.m. OK GNU C TESTS 37 31 9011200 1700
41454039 CCUT20162313 E1 Aug. 11, 2018, 5:30 a.m. OK GNU C++ TESTS 37 15 204800 1700
41237870 Scut82 E1 Aug. 5, 2018, 8:20 a.m. OK GNU C++ TESTS 37 30 512000 1700
41677279 veilman E1 Aug. 17, 2018, 8:45 a.m. OK GNU C++ TESTS 37 30 37376000 1700
41623270 vjudge5 E1 Aug. 15, 2018, 1:01 p.m. OK GNU C++ TESTS 37 31 0 1700
41279337 utsav02 E1 Aug. 6, 2018, 3:10 p.m. OK GNU C++ TESTS 37 31 102400 1700
41258728 Scut82 E1 Aug. 6, 2018, 12:31 a.m. OK GNU C++ TESTS 37 31 102400 1700
41139622 vjudge4 E1 Aug. 3, 2018, 1:41 a.m. OK GNU C++ TESTS 37 31 102400 1700
42021107 Even_Bao E1 Aug. 24, 2018, 9:14 a.m. OK GNU C++ TESTS 37 31 204800 1700
41218685 singh E1 Aug. 4, 2018, 2:20 p.m. OK GNU C++ TESTS 37 31 204800 1700
41195507 AMnu E1 Aug. 4, 2018, 12:29 a.m. OK GNU C++ TESTS 37 31 204800 1700
41649476 Vitailty E1 Aug. 16, 2018, 10:54 a.m. OK GNU C++11 TESTS 37 15 512000 1700
44171315 vjudge3 E1 Oct. 12, 2018, 6:05 a.m. OK GNU C++11 TESTS 37 30 204800 1700
41558761 binsjl E1 Aug. 13, 2018, 1 p.m. OK GNU C++11 TESTS 37 30 204800 1700
69946804 vjudge3 E1 Feb. 1, 2020, 7:49 a.m. OK GNU C++11 TESTS 37 30 409600 1700
41121104 fawx E1 Aug. 2, 2018, noon OK GNU C++11 TESTS 37 30 409600 1700
41091489 sonu628 E1 Aug. 1, 2018, 4:54 p.m. OK GNU C++11 TESTS 37 30 8601600 1700
41425380 DragoonKiller E1 Aug. 10, 2018, 9:01 a.m. OK GNU C++11 TESTS 37 30 15769600 1700
41100983 wanxfinger E1 Aug. 2, 2018, 12:58 a.m. OK GNU C++11 TESTS 37 30 144588800 1700
44072435 vjudge3 E1 Oct. 10, 2018, 12:02 p.m. OK GNU C++11 TESTS 37 31 0 1700
44070829 vjudge5 E1 Oct. 10, 2018, 11:32 a.m. OK GNU C++11 TESTS 37 31 0 1700
41646886 -Miracle- E1 Aug. 16, 2018, 9:09 a.m. OK GNU C++14 TESTS 37 15 409600 1700
41247894 exe E1 Aug. 5, 2018, 2:13 p.m. OK GNU C++14 TESTS 37 15 409600 1700
54838479 themechanicalcoder E1 May 30, 2019, 11:49 a.m. OK GNU C++14 TESTS 37 15 512000 1700
47879349 rlj1202 E1 Jan. 3, 2019, 5:22 p.m. OK GNU C++14 TESTS 37 15 512000 1700
42322266 pe4kin E1 Aug. 31, 2018, 11:27 p.m. OK GNU C++14 TESTS 37 15 921600 1700
45585828 euzmin E1 Nov. 12, 2018, 8:40 a.m. OK GNU C++14 TESTS 37 15 25497600 1700
41257419 TediDinuta E1 Aug. 5, 2018, 9:59 p.m. OK GNU C++14 TESTS 37 15 43622400 1700
41467056 HipHop E1 Aug. 11, 2018, 11:36 a.m. OK GNU C++14 TESTS 37 30 0 1700
42218381 regeshark E1 Aug. 28, 2018, 6:39 p.m. OK GNU C++14 TESTS 37 30 102400 1700
42728369 ndhuy E1 Sept. 10, 2018, 9:38 a.m. OK GNU C++14 TESTS 37 30 204800 1700
56537767 vjudge5 E1 July 5, 2019, 2:31 a.m. OK GNU C++17 TESTS 37 15 204800 1700
56056808 bugdog E1 June 26, 2019, 12:58 a.m. OK GNU C++17 TESTS 37 15 204800 1700
45906968 vjudge3 E1 Nov. 18, 2018, 8:57 a.m. OK GNU C++17 TESTS 37 15 512000 1700
55683023 PraneyR E1 June 17, 2019, 2:02 p.m. OK GNU C++17 TESTS 37 15 819200 1700
41507130 nitro007 E1 Aug. 11, 2018, 9:35 p.m. OK GNU C++17 TESTS 37 15 819200 1700
54236987 vjudge3 E1 May 16, 2019, 11:15 a.m. OK GNU C++17 TESTS 37 15 1228800 1700
47876617 spectaclehong E1 Jan. 3, 2019, 3:47 p.m. OK GNU C++17 TESTS 37 15 17920000 1700
51135686 Lucina E1 March 10, 2019, 4 p.m. OK GNU C++17 TESTS 37 15 21504000 1700
49495918 happy_ E1 Feb. 5, 2019, 12:50 p.m. OK GNU C++17 TESTS 37 15 30003200 1700
54998187 hbi1998 E1 June 3, 2019, 1:59 a.m. OK GNU C++17 TESTS 37 30 307200 1700
41529680 tusupov E1 Aug. 12, 2018, 1:50 p.m. OK Go TESTS 37 31 1228800 1700
41736152 synapse E1 Aug. 18, 2018, 2:32 a.m. OK Go TESTS 37 46 18022400 1700
42093314 Marii E1 Aug. 25, 2018, 2:32 p.m. OK Go TESTS 37 46 30105600 1700
41117807 haskell_brooks_curry E1 Aug. 2, 2018, 10:05 a.m. OK Haskell TESTS 37 1965 80076800 1700
45994001 Maaddy E1 Nov. 20, 2018, 11:29 a.m. OK Java 8 TESTS 37 109 0 1700
45285211 mona_hashem E1 Nov. 4, 2018, 4:11 p.m. OK Java 8 TESTS 37 109 0 1700
66842289 MaxHeap E1 Dec. 14, 2019, 11:30 a.m. OK Java 8 TESTS 37 124 0 1700
69823912 GiantTornado E1 Jan. 30, 2020, 8:41 a.m. OK Java 8 TESTS 37 124 0 1700
67041260 Blastman E1 Dec. 16, 2019, 7:24 p.m. OK Java 8 TESTS 37 124 0 1700
66203589 Agnimandur E1 Dec. 2, 2019, 11:44 p.m. OK Java 8 TESTS 37 124 0 1700
62667737 saurabhs1206 E1 Oct. 16, 2019, 8:29 a.m. OK Java 8 TESTS 37 124 0 1700
59422333 MohammadHossam E1 Aug. 24, 2019, 10:06 p.m. OK Java 8 TESTS 37 124 0 1700
59395050 chojh1222 E1 Aug. 24, 2019, 9:59 a.m. OK Java 8 TESTS 37 124 0 1700
58249636 AhmedZ E1 Aug. 4, 2019, 7:14 a.m. OK Java 8 TESTS 37 124 0 1700
41151393 Mickey-snow E1 Aug. 3, 2018, 9:03 a.m. OK Mono C# TESTS 37 61 2150400 1700
41663625 Mosyagin E1 Aug. 16, 2018, 8:06 p.m. OK Mono C# TESTS 37 62 1740800 1700
41192601 jainchethan87 E1 Aug. 3, 2018, 8:32 p.m. OK Mono C# TESTS 37 77 5632000 1700
44746159 45den450 E1 Oct. 23, 2018, 5 p.m. OK Mono C# TESTS 37 171 4198400 1700
44757601 NEvOl E1 Oct. 24, 2018, 4:26 a.m. OK Mono C# TESTS 37 186 6656000 1700
41132988 sam.ninja E1 Aug. 2, 2018, 6:38 p.m. OK Mono C# TESTS 37 265 6963200 1700
44078287 vjudge5 E1 Oct. 10, 2018, 1:56 p.m. OK MS C++ TESTS 37 30 409600 1700
41217286 vjudge4 E1 Aug. 4, 2018, 1:38 p.m. OK MS C++ TESTS 37 30 409600 1700
41217185 ys1468362286 E1 Aug. 4, 2018, 1:34 p.m. OK MS C++ TESTS 37 30 409600 1700
41446330 Fishers E1 Aug. 11, 2018, 12:39 a.m. OK MS C++ TESTS 37 30 20684800 1700
51473902 vjudge2 E1 March 19, 2019, 8:17 a.m. OK MS C++ TESTS 37 31 102400 1700
44070823 vjudge2 E1 Oct. 10, 2018, 11:32 a.m. OK MS C++ TESTS 37 31 204800 1700
46102920 Houbunsha E1 Nov. 23, 2018, 7:13 a.m. OK MS C++ TESTS 37 31 307200 1700
41404258 scorpiowf E1 Aug. 9, 2018, 3:37 p.m. OK MS C++ TESTS 37 31 409600 1700
44175894 vjudge4 E1 Oct. 12, 2018, 8:51 a.m. OK MS C++ TESTS 37 31 409600 1700
51419739 vjudge3 E1 March 17, 2019, 3:53 p.m. OK MS C++ TESTS 37 31 512000 1700
55523238 hwangganzi E1 June 13, 2019, 9:44 a.m. OK MS C++ 2017 TESTS 37 31 204800 1700
58404085 yorky E1 Aug. 6, 2019, 7:23 p.m. OK MS C++ 2017 TESTS 37 31 716800 1700
55823677 index_ E1 June 20, 2019, 9:46 a.m. OK MS C++ 2017 TESTS 37 31 716800 1700
51474327 Xun_ E1 March 19, 2019, 8:29 a.m. OK MS C++ 2017 TESTS 37 46 102400 1700
54981361 Skeef79 E1 June 2, 2019, 1:20 p.m. OK MS C++ 2017 TESTS 37 46 409600 1700
58339493 Yanhui E1 Aug. 5, 2019, 12:43 p.m. OK MS C++ 2017 TESTS 37 62 409600 1700
67022876 vjudge1 E1 Dec. 16, 2019, 1:30 p.m. OK MS C++ 2017 TESTS 37 77 204800 1700
42152483 mayakin E1 Aug. 27, 2018, 12:54 p.m. OK PHP TESTS 37 171 3788800 1700
41307760 kd710306 E1 Aug. 7, 2018, 2 p.m. OK PyPy 2 TESTS 37 374 3891200 1700
42455883 morejarphone E1 Sept. 4, 2018, 11:26 a.m. OK PyPy 2 TESTS 37 452 6246400 1700
44487436 icpc_practice E1 Oct. 18, 2018, 1:09 p.m. OK PyPy 2 TESTS 37 499 12083200 1700
50417950 homoeconomicus E1 Feb. 24, 2019, 7:36 a.m. OK PyPy 3 TESTS 37 170 3788800 1700
47508306 TurningTables E1 Dec. 26, 2018, 3:57 a.m. OK PyPy 3 TESTS 37 171 4300800 1700
44066251 HappyEveryday E1 Oct. 10, 2018, 9:29 a.m. OK PyPy 3 TESTS 37 186 5222400 1700
50418125 homoeconomicus E1 Feb. 24, 2019, 7:42 a.m. OK PyPy 3 TESTS 37 202 3174400 1700
56559651 koptev E1 July 5, 2019, 2:12 p.m. OK PyPy 3 TESTS 37 202 5939200 1700
41141286 Stephan E1 Aug. 3, 2018, 3:09 a.m. OK PyPy 3 TESTS 37 217 4915200 1700
41103485 Stephan E1 Aug. 2, 2018, 2:30 a.m. OK PyPy 3 TESTS 37 218 4403200 1700
62069177 deadguy E1 Oct. 7, 2019, 4:10 p.m. OK PyPy 3 TESTS 37 218 7168000 1700
54349578 thekushalghosh E1 May 18, 2019, 2:06 p.m. OK PyPy 3 TESTS 37 233 6348800 1700
50570604 schiebermc E1 Feb. 27, 2019, 3:13 p.m. OK PyPy 3 TESTS 37 265 7168000 1700
52501549 aleonov E1 April 8, 2019, 4:22 p.m. OK Python 3 TESTS 37 124 614400 1700
41289260 orailly E1 Aug. 7, 2018, 12:58 a.m. OK Python 3 TESTS 37 139 614400 1700
45673388 r57shell E1 Nov. 13, 2018, 11:53 a.m. OK Python 3 TESTS 37 170 1024000 1700
56771296 titia E1 July 9, 2019, 10:10 p.m. OK Python 3 TESTS 37 186 1126400 1700
41124998 androidemailintent E1 Aug. 2, 2018, 1:51 p.m. OK Python 3 TESTS 37 358 1331200 1700
41184265 serge854 E1 Aug. 3, 2018, 4:39 p.m. OK Python 3 TESTS 37 373 1126400 1700
42670029 raekim95 E1 Sept. 8, 2018, 10:24 a.m. OK Python 3 TESTS 37 389 1126400 1700
49656588 syzymon E1 Feb. 9, 2019, 10:17 a.m. OK Python 3 TESTS 37 405 149606400 1700
63131210 niklas.mohrin E1 Oct. 22, 2019, 2:16 p.m. OK Python 3 TESTS 37 420 716800 1700
42656237 raekim95 E1 Sept. 7, 2018, 10:36 p.m. OK Python 3 TESTS 37 436 1126400 1700
41150967 betrue12 E1 Aug. 3, 2018, 8:51 a.m. OK Ruby TESTS 37 280 512000 1700
41503877 clupasq E1 Aug. 11, 2018, 7:03 p.m. OK Ruby TESTS 37 1824 3379200 1700
41661908 leoniduvk E1 Aug. 16, 2018, 6:43 p.m. OK Rust TESTS 37 31 512000 1700
46452182 yakamoto E1 Dec. 1, 2018, 3:59 p.m. OK Scala TESTS 37 420 0 1700
41130306 sam.ninja E1 Aug. 2, 2018, 4:55 p.m. OK Scala TESTS 37 670 307200 1700

remove filters

Back to search problems