Codeforces Beta Round 87 (Div. 2 Only)

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
116 Codeforces Beta Round 87 (Div. 2 Only) FINISHED False 7200 415724399 Sept. 15, 2011, 3 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 13790 ) B Little Pigs and Wolves PROGRAMMING greedy implementation 1300

B'Once upon a time there were several little pigs and several wolves on a two-dimensional grid of size n xe2 x80 x89 xc3 x97 xe2 x80 x89m. Each cell in this grid was either empty, containing one little pig, or containing one wolf. A little pig and a wolf are adjacent if the cells that they are located at share a side. The little pigs are afraid of wolves, so there will be at most one wolf adjacent to each little pig. But each wolf may be adjacent to any number of little pigs. They have been living peacefully for several years. But today the wolves got hungry. One by one, each wolf will choose one of the little pigs adjacent to it (if any), and eats the poor little pig. This process is not repeated. That is, each wolf will get to eat at most one little pig. Once a little pig gets eaten, it disappears and cannot be eaten by any other wolf. What is the maximum number of little pigs that may be eaten by the wolves? The first line contains integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910) which denotes the number of rows and columns in our two-dimensional grid, respectively. Then follow n lines containing m characters each -- that is the grid description. "." means that this cell is empty. "P" means that this cell contains a little pig. "W" means that this cell contains a wolf. It is guaranteed that there will be at most one wolf adjacent to any little pig. Print a single number -- the maximal number of little pigs that may be eaten by the wolves. In the first example, one possible scenario in which two little pigs get eaten by the wolves is as follows. '...

Tutorials

