Codeforces Beta Round 60

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
65 Codeforces Beta Round 60 FINISHED False 7200 477064823 March 5, 2011, 4 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 479 ) D Harry Potter and the Sorting Hat PROGRAMMING brute force dfs and similar hashing 2200

As you know, Hogwarts has four houses: Gryffindor, Hufflepuff, Ravenclaw and Slytherin. The sorting of the first-years into houses is done by the Sorting Hat. The pupils are called one by one in the alphabetical order, each of them should put a hat on his head and, after some thought, the hat solemnly announces the name of the house the student should enter. At that the Hat is believed to base its considerations on the student's personal qualities: it sends the brave and noble ones to Gryffindor, the smart and shrewd ones — to Ravenclaw, the persistent and honest ones — to Hufflepuff and the clever and cunning ones — to Slytherin. However, a first year student Hermione Granger got very concerned about the forthcoming sorting. She studied all the literature on the Sorting Hat and came to the conclusion that it is much simpler than that. If the relatives of the student have already studied at Hogwarts, the hat puts the student to the same house, where his family used to study. In controversial situations, when the relatives studied in different houses or when they were all Muggles like Hermione's parents, then the Hat sorts the student to the house, to which the least number of first years has been sent at that moment. If there are several such houses, the choice is given to the student himself. Then the student can choose any of the houses, to which the least number of first years has been sent so far. Hermione has already asked the students that are on the list before her about their relatives. Now she and her new friends Harry Potter and Ron Weasley want to find out into what house the Hat will put Hermione. The first input line contains an integer n ( 1 ≤ n ≤ 10000 ). It is the number of students who are in the list before Hermione. The next line contains n symbols. If all the relatives of a student used to study in the same house, then the i -th character in the string coincides with the first letter of the name of this house. Otherwise, the i -th symbo

Tutorials

