Codeforces Beta Round 56

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
60 Codeforces Beta Round 56 FINISHED False 7200 439048763 Feb. 19, 2011, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 462 ) D Savior PROGRAMMING brute force ds math 2400

B'Misha decided to help Pasha and Akim be friends again. He had a cunning plan -- to destroy all the laughy mushrooms. He knows that the laughy mushrooms can easily burst when they laugh. Mushrooms grow on the lawns. There are a[t] mushrooms on the t-th lawn. Misha knows that the lawns where the mushrooms grow have a unique ability. A lawn (say, i) can transfer laugh to other lawn (say, j) if there exists an integer (say, b) such, that some permutation of numbers a[i], xe2 x80 x89a[j] and b is a beautiful triple (i xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89j). A beautiful triple is such three pairwise coprime numbers x, xe2 x80 x89y, xe2 x80 x89z, which satisfy the following condition: x2 xe2 x80 x89+ xe2 x80 x89y2 xe2 x80 x89= xe2 x80 x89z2. Misha wants to know on which minimal number of lawns he should laugh for all the laughy mushrooms to burst. The first line contains one integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) which is the number of lawns. The next line contains n integers ai which are the number of mushrooms on the i-lawn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89107). All the numbers are different. Print a single number -- the minimal number of lawns on which Misha should laugh for all the mushrooms to burst.'...

Tutorials

