Codeforces Round 253 (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
442 Codeforces Round 253 (Div. 1) FINISHED False 7200 328631399 June 19, 2014, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2152 ) A Borya and Hanabi PROGRAMMING bitmasks brute force implementation 2000

B"Have you ever played Hanabi? If not, then you've got to try it out! This problem deals with a simplified version of the game. Overall, the game has 25 types of cards (5 distinct colors and 5 distinct values). Borya is holding n cards. The game is somewhat complicated by the fact that everybody sees Borya's cards except for Borya himself. Borya knows which cards he has but he knows nothing about the order they lie in. Note that Borya can have multiple identical cards (and for each of the 25 types of cards he knows exactly how many cards of this type he has). The aim of the other players is to achieve the state when Borya knows the color and number value of each of his cards. For that, other players can give him hints. The hints can be of two types: color hints and value hints. A color hint goes like that: a player names some color and points at all the cards of this color. Similarly goes the value hint. A player names some value and points at all the cards that contain the value. Determine what minimum number of hints the other players should make for Borya to be certain about each card's color and value. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of Borya's cards. The next line contains the descriptions of n cards. The description of each card consists of exactly two characters. The first character shows the color (overall this position can contain five distinct letters -- R, G, B, Y, W). The second character shows the card's value (a digit from 1 to 5). Borya doesn't know exact order of the cards they lie in. Print a single integer -- the minimum number of hints that the other players should make. In the first sample Borya already knows for each card that it is a green three. In the second sample we can show all fours and all red cards. In the third sample you need to make hints about any four colors."...

Tutorials