Codeforces Beta Round #60: tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
329691 Sereja D March 9, 2011, 7:10 p.m. OK FPC TESTS 66 30 1024000 2200
323153 Rubanenko D March 7, 2011, 7:20 a.m. OK FPC TESTS 66 30 1126400 2200
507573 vlad107 D June 22, 2011, 11:28 a.m. OK FPC TESTS 66 50 44236800 2200
1509874 sillycross D April 11, 2012, 9:17 a.m. OK FPC TESTS 66 110 112844800 2200
8493462 gyz_gyz D Oct. 31, 2014, 4:31 a.m. OK FPC TESTS 66 826 104345600 2200
1540807 Furko D April 16, 2012, 7:36 a.m. OK FPC TESTS 66 1050 2969600 2200
321155 LayCurse D March 5, 2011, 6:48 p.m. OK GNU C TESTS 65 30 1331200 2200
22186158 Jin_Haonan D Nov. 13, 2016, 2:22 a.m. OK GNU C++ TESTS 66 15 1740800 2200
320029 yakitori D March 5, 2011, 5:45 p.m. OK GNU C++ TESTS 65 30 1536000 2200
11095105 vjudge4 D May 14, 2015, 5:26 a.m. OK GNU C++ TESTS 66 30 2867200 2200
4478320 pause D Sept. 15, 2013, 3:03 p.m. OK GNU C++ TESTS 66 30 12902400 2200
319577 krolbajtocji D March 5, 2011, 5:30 p.m. OK GNU C++ TESTS 65 30 65536000 2200
15144170 HappyNewYearMike D Jan. 1, 2016, 12:34 a.m. OK GNU C++ TESTS 66 31 0 2200
13824502 130705009 D Oct. 24, 2015, 12:52 p.m. OK GNU C++ TESTS 66 31 0 2200
12399258 Altria-PenDragon D Aug. 7, 2015, 8:21 a.m. OK GNU C++ TESTS 66 31 0 2200
8494268 Valaky D Oct. 31, 2014, 6:47 a.m. OK GNU C++ TESTS 66 31 0 2200
8493457 jiangshibiao D Oct. 31, 2014, 4:28 a.m. OK GNU C++ TESTS 66 31 102400 2200
7208550 ItsLastDay D July 23, 2014, 11:36 a.m. OK GNU C++0x TESTS 66 31 204800 2200
6646292 marat.snowbear D May 17, 2014, 10:37 p.m. OK GNU C++0x TESTS 66 31 204800 2200
8425080 zhj D Oct. 26, 2014, 11:55 p.m. OK GNU C++0x TESTS 66 31 409600 2200
8984815 sdya D Dec. 4, 2014, 6:39 p.m. OK GNU C++0x TESTS 66 31 3993600 2200
487593 package.zaic D June 14, 2011, 3:41 p.m. OK GNU C++0x TESTS 66 60 4198400 2200
8169576 wil93 D Oct. 10, 2014, 9:28 p.m. OK GNU C++0x TESTS 66 62 204800 2200
670294 Archon.JK D Sept. 6, 2011, 6:46 a.m. OK GNU C++0x TESTS 66 90 5734400 2200
12201427 HellKitsune D July 23, 2015, 1:59 p.m. OK GNU C++11 TESTS 66 15 0 2200
14923061 paulwang akaiNeko eddy1021 D Dec. 22, 2015, 9:32 a.m. OK GNU C++11 TESTS 66 15 102400 2200
29264403 vjudge3 D Aug. 7, 2017, 12:18 p.m. OK GNU C++11 TESTS 66 15 6041600 2200
18574236 TooAwesome D June 18, 2016, 7:58 a.m. OK GNU C++11 TESTS 66 30 0 2200
63379395 vjudge5 D Oct. 25, 2019, 12:01 p.m. OK GNU C++11 TESTS 66 31 0 2200
41573677 lawfung D Aug. 14, 2018, 2:03 a.m. OK GNU C++11 TESTS 66 31 0 2200
40993021 ReaLNero1 D July 31, 2018, 1:43 a.m. OK GNU C++11 TESTS 66 31 0 2200
41812227 pr3pony D Aug. 19, 2018, 4 a.m. OK GNU C++11 TESTS 66 31 102400 2200
41603984 rrrrrrrr D Aug. 14, 2018, 11:45 p.m. OK GNU C++11 TESTS 66 31 1126400 2200
17083688 freebsdx D April 1, 2016, 2:05 a.m. OK GNU C++11 TESTS 66 31 2150400 2200
21856441 2016 D Oct. 28, 2016, 7:05 p.m. OK GNU C++14 TESTS 66 30 204800 2200
29251795 vjudge3 D Aug. 7, 2017, 2:55 a.m. OK GNU C++14 TESTS 66 30 2560000 2200
29264610 miamiao D Aug. 7, 2017, 12:29 p.m. OK GNU C++14 TESTS 66 30 6041600 2200
41561674 yp155136 D Aug. 13, 2018, 2:39 p.m. OK GNU C++14 TESTS 66 31 204800 2200
23613518 Ali.Pi D Jan. 6, 2017, 9:49 p.m. OK GNU C++14 TESTS 66 31 2048000 2200
63375254 djq_fpc D Oct. 25, 2019, 10:48 a.m. OK GNU C++14 TESTS 66 31 2969600 2200
63374717 little_waxberry D Oct. 25, 2019, 10:37 a.m. OK GNU C++14 TESTS 66 31 3072000 2200
22173304 I_Love_Rem D Nov. 12, 2016, 6:49 a.m. OK GNU C++14 TESTS 66 31 4096000 2200
35041772 I_love_Y_UME D Feb. 8, 2018, 2:52 a.m. OK GNU C++14 TESTS 66 31 6246400 2200
29251820 vjudge5 D Aug. 7, 2017, 2:57 a.m. OK GNU C++14 TESTS 66 31 6451200 2200
64639480 Ashish D Nov. 10, 2019, 12:38 p.m. OK GNU C++17 TESTS 66 31 204800 2200
58794243 NoLongerRed D Aug. 14, 2019, 4:07 a.m. OK GNU C++17 TESTS 66 31 204800 2200
52600311 tnakao D April 11, 2019, 11:35 a.m. OK GNU C++17 TESTS 66 31 204800 2200
63374349 ppc_qjd D Oct. 25, 2019, 10:30 a.m. OK GNU C++17 TESTS 66 31 2969600 2200
48464991 crathva D Jan. 16, 2019, 4:46 p.m. OK GNU C++17 TESTS 66 31 3174400 2200
41734547 johnchen902 D Aug. 18, 2018, 1:34 a.m. OK GNU C++17 TESTS 66 31 3584000 2200
63375774 charlieyan D Oct. 25, 2019, 10:58 a.m. OK GNU C++17 TESTS 66 46 204800 2200
62227496 Arrias D Oct. 9, 2019, 7:27 p.m. OK GNU C++17 TESTS 66 46 204800 2200
41657262 harveyycyang D Aug. 16, 2018, 3:31 p.m. OK GNU C++17 TESTS 66 46 204800 2200
63412221 vjudge4 D Oct. 26, 2019, 1:36 a.m. OK GNU C++17 TESTS 66 46 204800 2200
320956 S.Yesipenko D March 5, 2011, 6:35 p.m. OK Java 6 TESTS 65 90 43315200 2200
322361 mdldml D March 6, 2011, 10:29 a.m. OK Java 6 TESTS 66 110 43315200 2200
319815 OgieKako D March 5, 2011, 5:39 p.m. OK Java 6 TESTS 65 110 43315200 2200
319051 Hieu D March 5, 2011, 5:13 p.m. OK Java 6 TESTS 65 110 43417600 2200
331908 pius_88 D March 12, 2011, 8:44 p.m. OK Java 6 TESTS 66 110 43724800 2200
318922 Egor D March 5, 2011, 5:09 p.m. OK Java 6 TESTS 65 110 43724800 2200
327653 ondrah D March 7, 2011, 8:15 p.m. OK Java 6 TESTS 66 110 43827200 2200
322004 madkite D March 6, 2011, 2:29 a.m. OK Java 6 TESTS 65 130 43315200 2200
323266 sayuan D March 7, 2011, 9:55 a.m. OK Java 6 TESTS 66 130 43315200 2200
320269 alexey.enkov D March 5, 2011, 5:52 p.m. OK Java 6 TESTS 65 130 43315200 2200
10767127 Pryanic D April 18, 2015, 11:55 a.m. OK Java 7 TESTS 66 93 0 2200
12319443 hama-du D Aug. 3, 2015, 12:48 a.m. OK Java 8 TESTS 66 140 0 2200
19931181 throwaways D Aug. 17, 2016, 4:10 p.m. OK Java 8 TESTS 66 140 20582400 2200
18651758 atarw D June 22, 2016, 7:08 p.m. OK Java 8 TESTS 66 155 0 2200
18022173 icyinlatedecember D May 21, 2016, 5:27 p.m. OK Java 8 TESTS 66 155 20684800 2200
43635482 Ajudiya_13 D Oct. 1, 2018, 8:22 a.m. OK Java 8 TESTS 66 217 307200 2200
322402 tanzaku D March 6, 2011, 11:23 a.m. OK Mono C# TESTS 66 170 7680000 2200
321168 LinesPrower D March 5, 2011, 6:50 p.m. OK MS C++ TESTS 65 30 1433600 2200
446325 giba D May 13, 2011, 2:01 p.m. OK MS C++ TESTS 66 30 1433600 2200
320184 Ixanezis D March 5, 2011, 5:50 p.m. OK MS C++ TESTS 65 30 1433600 2200
319829 Oracle D March 5, 2011, 5:40 p.m. OK MS C++ TESTS 65 30 1433600 2200
318918 Vedensky D March 5, 2011, 5:09 p.m. OK MS C++ TESTS 65 30 1433600 2200
320042 KhaustovPavel D March 5, 2011, 5:46 p.m. OK MS C++ TESTS 65 30 1536000 2200
319527 al13n D March 5, 2011, 5:28 p.m. OK MS C++ TESTS 65 30 1536000 2200
318583 MBabin D March 5, 2011, 5 p.m. OK MS C++ TESTS 65 30 1536000 2200
328707 cosmos D March 8, 2011, 2:57 p.m. OK MS C++ TESTS 66 30 1843200 2200
318446 Shef D March 5, 2011, 4:56 p.m. OK MS C++ TESTS 65 30 2048000 2200
60594487 zzzzqq D Sept. 15, 2019, 4:36 a.m. OK MS C++ 2017 TESTS 66 46 3481600 2200
321858 zibada D March 5, 2011, 11:06 p.m. OK Python 2 TESTS 65 160 2867200 2200
336671 ditzone D March 14, 2011, 8:51 a.m. OK Python 2 TESTS 66 200 2867200 2200
35897175 _____k_____ D March 3, 2018, 5:47 p.m. OK Python 2 TESTS 66 202 4608000 2200
35897215 ______u______ D March 3, 2018, 5:47 p.m. OK Python 2 TESTS 66 202 4608000 2200
35896198 ______n______ D March 3, 2018, 5:03 p.m. OK Python 2 TESTS 66 202 4608000 2200
35895980 _____i_____ D March 3, 2018, 4:58 p.m. OK Python 2 TESTS 66 202 4608000 2200
35890027 ______k______ D March 3, 2018, 2:48 p.m. OK Python 2 TESTS 66 202 4608000 2200
35889993 ______h______ D March 3, 2018, 2:48 p.m. OK Python 2 TESTS 66 202 4608000 2200
35889401 ______i______ D March 3, 2018, 2:39 p.m. OK Python 2 TESTS 66 202 4608000 2200
35888231 ______M______ D March 3, 2018, 2:18 p.m. OK Python 2 TESTS 66 202 4608000 2200
10260866 Zyflair D March 13, 2015, 5:24 p.m. OK Ruby TESTS 66 265 1331200 2200
10260889 Zyflair D March 13, 2015, 5:26 p.m. OK Ruby TESTS 66 280 1331200 2200
10262560 Zyflair D March 13, 2015, 8:02 p.m. OK Ruby TESTS 66 280 1433600 2200

remove filters

Back to search problems