Codeforces Beta #87 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
30385257 HsOH B Sept. 16, 2017, 2:18 p.m. OK FPC TESTS 76 30 0 1300
22725427 zopubo90 B Dec. 6, 2016, 8:03 a.m. OK FPC TESTS 76 30 102400 1300
22700875 GGOGi B Dec. 4, 2016, 6:06 p.m. OK FPC TESTS 76 30 102400 1300
22705517 Jicote B Dec. 5, 2016, 6:10 a.m. OK FPC TESTS 76 30 204800 1300
25007164 ice_tea B Feb. 25, 2017, 8:41 a.m. OK FPC TESTS 76 30 1638400 1300
19395499 dailong B July 25, 2016, 5:47 a.m. OK FPC TESTS 76 62 0 1300
20338336 vjudge1 B Sept. 2, 2016, 10:13 a.m. OK GNU C TESTS 76 30 0 1300
27817702 inguz B June 16, 2017, 5:37 a.m. OK GNU C TESTS 76 30 0 1300
18564761 grushenka B June 17, 2016, 8:25 p.m. OK GNU C TESTS 76 30 0 1300
35831076 ______i______ B March 2, 2018, 9:36 a.m. OK GNU C TESTS 76 30 1843200 1300
35837284 ______u______ B March 2, 2018, 1:10 p.m. OK GNU C TESTS 76 30 1843200 1300
35837257 _____i_____ B March 2, 2018, 1:10 p.m. OK GNU C TESTS 76 30 1843200 1300
35837212 _____k_____ B March 2, 2018, 1:10 p.m. OK GNU C TESTS 76 30 1843200 1300
35831140 ______h______ B March 2, 2018, 9:37 a.m. OK GNU C TESTS 76 30 1843200 1300
35831102 ______k______ B March 2, 2018, 9:36 a.m. OK GNU C TESTS 76 30 1843200 1300
35837290 ______n______ B March 2, 2018, 1:10 p.m. OK GNU C TESTS 76 30 1843200 1300
32507709 Asmaa_Mosa B Nov. 20, 2017, 5:47 p.m. OK GNU C++ TESTS 76 30 0 1300
32513321 mahamad B Nov. 21, 2017, 12:08 a.m. OK GNU C++ TESTS 76 30 0 1300
32508324 Mahmoud-Eliwa B Nov. 20, 2017, 6:22 p.m. OK GNU C++ TESTS 76 30 0 1300
32305370 monicaandreea46 B Nov. 14, 2017, 7:04 a.m. OK GNU C++ TESTS 76 30 0 1300
32234769 zabachi B Nov. 12, 2017, 5:01 a.m. OK GNU C++ TESTS 76 30 0 1300
31854095 chenyiheng B Oct. 29, 2017, 2:30 a.m. OK GNU C++ TESTS 76 30 0 1300
31279052 manvi_garg45 B Oct. 13, 2017, 3:48 p.m. OK GNU C++ TESTS 76 30 0 1300
31153978 Purple_Flame B Oct. 8, 2017, 8:21 p.m. OK GNU C++ TESTS 76 30 0 1300
31045873 _QWOiNYUIVMPFSBKLiGSMAP_ B Oct. 5, 2017, 7:45 p.m. OK GNU C++ TESTS 76 30 0 1300
30837905 Seek_N_Destroy B Sept. 29, 2017, 6:08 p.m. OK GNU C++ TESTS 76 30 0 1300
35455621 keeptrying01 B Feb. 18, 2018, 7:38 p.m. OK GNU C11 TESTS 76 30 1843200 1300
35456997 Cyberologist B Feb. 18, 2018, 8:51 p.m. OK GNU C11 TESTS 76 30 1843200 1300
31538793 trungbkit B Oct. 20, 2017, 3:47 p.m. OK GNU C11 TESTS 76 30 1945600 1300
25894795 vjudge1 B March 29, 2017, 11:59 a.m. OK GNU C11 TESTS 76 30 1945600 1300
55181145 patilc125 B June 5, 2019, 10:28 p.m. OK GNU C11 TESTS 76 62 0 1300
51947259 nihar_99 B March 28, 2019, 5:37 p.m. OK GNU C11 TESTS 76 62 0 1300
54833698 hitman_28 B May 30, 2019, 10:01 a.m. OK GNU C11 TESTS 76 62 0 1300
62458703 akash19jain B Oct. 13, 2019, 7:27 a.m. OK GNU C11 TESTS 76 62 0 1300
60254525 cs234_shrey B Sept. 8, 2019, 8:42 a.m. OK GNU C11 TESTS 76 62 0 1300
58087535 Cloud_ B July 31, 2019, 4:13 p.m. OK GNU C11 TESTS 76 62 0 1300
32561670 ngooda98 B Nov. 22, 2017, 9:01 p.m. OK GNU C++11 TESTS 76 30 0 1300
39420779 aashay B June 19, 2018, 7:41 p.m. OK GNU C++11 TESTS 76 30 0 1300
32561659 ngooda98 B Nov. 22, 2017, 9 p.m. OK GNU C++11 TESTS 76 30 0 1300
32561212 omarashraf0109 B Nov. 22, 2017, 8:28 p.m. OK GNU C++11 TESTS 76 30 0 1300
32558221 mw98 B Nov. 22, 2017, 5:45 p.m. OK GNU C++11 TESTS 76 30 0 1300
32538067 sameh_farouk B Nov. 22, 2017, 12:44 a.m. OK GNU C++11 TESTS 76 30 0 1300
32535439 ammar_Ahmed B Nov. 21, 2017, 8:36 p.m. OK GNU C++11 TESTS 76 30 0 1300
32535138 Adachi-San B Nov. 21, 2017, 8:22 p.m. OK GNU C++11 TESTS 76 30 0 1300
32534694 Esraa_Farhat B Nov. 21, 2017, 7:54 p.m. OK GNU C++11 TESTS 76 30 0 1300
32512710 Sohyb B Nov. 20, 2017, 10:55 p.m. OK GNU C++11 TESTS 76 30 0 1300
32537292 mohamed29 B Nov. 21, 2017, 10:53 p.m. OK GNU C++14 TESTS 76 30 0 1300
32536174 Atef_Elsaeed B Nov. 21, 2017, 9:21 p.m. OK GNU C++14 TESTS 76 30 0 1300
39351670 Sixpathsguy B June 18, 2018, 9:09 a.m. OK GNU C++14 TESTS 76 30 0 1300
39065028 camon_camon B June 9, 2018, 9:17 a.m. OK GNU C++14 TESTS 76 30 0 1300
39037388 1one_piece B June 8, 2018, 6:05 a.m. OK GNU C++14 TESTS 76 30 0 1300
39008710 vj_rahil B June 7, 2018, 4:36 a.m. OK GNU C++14 TESTS 76 30 0 1300
32563413 Daad B Nov. 22, 2017, 11:13 p.m. OK GNU C++14 TESTS 76 30 0 1300
32557580 AEssam98 B Nov. 22, 2017, 5:12 p.m. OK GNU C++14 TESTS 76 30 0 1300
32555465 jreda97 B Nov. 22, 2017, 3:41 p.m. OK GNU C++14 TESTS 76 30 0 1300
32537803 AEssam98 B Nov. 22, 2017, 12:01 a.m. OK GNU C++14 TESTS 76 30 0 1300
52519228 Bader_Albader B April 9, 2019, 7:42 a.m. OK GNU C++17 TESTS 76 30 0 1300
39187191 khalil_2017 B June 12, 2018, 9:52 a.m. OK GNU C++17 TESTS 76 30 0 1300
36011995 danyvs B March 6, 2018, 3:58 p.m. OK GNU C++17 TESTS 76 30 1945600 1300
35193980 upbeat B Feb. 13, 2018, 8:37 a.m. OK GNU C++17 TESTS 76 30 1945600 1300
35607307 Elhawary B Feb. 23, 2018, 6:45 p.m. OK GNU C++17 TESTS 76 30 1945600 1300
65516721 Mehedihasanprodhan B Nov. 22, 2019, 6:25 a.m. OK GNU C++17 TESTS 76 60 0 1300
66628929 jkv_jones B Dec. 11, 2019, 10:21 a.m. OK GNU C++17 TESTS 76 60 0 1300
68558561 rds98 B Jan. 10, 2020, 6:15 p.m. OK GNU C++17 TESTS 76 60 0 1300
62612956 _accepted1 B Oct. 15, 2019, 10:28 a.m. OK GNU C++17 TESTS 76 60 0 1300
63232892 dhrigasi B Oct. 23, 2019, 11:30 a.m. OK GNU C++17 TESTS 76 60 0 1300
32518259 hdcode B Nov. 21, 2017, 7:15 a.m. OK GNU C++17 Diagnostics TESTS 76 1590 0 1300
35377127 askoki B Feb. 16, 2018, 9:21 p.m. OK Go TESTS 76 30 23040000 1300
51877139 azd01 B March 26, 2019, 8:14 p.m. OK Go TESTS 76 62 0 1300
20623595 pavel.rosputko B Sept. 14, 2016, 5:14 p.m. OK Haskell TESTS 76 30 102400 1300
68279149 YahiaMostafa B Jan. 5, 2020, 4:19 p.m. OK Java 11 TESTS 76 342 0 1300
68007824 vinnay B Dec. 31, 2019, 2:09 p.m. OK Java 11 TESTS 76 436 0 1300
19010864 anuj64 B July 10, 2016, 1:47 p.m. OK Java 7 TESTS 76 218 0 1300
18739776 aldeebiano B June 26, 2016, 3:56 p.m. OK Java 7 TESTS 76 248 0 1300
19490881 parth015 B July 29, 2016, 3:52 p.m. OK Java 7 TESTS 76 248 0 1300
18969055 zlobber B July 8, 2016, 12:07 p.m. OK Java 7 TESTS 76 280 0 1300
50622761 gcarrillo2 B March 1, 2019, 3:23 a.m. OK Java 8 TESTS 76 216 0 1300
64687825 shefali163 B Nov. 11, 2019, 12:16 p.m. OK Java 8 TESTS 76 218 0 1300
62435455 Avi_2506 B Oct. 12, 2019, 5:20 p.m. OK Java 8 TESTS 76 218 0 1300
58253093 Abdul01 B Aug. 4, 2019, 8:46 a.m. OK Java 8 TESTS 76 218 0 1300
55741826 kuxha B June 19, 2019, 7:52 a.m. OK Java 8 TESTS 76 218 0 1300
54470943 chojh1222 B May 22, 2019, 5:25 a.m. OK Java 8 TESTS 76 218 0 1300
53025730 mohdsadiq058 B April 19, 2019, 7:02 p.m. OK Java 8 TESTS 76 218 0 1300
31903778 mariem_kandil B Oct. 30, 2017, 7:17 p.m. OK Java 8 TESTS 76 218 0 1300
30581109 zodiacleo B Sept. 21, 2017, 2:46 p.m. OK Java 8 TESTS 76 218 0 1300
30580863 zodiacleo B Sept. 21, 2017, 2:35 p.m. OK Java 8 TESTS 76 218 0 1300
59921602 david_varela B Sept. 2, 2019, 11:29 p.m. OK Kotlin TESTS 76 374 1228800 1300
49113301 nemars B Jan. 28, 2019, 3:52 p.m. OK Mono C# TESTS 76 124 3686400 1300
52218629 newstein33 B April 2, 2019, 4:53 a.m. OK Mono C# TESTS 76 124 3686400 1300
26681660 Sorryforpartyrocking B April 26, 2017, 12:35 p.m. OK MS C# TESTS 76 92 9011200 1300
20451398 Chubcheg B Sept. 8, 2016, 5:18 a.m. OK MS C# TESTS 76 124 2560000 1300
20776124 HagerHosny19 B Sept. 20, 2016, 12:57 p.m. OK MS C++ TESTS 76 30 0 1300
32131244 adelEssam B Nov. 7, 2017, 9:46 p.m. OK MS C++ TESTS 76 30 0 1300
19362209 aicluod B July 23, 2016, 10:01 a.m. OK MS C++ TESTS 76 30 0 1300
21813983 asmaa_g_elkelany B Oct. 27, 2016, 7:20 a.m. OK MS C++ TESTS 76 30 0 1300
27237515 vlad.ishchenko B May 20, 2017, 4:28 p.m. OK MS C++ TESTS 76 30 102400 1300
32486350 bigworld12 B Nov. 19, 2017, 11:59 p.m. OK MS C++ TESTS 76 30 2048000 1300
34503115 vjudge1 B Jan. 24, 2018, 4:42 a.m. OK MS C++ TESTS 76 30 2048000 1300
34503113 vjudge4 B Jan. 24, 2018, 4:41 a.m. OK MS C++ TESTS 76 30 2048000 1300
34254474 vjudge1 B Jan. 17, 2018, 2:35 p.m. OK MS C++ TESTS 76 30 2048000 1300
34215562 vjudge3 B Jan. 16, 2018, 7:43 a.m. OK MS C++ TESTS 76 30 2048000 1300
53972256 eddroid B May 10, 2019, 10:29 p.m. OK MS C++ 2017 TESTS 76 62 0 1300
62372007 vjudge1 B Oct. 11, 2019, 4:02 p.m. OK MS C++ 2017 TESTS 76 62 0 1300
68774835 shio B Jan. 14, 2020, 1:05 p.m. OK MS C++ 2017 TESTS 76 62 307200 1300
56973603 2462478392 B July 13, 2019, 11:20 a.m. OK MS C++ 2017 TESTS 76 92 0 1300
58408433 a7madsam B Aug. 6, 2019, 10:59 p.m. OK MS C++ 2017 TESTS 76 92 0 1300
62363892 CtrlAlt B Oct. 11, 2019, 1:17 p.m. OK MS C++ 2017 TESTS 76 92 0 1300
56609729 enchantedpudding B July 6, 2019, 6:42 a.m. OK PyPy 2 TESTS 76 374 0 1300
29218479 Qumeric B Aug. 5, 2017, 12:28 p.m. OK PyPy 3 TESTS 76 218 23142400 1300
24557251 GShot B Feb. 9, 2017, 7:46 p.m. OK PyPy 3 TESTS 76 218 23142400 1300
49047867 deadguy B Jan. 27, 2019, 9:41 a.m. OK PyPy 3 TESTS 76 248 0 1300
55121354 sujairamprasathc B June 5, 2019, 10:51 a.m. OK PyPy 3 TESTS 76 278 0 1300
53314109 yfo B April 26, 2019, 9 a.m. OK PyPy 3 TESTS 76 278 0 1300
31322013 nonis B Oct. 14, 2017, 7:20 p.m. OK PyPy 3 TESTS 76 278 307200 1300
66210589 shade1010 B Dec. 3, 2019, 6:30 a.m. OK PyPy 3 TESTS 76 280 0 1300
63663269 chaudhary_19 B Oct. 28, 2019, 2:29 p.m. OK PyPy 3 TESTS 76 280 0 1300
62864271 raaavan B Oct. 18, 2019, 11:44 a.m. OK PyPy 3 TESTS 76 280 0 1300
57503142 rajat_2548 B July 22, 2019, 11:03 a.m. OK PyPy 3 TESTS 76 280 0 1300
27455073 thanos_03 B May 30, 2017, 8:09 p.m. OK Python 2 TESTS 76 92 0 1300
22850587 sanchit.agrawal B Dec. 10, 2016, 8:07 a.m. OK Python 2 TESTS 76 92 0 1300
23671301 Ali.Pi B Jan. 9, 2017, 9:27 p.m. OK Python 2 TESTS 76 92 4710400 1300
27049774 satu0king B May 12, 2017, 8:18 a.m. OK Python 2 TESTS 76 122 0 1300
34071314 laoliumang B Jan. 10, 2018, 2:42 p.m. OK Python 2 TESTS 76 124 4608000 1300
33440987 obuzzz B Dec. 19, 2017, 10:20 p.m. OK Python 2 TESTS 76 124 4608000 1300
26519769 arpitkath B April 20, 2017, 2:52 p.m. OK Python 2 TESTS 76 124 4710400 1300
21447059 JRP B Oct. 15, 2016, 9:49 a.m. OK Python 2 TESTS 76 154 4608000 1300
39036905 Byte-Rider B June 8, 2018, 5:36 a.m. OK Python 2 TESTS 76 218 307200 1300
42821818 franckmy B Sept. 13, 2018, 7:07 a.m. OK Python 2 TESTS 76 342 0 1300
25088806 knight-erraunt B Feb. 27, 2017, 9:27 p.m. OK Python 3 TESTS 76 124 4608000 1300
32887098 drisskhalil15 B Dec. 2, 2017, 11:51 p.m. OK Python 3 TESTS 76 124 5529600 1300
36284175 Evil__Coder B March 14, 2018, 6:05 p.m. OK Python 3 TESTS 76 124 5632000 1300
35767801 megaserg01 B Feb. 27, 2018, 3:45 p.m. OK Python 3 TESTS 76 124 5632000 1300
35709006 brandtnet1 B Feb. 25, 2018, 6:07 p.m. OK Python 3 TESTS 76 124 5632000 1300
35445922 kishynivas1996 B Feb. 18, 2018, 12:43 p.m. OK Python 3 TESTS 76 124 5632000 1300
36291613 Bamal B March 15, 2018, 6:32 a.m. OK Python 3 TESTS 76 124 5734400 1300
35738712 Paixao B Feb. 26, 2018, 4:36 p.m. OK Python 3 TESTS 76 124 5734400 1300
24537763 vhquang B Feb. 8, 2017, 10:43 p.m. OK Python 3 TESTS 76 154 4608000 1300
23352475 _4C3_ B Dec. 27, 2016, 5:11 a.m. OK Python 3 TESTS 76 154 4915200 1300
20145285 DanhVo B Aug. 25, 2016, 6:13 a.m. OK Ruby TESTS 76 124 6656000 1300
21812183 karthickpdy B Oct. 27, 2016, 5:05 a.m. OK Ruby TESTS 76 154 102400 1300
19896852 pvasilyev B Aug. 15, 2016, 10:54 p.m. OK Scala TESTS 76 530 39833600 1300

remove filters

Back to search problems