Codeforces #253 editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
6915360 Gassa A June 19, 2014, 3:47 p.m. OK D TESTS 54 15 307200 2000
6925196 Gassa A June 19, 2014, 10:23 p.m. OK D TESTS 54 31 204800 2000
6925219 Gassa A June 19, 2014, 10:29 p.m. OK D TESTS 54 31 204800 2000
6924569 Gassa A June 19, 2014, 7:50 p.m. OK D TESTS 54 31 307200 2000
6924555 Gassa A June 19, 2014, 7:47 p.m. OK D TESTS 54 31 307200 2000
6925341 Gassa A June 19, 2014, 11:14 p.m. OK D TESTS 54 93 1024000 2000
6923405 weizhaohui A June 19, 2014, 5:57 p.m. OK FPC TESTS 54 15 0 2000
7113749 DaibaNana A July 16, 2014, 6:28 a.m. OK FPC TESTS 54 15 0 2000
7053274 yubaby A July 9, 2014, 12:55 p.m. OK FPC TESTS 54 15 0 2000
6916821 stupidcoder.vn A June 19, 2014, 4:08 p.m. OK FPC TESTS 54 15 0 2000
6940531 CpasT A June 22, 2014, 4:43 a.m. OK FPC TESTS 54 15 307200 2000
6927905 chicken_coder A June 20, 2014, 1:24 p.m. OK FPC TESTS 54 15 307200 2000
7298151 imhereonlyforcookies A July 31, 2014, 8:49 a.m. OK FPC TESTS 54 15 409600 2000
17370966 MintGreen A April 18, 2016, 3:19 a.m. OK FPC TESTS 54 15 1740800 2000
25424127 Gray_58 A March 12, 2017, 5:15 a.m. OK FPC TESTS 54 30 2048000 2000
6916120 popoffka A June 19, 2014, 3:58 p.m. OK FPC TESTS 54 31 0 2000
6984486 vjudge3 A June 30, 2014, 7:53 a.m. OK GNU C TESTS 54 15 0 2000
6922047 zeosutt A June 19, 2014, 5:26 p.m. OK GNU C TESTS 54 15 0 2000
24909756 qianlisijun A Feb. 23, 2017, 6:41 a.m. OK GNU C TESTS 54 15 1945600 2000
24463555 qianlisijun A Feb. 6, 2017, 6:36 a.m. OK GNU C TESTS 54 15 1945600 2000
6959486 vis10326 A June 25, 2014, 6:42 p.m. OK GNU C TESTS 54 15 2662400 2000
6996423 xuweirong A July 2, 2014, 9:24 a.m. OK GNU C TESTS 54 78 0 2000
30755246 vjudge2 A Sept. 26, 2017, 3:30 p.m. OK GNU C++ TESTS 54 15 0 2000
26957846 vjudge5 A May 8, 2017, 1:39 p.m. OK GNU C++ TESTS 54 15 0 2000
26835963 vjudge5 A May 4, 2017, 1:47 p.m. OK GNU C++ TESTS 54 15 0 2000
26834723 vjudge5 A May 4, 2017, 12:49 p.m. OK GNU C++ TESTS 54 15 0 2000
21812527 vjudge4 A Oct. 27, 2016, 5:33 a.m. OK GNU C++ TESTS 54 15 0 2000
21766599 vjudge5 A Oct. 25, 2016, 8:38 a.m. OK GNU C++ TESTS 54 15 0 2000
20227359 computerace13 A Aug. 29, 2016, 10:22 a.m. OK GNU C++ TESTS 54 15 0 2000
19580123 vjudge3 A Aug. 2, 2016, 1:24 p.m. OK GNU C++ TESTS 54 15 0 2000
19579027 vjudge4 A Aug. 2, 2016, 12:18 p.m. OK GNU C++ TESTS 54 15 0 2000
19577702 vjudge3 A Aug. 2, 2016, 11:04 a.m. OK GNU C++ TESTS 54 15 0 2000
7297260 hogloid A July 31, 2014, 6:46 a.m. OK GNU C++0x TESTS 54 15 0 2000
8214803 zhj A Oct. 13, 2014, 6:20 a.m. OK GNU C++0x TESTS 54 15 0 2000
7728358 Plumrain A Sept. 9, 2014, 1:04 p.m. OK GNU C++0x TESTS 54 15 0 2000
7655896 pompon A Aug. 31, 2014, 5:04 p.m. OK GNU C++0x TESTS 54 15 0 2000
7352529 virgil A Aug. 5, 2014, 12:37 p.m. OK GNU C++0x TESTS 54 15 0 2000
7123276 Farimart A July 17, 2014, 11:19 a.m. OK GNU C++0x TESTS 54 15 0 2000
7118000 Shik A July 16, 2014, 5:11 p.m. OK GNU C++0x TESTS 54 15 0 2000
7042982 marcoskwkm A July 7, 2014, 8:02 p.m. OK GNU C++0x TESTS 54 15 0 2000
7037079 ecnerwala A July 7, 2014, 3:16 a.m. OK GNU C++0x TESTS 54 15 0 2000
7009194 M.Mahdi A July 4, 2014, 8:20 a.m. OK GNU C++0x TESTS 54 15 0 2000
57949821 rainboy A July 29, 2019, 3:56 p.m. OK GNU C11 TESTS 54 31 0 2000
21982199 quailty A Nov. 2, 2016, 5:07 a.m. OK GNU C++11 TESTS 54 15 0 2000
21109063 OmarHashim A Oct. 2, 2016, 8:20 a.m. OK GNU C++11 TESTS 54 15 0 2000
20984491 Rajib_119 A Sept. 29, 2016, 6:15 a.m. OK GNU C++11 TESTS 54 15 0 2000
20567377 sqr_hussain A Sept. 13, 2016, 12:39 p.m. OK GNU C++11 TESTS 54 15 0 2000
19579022 barriery A Aug. 2, 2016, 12:18 p.m. OK GNU C++11 TESTS 54 15 0 2000
19573363 vjudge4 A Aug. 2, 2016, 6:33 a.m. OK GNU C++11 TESTS 54 15 0 2000
19573339 soysoy A Aug. 2, 2016, 6:31 a.m. OK GNU C++11 TESTS 54 15 0 2000
19073856 DEGwer A July 13, 2016, 1:24 p.m. OK GNU C++11 TESTS 54 15 0 2000
18664167 A_Le_K A June 23, 2016, 1:08 p.m. OK GNU C++11 TESTS 54 15 0 2000
22653233 nanicode A Dec. 2, 2016, 7:13 a.m. OK GNU C++11 TESTS 54 15 0 2000
31735664 yaoshimax A Oct. 26, 2017, 10:54 a.m. OK GNU C++14 TESTS 54 15 0 2000
27207499 LiChenKoh A May 19, 2017, 4:24 a.m. OK GNU C++14 TESTS 54 15 0 2000
26834737 chaojidage A May 4, 2017, 12:49 p.m. OK GNU C++14 TESTS 54 15 0 2000
26833812 ZZZZone A May 4, 2017, 12:09 p.m. OK GNU C++14 TESTS 54 15 0 2000
22202533 mengxiang000 A Nov. 14, 2016, 5:05 a.m. OK GNU C++14 TESTS 54 15 0 2000
20315867 _Saitama_ A Sept. 1, 2016, 6:42 a.m. OK GNU C++14 TESTS 54 15 0 2000
31736397 kusano A Oct. 26, 2017, 11:21 a.m. OK GNU C++14 TESTS 54 15 0 2000
21866555 SaBuZa A Oct. 29, 2016, 8:01 a.m. OK GNU C++14 TESTS 54 15 102400 2000
30260963 Jester A Sept. 11, 2017, 7:41 a.m. OK GNU C++14 TESTS 54 15 102400 2000
31735792 Tayama A Oct. 26, 2017, 10:59 a.m. OK GNU C++14 TESTS 54 15 204800 2000
56854430 gyuni A July 11, 2019, 5:31 p.m. OK GNU C++17 TESTS 54 30 204800 2000
69234495 Trytrihjyuki A Jan. 21, 2020, 10:45 a.m. OK GNU C++17 TESTS 54 31 0 2000
60343163 ST_C A Sept. 10, 2019, 11:39 a.m. OK GNU C++17 TESTS 54 31 0 2000
59949668 yan.silva A Sept. 3, 2019, 2:06 p.m. OK GNU C++17 TESTS 54 31 0 2000
59539196 saurabh8522 A Aug. 26, 2019, 6:09 p.m. OK GNU C++17 TESTS 54 31 0 2000
59529073 saurabh8522 A Aug. 26, 2019, 2:23 p.m. OK GNU C++17 TESTS 54 31 0 2000
56020020 LeoRiether A June 25, 2019, 2:18 a.m. OK GNU C++17 TESTS 54 31 0 2000
47770250 failed_coder A Dec. 30, 2018, 8:25 p.m. OK GNU C++17 TESTS 54 31 0 2000
69887856 pranavg000 A Jan. 31, 2020, 8:53 a.m. OK GNU C++17 TESTS 54 31 0 2000
69451062 dontquit A Jan. 24, 2020, 6:14 a.m. OK GNU C++17 TESTS 54 31 102400 2000
6915576 Martynas A June 19, 2014, 3:51 p.m. OK Go TESTS 54 31 0 2000
6925130 choice A June 19, 2014, 9:57 p.m. OK Haskell TESTS 54 15 0 2000
6925163 choice A June 19, 2014, 10:09 p.m. OK Haskell TESTS 54 30 102400 2000
6925655 betaveros A June 20, 2014, 6:29 a.m. OK Haskell TESTS 54 31 0 2000
6925139 choice A June 19, 2014, 10 p.m. OK Haskell TESTS 54 31 0 2000
6924813 choice A June 19, 2014, 8:38 p.m. OK Haskell TESTS 54 31 0 2000
6962009 choice A June 26, 2014, 8:15 a.m. OK Haskell TESTS 54 46 102400 2000
6926346 Rotsor A June 20, 2014, 8:39 a.m. OK Haskell TESTS 54 62 102400 2000
15914409 not_bot_but_POT A Feb. 9, 2016, 1:44 p.m. OK Haskell TESTS 54 62 8499200 2000
6916490 xiaowuc1 A June 19, 2014, 4:03 p.m. OK Java 6 TESTS 54 77 102400 2000
6928504 mkirsche A June 20, 2014, 3:03 p.m. OK Java 6 TESTS 54 155 0 2000
11094716 wonjohn.choi A May 14, 2015, 4:08 a.m. OK Java 7 TESTS 54 77 0 2000
8069772 mukku A Oct. 3, 2014, 3:04 p.m. OK Java 7 TESTS 54 77 0 2000
7017075 Aker A July 5, 2014, 4:32 p.m. OK Java 7 TESTS 54 77 0 2000
6915952 vvenkai A June 19, 2014, 3:55 p.m. OK Java 7 TESTS 54 77 0 2000
6915690 Zyflair A June 19, 2014, 3:52 p.m. OK Java 7 TESTS 54 77 0 2000
8645407 chinh7 A Nov. 11, 2014, 5:09 a.m. OK Java 7 TESTS 54 77 102400 2000
6999910 yasser_adel A July 2, 2014, 10:25 p.m. OK Java 7 TESTS 54 78 0 2000
6942863 mostafa_fahim A June 22, 2014, 2:51 p.m. OK Java 7 TESTS 54 78 0 2000
6917658 Junior94 A June 19, 2014, 4:20 p.m. OK Java 7 TESTS 54 78 0 2000
7215869 katsukare A July 24, 2014, 11:13 a.m. OK Java 7 TESTS 54 92 0 2000
28060492 coderbond007 A June 26, 2017, 3:26 p.m. OK Java 8 TESTS 54 109 20582400 2000
10196820 Sumeet.Varma A March 7, 2015, 7:39 p.m. OK Java 8 TESTS 54 124 0 2000
28056140 coderbond007 A June 26, 2017, 11:18 a.m. OK Java 8 TESTS 54 124 20582400 2000
19744892 abhishek20113 A Aug. 9, 2016, 9:57 a.m. OK Java 8 TESTS 54 124 20787200 2000
41536114 KulikAlex A Aug. 12, 2018, 5:54 p.m. OK Java 8 TESTS 54 140 0 2000
11930830 PTNK13091996 A July 5, 2015, 4:26 a.m. OK Java 8 TESTS 54 140 0 2000
11130824 poikniok A May 18, 2015, 1:36 a.m. OK Java 8 TESTS 54 140 0 2000
38320113 Golmol A May 16, 2018, 12:07 p.m. OK Java 8 TESTS 54 140 20787200 2000
6914654 Egor A June 19, 2014, 3:39 p.m. OK Java 8 TESTS 54 155 0 2000
57949820 Dukkha A July 29, 2019, 3:56 p.m. OK Java 8 TESTS 54 170 0 2000
6925876 og.kostya A June 20, 2014, 7:11 a.m. OK MS C# TESTS 54 62 409600 2000
7947395 LLT A Sept. 25, 2014, 2:07 p.m. OK MS C# TESTS 54 62 2355200 2000
6937169 azukun A June 21, 2014, 11:59 a.m. OK MS C# TESTS 54 124 5427200 2000
22701927 sdya A Dec. 4, 2016, 7:02 p.m. OK MS C++ TESTS 54 15 0 2000
7202485 ai9128429340875 A July 22, 2014, 1:40 p.m. OK MS C++ TESTS 54 15 0 2000
7052636 sereja589 A July 9, 2014, 11:06 a.m. OK MS C++ TESTS 54 15 0 2000
7036008 sluki A July 6, 2014, 11:20 p.m. OK MS C++ TESTS 54 15 0 2000
7018926 AcmerArthur A July 6, 2014, 2:52 a.m. OK MS C++ TESTS 54 15 0 2000
6992567 Awata A July 1, 2014, 2:38 p.m. OK MS C++ TESTS 54 15 0 2000
6984477 olpetOdessaONU A June 30, 2014, 7:50 a.m. OK MS C++ TESTS 54 15 0 2000
6979215 Roms A June 29, 2014, 8:54 a.m. OK MS C++ TESTS 54 15 0 2000
6950978 DmitriyH A June 24, 2014, 6:31 a.m. OK MS C++ TESTS 54 15 0 2000
6948250 Eran A June 23, 2014, 3:23 p.m. OK MS C++ TESTS 54 15 0 2000
7302103 ovidiu A July 31, 2014, 7:32 p.m. OK Python 2 TESTS 54 46 102400 2000
9183805 itytwt A Dec. 18, 2014, 7:50 a.m. OK Python 2 TESTS 54 62 0 2000
6992759 Luxo A July 1, 2014, 3:12 p.m. OK Python 2 TESTS 54 62 0 2000
6984647 ronaflx A June 30, 2014, 8:23 a.m. OK Python 2 TESTS 54 62 0 2000
7302090 ovidiu A July 31, 2014, 7:29 p.m. OK Python 2 TESTS 54 62 102400 2000
7110091 synapse A July 15, 2014, 2:48 p.m. OK Python 2 TESTS 54 62 204800 2000
6917287 vadym_doroshenko A June 19, 2014, 4:14 p.m. OK Python 2 TESTS 54 62 307200 2000
6938324 nealzane A June 21, 2014, 3:39 p.m. OK Python 2 TESTS 54 77 102400 2000
6929894 Stomach_ache A June 20, 2014, 5:35 p.m. OK Python 2 TESTS 54 77 921600 2000
6936761 nwi A June 21, 2014, 11:01 a.m. OK Python 2 TESTS 54 108 0 2000
6924012 choice A June 19, 2014, 6:30 p.m. OK Python 3 TESTS 54 77 0 2000
26992135 PeterYang A May 10, 2017, 8:15 a.m. OK Python 3 TESTS 54 77 307200 2000
32713970 yugle7 A Nov. 27, 2017, 12:05 p.m. OK Python 3 TESTS 54 77 5529600 2000
35872462 ______u______ A March 3, 2018, 7:10 a.m. OK Python 3 TESTS 54 77 5632000 2000
35872359 ______n______ A March 3, 2018, 7:10 a.m. OK Python 3 TESTS 54 77 5632000 2000
35871752 _____i_____ A March 3, 2018, 6:58 a.m. OK Python 3 TESTS 54 77 5632000 2000
35871615 _____k_____ A March 3, 2018, 6:53 a.m. OK Python 3 TESTS 54 77 5632000 2000
35862744 ______k______ A March 2, 2018, 10:31 p.m. OK Python 3 TESTS 54 77 5632000 2000
35862723 ______h______ A March 2, 2018, 10:31 p.m. OK Python 3 TESTS 54 77 5632000 2000
35862406 ______i______ A March 2, 2018, 10:25 p.m. OK Python 3 TESTS 54 77 5632000 2000
6924225 Magica A June 19, 2014, 6:53 p.m. OK Ruby TESTS 54 77 0 2000
7295577 zerozerograde A July 30, 2014, 10:06 p.m. OK Ruby TESTS 54 810 1228800 2000
7295558 zerozerograde A July 30, 2014, 10:01 p.m. OK Ruby TESTS 54 1138 1228800 2000
6935769 hama-du A June 21, 2014, 8:33 a.m. OK Scala TESTS 54 1013 409600 2000
6935507 hama-du A June 21, 2014, 8:01 a.m. OK Scala TESTS 54 1028 409600 2000

remove filters

Back to search problems