Solutions for Codeforces Beta Round #56

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
290852 JOZHEG D Feb. 19, 2011, 5:47 p.m. OK Delphi TESTS 40 340 99020800 2400
291328 sankear D Feb. 19, 2011, 6:46 p.m. OK Delphi TESTS 40 1130 183193600 2400
289434 tourist D Feb. 19, 2011, 4:37 p.m. OK Delphi TESTS 40 1410 211251200 2400
1042837 yedeming D Jan. 13, 2012, 8:45 a.m. OK FPC TESTS 40 880 45056000 2400
525058 vlad107 D July 1, 2011, 4:09 p.m. OK FPC TESTS 40 1170 61132800 2400
1516503 sillycross D April 13, 2012, 2:48 a.m. OK FPC TESTS 40 1420 53043200 2400
989517 waterkid D Dec. 28, 2011, 9:40 a.m. OK FPC TESTS 40 2380 51097600 2400
1124965 suanrong D Jan. 29, 2012, 8:05 a.m. OK FPC TESTS 40 2590 161484800 2400
497926 Sereja D June 19, 2011, 1:50 p.m. OK FPC TESTS 40 2730 189337600 2400
497934 Sereja D June 19, 2011, 1:57 p.m. OK FPC TESTS 40 2750 189337600 2400
508929 zpl1 D June 23, 2011, 3 p.m. OK GNU C TESTS 40 1230 121651200 2400
992669 sunweijun D Dec. 31, 2011, 5:27 a.m. OK GNU C++ TESTS 40 420 41574400 2400
40993100 ReaLNero1 D July 31, 2018, 1:45 a.m. OK GNU C++ TESTS 40 434 40243200 2400
292325 -dp- D Feb. 20, 2011, 8:37 a.m. OK GNU C++ TESTS 40 580 45465600 2400
291960 -dp- D Feb. 20, 2011, 1:13 a.m. OK GNU C++ TESTS 40 590 45465600 2400
3658579 Choojae D May 1, 2013, 5:06 p.m. OK GNU C++ TESTS 40 670 44134400 2400
292245 popovaclaire D Feb. 20, 2011, 7:39 a.m. OK GNU C++ TESTS 40 690 126566400 2400
2923914 noh4h_ss D Jan. 14, 2013, 12:24 p.m. OK GNU C++ TESTS 40 703 40038400 2400
2071550 yh_victor D Aug. 31, 2012, 11:44 a.m. OK GNU C++ TESTS 40 720 40857600 2400
2071548 yh_victor D Aug. 31, 2012, 11:44 a.m. OK GNU C++ TESTS 40 720 40857600 2400
291953 -dp- D Feb. 20, 2011, 1:06 a.m. OK GNU C++ TESTS 40 720 45465600 2400
8807901 MinakoKojima D Nov. 23, 2014, 1:59 a.m. OK GNU C++0x TESTS 40 530 94208000 2400
8807874 MinakoKojima D Nov. 23, 2014, 1:46 a.m. OK GNU C++0x TESTS 40 592 94208000 2400
8807914 MinakoKojima D Nov. 23, 2014, 2:08 a.m. OK GNU C++0x TESTS 40 592 104243200 2400
454177 JFantasy D May 14, 2011, 1:55 a.m. OK GNU C++0x TESTS 40 670 51507200 2400
729023 Archon.JK D Sept. 28, 2011, 4:40 p.m. OK GNU C++0x TESTS 40 880 81510400 2400
8807839 MinakoKojima D Nov. 23, 2014, 1:24 a.m. OK GNU C++0x TESTS 40 1028 54169600 2400
6969704 FancyCoder D June 27, 2014, 12:41 p.m. OK GNU C++0x TESTS 40 1404 80179200 2400
8973438 sdya D Dec. 3, 2014, 7:44 p.m. OK GNU C++0x TESTS 40 1404 96972800 2400
7616532 kittylover D Aug. 28, 2014, 8:14 p.m. OK GNU C++0x TESTS 40 2244 84172800 2400
22296089 Mustang98 D Nov. 17, 2016, 8:08 p.m. OK GNU C++11 TESTS 40 904 64819200 2400
57906405 lopare D July 28, 2019, 5:48 p.m. OK GNU C++11 TESTS 40 1154 43929600 2400
17083621 freebsdx D April 1, 2016, 1:58 a.m. OK GNU C++11 TESTS 40 1184 46182400 2400
38449928 ruo D May 20, 2018, 6:48 a.m. OK GNU C++11 TESTS 40 1340 80179200 2400
63955106 zs__std D Nov. 1, 2019, 12:47 a.m. OK GNU C++11 TESTS 40 1590 160358400 2400
12136751 HellKitsune D July 20, 2015, 8:44 p.m. OK GNU C++11 TESTS 40 1746 120217600 2400
21516571 LateSum D Oct. 17, 2016, 10:42 a.m. OK GNU C++11 TESTS 40 1902 50176000 2400
17504817 Y_UME D April 25, 2016, 7:54 a.m. OK GNU C++11 TESTS 40 2182 143769600 2400
11712685 krismaz D June 22, 2015, 5:19 p.m. OK GNU C++11 TESTS 40 2276 48128000 2400
14299208 abistrigova D Nov. 16, 2015, 2:27 p.m. OK GNU C++11 TESTS 40 2774 104243200 2400
27724009 Minology D June 11, 2017, 4:17 p.m. OK GNU C++14 TESTS 40 1122 84172800 2400
56016206 sorry_im_smurfing D June 24, 2019, 9:25 p.m. OK GNU C++14 TESTS 40 1248 44032000 2400
21613419 2016 D Oct. 20, 2016, 9:33 a.m. OK GNU C++14 TESTS 40 1370 212684800 2400
61344274 farmerboy D Sept. 27, 2019, 3:13 a.m. OK GNU C++14 TESTS 40 1464 88166400 2400
61344230 farmerboy D Sept. 27, 2019, 3:10 a.m. OK GNU C++14 TESTS 40 2088 48128000 2400
62584929 6aren D Oct. 14, 2019, 6:28 p.m. OK GNU C++14 TESTS 40 2120 48230400 2400
25635319 N00 D March 19, 2017, 4:49 a.m. OK GNU C++14 TESTS 40 2184 162201600 2400
31705481 -Morass- D Oct. 25, 2017, 10:30 a.m. OK GNU C++14 TESTS 40 2214 165376000 2400
57067568 artur.socha D July 14, 2019, 11:29 p.m. OK GNU C++14 TESTS 40 2276 102195200 2400
22225341 SakurakoujiRuna D Nov. 15, 2016, 3:43 p.m. OK GNU C++14 TESTS 40 2306 120217600 2400
58402880 Trying_Rating D Aug. 6, 2019, 6:43 p.m. OK GNU C++17 TESTS 40 966 40038400 2400
60732838 Gediminas D Sept. 17, 2019, 4:21 p.m. OK GNU C++17 TESTS 40 1434 48128000 2400
60819590 -is-this-fft- D Sept. 18, 2019, 10:48 p.m. OK GNU C++17 TESTS 40 2650 52121600 2400
60732774 Gediminas D Sept. 17, 2019, 4:19 p.m. OK GNU C++17 TESTS 40 3398 48128000 2400
58343640 MetB D Aug. 5, 2019, 2:07 p.m. OK GNU C++17 TESTS 40 3400 64102400 2400
292850 sayuan D Feb. 20, 2011, 4:50 p.m. OK Java 6 TESTS 40 940 197120000 2400
292256 20092100003 D Feb. 20, 2011, 7:49 a.m. OK Java 6 TESTS 40 970 168140800 2400
291478 winger D Feb. 19, 2011, 7:04 p.m. OK Java 6 TESTS 40 1000 152883200 2400
292265 20092100003 D Feb. 20, 2011, 7:54 a.m. OK Java 6 TESTS 40 1050 168140800 2400
292287 20092100003 D Feb. 20, 2011, 8:09 a.m. OK Java 6 TESTS 40 1060 168140800 2400
291807 yaro D Feb. 19, 2011, 9:29 p.m. OK Java 6 TESTS 40 1060 168140800 2400
291304 OgieKako D Feb. 19, 2011, 6:44 p.m. OK Java 6 TESTS 40 1160 101580800 2400
292475 Hadi_Asiaie D Feb. 20, 2011, 10:56 a.m. OK Java 6 TESTS 40 1440 172236800 2400
291333 Egor D Feb. 19, 2011, 6:46 p.m. OK Java 6 TESTS 40 2000 167116800 2400
2050475 Azat_Yusupov D Aug. 26, 2012, 3:11 p.m. OK Java 6 TESTS 40 2050 203571200 2400
15901350 mkirsche D Feb. 8, 2016, 7:19 p.m. OK Java 7 TESTS 40 1122 109465600 2400
7722833 Zyflair D Sept. 8, 2014, 4:23 p.m. OK Java 7 TESTS 40 3836 159539200 2400
41595991 AQT D Aug. 14, 2018, 4:52 p.m. OK Java 8 TESTS 40 1808 50790400 2400
23513327 kws4679 D Jan. 3, 2017, 9:19 a.m. OK Java 8 TESTS 40 3866 104243200 2400
292439 Hadi_Asiaie D Feb. 20, 2011, 10:25 a.m. OK Mono C# TESTS 40 2560 167424000 2400
296429 Hadi_Asiaie D Feb. 22, 2011, 3:40 p.m. OK Mono C# TESTS 40 3270 181145600 2400
353107 iSea D March 24, 2011, 7:17 a.m. OK MS C++ TESTS 40 670 45568000 2400
26045528 Roms D April 1, 2017, 7:08 a.m. OK MS C++ TESTS 40 872 202444800 2400
293074 Ixanezis D Feb. 20, 2011, 10:35 p.m. OK MS C++ TESTS 40 1140 163840000 2400
353101 iSea D March 24, 2011, 7:07 a.m. OK MS C++ TESTS 40 1170 45465600 2400
291686 forest D Feb. 19, 2011, 8:04 p.m. OK MS C++ TESTS 40 1440 49459200 2400
290124 Coder D Feb. 19, 2011, 5:07 p.m. OK MS C++ TESTS 40 1630 45465600 2400
300401 sleepiforest D Feb. 23, 2011, 9:11 a.m. OK MS C++ TESTS 40 1630 55500800 2400
294271 ryuzmukhametov D Feb. 21, 2011, 4:38 p.m. OK MS C++ TESTS 40 2220 91545600 2400
1567385 littlepanda D April 17, 2012, 3:26 p.m. OK MS C++ TESTS 40 2520 54476800 2400
308278 Psilocybe D Feb. 26, 2011, 5:34 p.m. OK MS C++ TESTS 40 2690 81510400 2400

remove filters

Back to search problems