Codeforces Round 270

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
472 Codeforces Round 270 FINISHED False 9000 319904699 Sept. 28, 2014, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6366 ) C Design Tutorial: Make It Nondeterministic PROGRAMMING greedy 1400

B'A way to make a new task is to make it nondeterministic or probabilistic. For example, the hard task of Topcoder SRM 595, Constellation, is the probabilistic version of a convex hull. Let 's try to make a new task. Firstly we will use the following task. There are n people, sort them by their name. It is just an ordinary sorting problem, but we can make it more interesting by adding nondeterministic element. There are n people, each person will use either his/her first name or last name as a handle. Can the lexicographical order of the handles be exactly equal to the given permutation p? More formally, if we denote the handle of the i-th person as hi, then the following condition must hold: . The first line contains an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105) -- the number of people. The next n lines each contains two strings. The i-th line contains strings fi and si (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89|fi|, xe2 x80 x89|si| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950) -- the first name and last name of the i-th person. Each string consists only of lowercase English letters. All of the given 2n strings will be distinct. The next line contains n distinct integers: p1, xe2 x80 x89p2, xe2 x80 x89..., xe2 x80 x89pn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). If it is possible, output "YES", otherwise output "NO". In example 1 and 2, we have 3 people: tourist, Petr and me (cgy4ever). You can see that whatever handle is chosen, I must be the first, then tourist and Petr must be the last. In example 3, if Copernicus uses "copernicus" as his handle, everything will be alright.'...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
11507126 igdor99 C June 9, 2015, 9:36 a.m. OK FPC TESTS 65 139 14336000 1400
9812741 Glaceon08 C Feb. 13, 2015, 1:51 a.m. OK FPC TESTS 65 140 35225600 1400
10053027 Valerich C Feb. 27, 2015, 2:32 p.m. OK FPC TESTS 65 155 15052800 1400
20281842 ice_tea C Aug. 30, 2016, 2:03 p.m. OK FPC TESTS 65 685 25907200 1400
52225747 chaorenhaha C April 2, 2019, 9:21 a.m. OK FPC TESTS 65 1279 20480000 1400
9340221 PieceOfCode C Jan. 1, 2015, 4:15 p.m. OK GNU C TESTS 65 139 11059200 1400
35314694 rainboy C Feb. 15, 2018, 4:28 p.m. OK GNU C TESTS 65 139 14745600 1400
11237290 four C May 23, 2015, 11:15 a.m. OK GNU C TESTS 65 140 10240000 1400
15465522 norhh C Jan. 21, 2016, 8:49 a.m. OK GNU C TESTS 65 140 21196800 1400
29503953 prabhakaran9397 C Aug. 16, 2017, 11:40 a.m. OK GNU C TESTS 65 155 10547200 1400
13241586 deathcoder123 shubham_43 vaishal3 C Sept. 26, 2015, 7:56 p.m. OK GNU C TESTS 65 155 10649600 1400
11315053 emptyshow C May 27, 2015, 7:37 a.m. OK GNU C TESTS 65 155 10649600 1400
12886373 vjudge4 C Sept. 7, 2015, 3:23 p.m. OK GNU C TESTS 65 155 10854400 1400
18608640 Rizro C June 20, 2016, 4:29 a.m. OK GNU C TESTS 65 155 11980800 1400
13298772 robin_0 C Sept. 29, 2015, 1:51 p.m. OK GNU C TESTS 65 155 12390400 1400
40987857 ReaLNero1 C July 30, 2018, 9:32 p.m. OK GNU C++ TESTS 65 93 13004800 1400
10394754 vjudge1 C March 22, 2015, 7:54 a.m. OK GNU C++ TESTS 65 124 10854400 1400
13542019 Mi7ky C Oct. 11, 2015, 7:18 a.m. OK GNU C++ TESTS 65 124 12390400 1400
9290131 sha384 C Dec. 28, 2014, 10 a.m. OK GNU C++ TESTS 65 124 16281600 1400
12620307 OmaeWaMouShenDeiru C Aug. 20, 2015, 8:02 p.m. OK GNU C++ TESTS 65 139 11059200 1400
13298791 vjudge5 C Sept. 29, 2015, 1:52 p.m. OK GNU C++ TESTS 65 139 12185600 1400
16253497 vjudge2 C Feb. 21, 2016, 3:28 a.m. OK GNU C++ TESTS 65 139 12185600 1400
19272419 Yokile_cc C July 20, 2016, 6:57 a.m. OK GNU C++ TESTS 65 139 12390400 1400
11590512 OrzNotDeep C June 15, 2015, 5:06 a.m. OK GNU C++ TESTS 65 139 12390400 1400
20138953 after C Aug. 24, 2016, 10:23 p.m. OK GNU C++ TESTS 65 139 13516800 1400
9349374 ranasaha C Jan. 3, 2015, 12:01 a.m. OK GNU C++0x TESTS 65 140 16179200 1400
9290888 sokian C Dec. 28, 2014, 11:55 a.m. OK GNU C++0x TESTS 65 140 16179200 1400
9226362 tejas.pandey C Dec. 22, 2014, 5:13 p.m. OK GNU C++0x TESTS 65 140 16179200 1400
9777326 alamagus C Feb. 9, 2015, 6:16 a.m. OK GNU C++0x TESTS 65 202 10240000 1400
9509301 Xellos C Jan. 23, 2015, 8:18 a.m. OK GNU C++0x TESTS 65 217 16179200 1400
10248613 CoderMr C March 12, 2015, 2:56 p.m. OK GNU C++0x TESTS 65 264 16384000 1400
9784772 u128 C Feb. 10, 2015, 12:25 a.m. OK GNU C++0x TESTS 65 265 18534400 1400
10329578 RedStone C March 17, 2015, 8:36 p.m. OK GNU C++0x TESTS 65 296 21708800 1400
10197992 jayanto C March 7, 2015, 9:09 p.m. OK GNU C++0x TESTS 65 342 16588800 1400
10150439 CMaster C March 4, 2015, 3:56 p.m. OK GNU C++0x TESTS 65 358 19148800 1400
62584188 kaiboy C Oct. 14, 2019, 6:12 p.m. OK GNU C11 TESTS 65 124 10240000 1400
12886457 protick666 C Sept. 7, 2015, 3:29 p.m. OK GNU C11 TESTS 65 139 10854400 1400
56303587 strawberrry C June 30, 2019, 10:23 a.m. OK GNU C++11 TESTS 65 124 11468800 1400
12887659 smjlord068 C Sept. 7, 2015, 5:02 p.m. OK GNU C++11 TESTS 65 140 10649600 1400
12062872 bagpipe C July 15, 2015, 12:37 a.m. OK GNU C++11 TESTS 65 140 11264000 1400
10617121 Ra1nWarden C April 6, 2015, 11:32 p.m. OK GNU C++11 TESTS 65 140 11264000 1400
11193361 vjudge5 C May 21, 2015, 5:31 p.m. OK GNU C++11 TESTS 65 140 12288000 1400
10840186 ITDOI C April 23, 2015, 7:05 p.m. OK GNU C++11 TESTS 65 140 13312000 1400
16978259 Gasser C March 27, 2016, 7:48 p.m. OK GNU C++11 TESTS 65 140 14233600 1400
26347303 Reference C April 13, 2017, 8:51 p.m. OK GNU C++11 TESTS 65 140 14950400 1400
20370969 wesam_adel C Sept. 3, 2016, 9:22 p.m. OK GNU C++11 TESTS 65 140 17612800 1400
12017088 this_is_me C July 12, 2015, 9:17 a.m. OK GNU C++11 TESTS 65 140 102195200 1400
21737904 dattaKrupa C Oct. 24, 2016, 10:01 a.m. OK GNU C++14 TESTS 65 139 18432000 1400
25782012 paradox C March 24, 2017, 7:46 p.m. OK GNU C++14 TESTS 65 139 20582400 1400
28690820 machadianurag1996 C July 19, 2017, 8:44 a.m. OK GNU C++14 TESTS 65 140 12902400 1400
26675849 mengxiang000 C April 26, 2017, 4:47 a.m. OK GNU C++14 TESTS 65 140 14950400 1400
22632783 AMnu C Nov. 30, 2016, 10:58 p.m. OK GNU C++14 TESTS 65 140 18227200 1400
27428651 end83 C May 29, 2017, 12:03 p.m. OK GNU C++14 TESTS 65 140 18227200 1400
29905182 adityasingh.1397 C Aug. 30, 2017, 1:08 a.m. OK GNU C++14 TESTS 65 140 18227200 1400
31144842 asuma26 C Oct. 8, 2017, 1:06 p.m. OK GNU C++14 TESTS 65 140 18636800 1400
22632778 CodeTamer. C Nov. 30, 2016, 10:57 p.m. OK GNU C++14 TESTS 65 140 19046400 1400
34655215 __inceptor__ C Jan. 29, 2018, 8:20 a.m. OK GNU C++14 TESTS 65 140 20070400 1400
40738722 alireza_kaviani C July 25, 2018, 11:12 a.m. OK GNU C++17 TESTS 65 140 18227200 1400
35291925 SpeedOfMagic C Feb. 15, 2018, 12:28 p.m. OK GNU C++17 TESTS 65 140 20172800 1400
46920384 MoMo C Dec. 12, 2018, 4:02 a.m. OK GNU C++17 TESTS 65 155 18636800 1400
60477608 ruo C Sept. 13, 2019, 8:59 a.m. OK GNU C++17 TESTS 65 155 18636800 1400
39540412 yashnavingoyal C June 23, 2018, 11:47 a.m. OK GNU C++17 TESTS 65 155 29286400 1400
64543009 MhD88 C Nov. 8, 2019, 7:21 p.m. OK GNU C++17 TESTS 65 156 18227200 1400
49922235 lakshay_nasa C Feb. 14, 2019, 7:36 p.m. OK GNU C++17 TESTS 65 156 18636800 1400
45218534 prakharmath C Nov. 2, 2018, 7:24 p.m. OK GNU C++17 TESTS 65 156 19251200 1400
65545782 rogink13 C Nov. 22, 2019, 5:06 p.m. OK GNU C++17 TESTS 65 156 26624000 1400
42538243 zser C Sept. 6, 2018, 3:41 a.m. OK GNU C++17 TESTS 65 171 12697600 1400
13113573 Martynas C Sept. 20, 2015, 11:36 a.m. OK Go TESTS 65 187 16588800 1400
12306056 devilsanek C Aug. 1, 2015, 4:36 p.m. OK Go TESTS 65 218 18022400 1400
20375558 guzhoudiaoke C Sept. 4, 2016, 6:08 a.m. OK Go TESTS 65 218 18534400 1400
9508809 ackounts C Jan. 23, 2015, 7:09 a.m. OK Haskell TESTS 65 202 25190400 1400
10967194 itchyny C May 1, 2015, 5:58 p.m. OK Haskell TESTS 65 779 62976000 1400
10967203 itchyny C May 1, 2015, 5:59 p.m. OK Haskell TESTS 65 1231 77619200 1400
64433307 pizzaEater C Nov. 6, 2019, 11:02 p.m. OK Java 11 TESTS 65 842 32051200 1400
63352687 sabinkim73 C Oct. 24, 2019, 11:26 p.m. OK Java 11 TESTS 65 872 32460800 1400
9294399 xiaowuc1 C Dec. 28, 2014, 9:56 p.m. OK Java 6 TESTS 65 420 40243200 1400
9357107 TranCongDuy C Jan. 4, 2015, 2:55 a.m. OK Java 6 TESTS 65 452 41369600 1400
11457863 KOPOBA C June 6, 2015, 11:50 a.m. OK Java 7 TESTS 65 249 44236800 1400
10629872 Sumeet.Varma C April 8, 2015, 11:56 a.m. OK Java 7 TESTS 65 249 45465600 1400
9607852 vilcheuski C Jan. 28, 2015, 8:30 p.m. OK Java 7 TESTS 65 264 45670400 1400
9366231 LuuNhatPhi C Jan. 5, 2015, 2:06 p.m. OK Java 7 TESTS 65 264 46592000 1400
9671653 alex_y C Feb. 2, 2015, 3:49 a.m. OK Java 7 TESTS 65 265 41062400 1400
10814331 Pussy_penetrator C April 21, 2015, 6:17 p.m. OK Java 7 TESTS 65 265 93491200 1400
9430215 Badry C Jan. 14, 2015, 3:51 p.m. OK Java 7 TESTS 65 280 47206400 1400
9430208 Atef258 C Jan. 14, 2015, 3:50 p.m. OK Java 7 TESTS 65 280 47206400 1400
9357299 Yeison_Garcia C Jan. 4, 2015, 4:03 a.m. OK Java 7 TESTS 65 296 42496000 1400
13104397 yushixh C Sept. 19, 2015, 3:51 p.m. OK Java 7 TESTS 65 296 47820800 1400
46209033 zodiacleo C Nov. 25, 2018, 4:12 p.m. OK Java 8 TESTS 65 280 32768000 1400
63352218 CloudyDino C Oct. 24, 2019, 10:54 p.m. OK Java 8 TESTS 65 280 37068800 1400
46209257 zodiacleo C Nov. 25, 2018, 4:22 p.m. OK Java 8 TESTS 65 280 37785600 1400
12414885 Ahmad_Elsagheer C Aug. 8, 2015, 1:15 p.m. OK Java 8 TESTS 65 280 46182400 1400
12115561 2468 C July 19, 2015, 10:37 a.m. OK Java 8 TESTS 65 295 40960000 1400
55557731 ronaldocr7 C June 14, 2019, 10:51 a.m. OK Java 8 TESTS 65 296 31641600 1400
44332656 ShowStopper728 C Oct. 14, 2018, 7:13 p.m. OK Java 8 TESTS 65 296 31744000 1400
11775635 blackhorse21 C June 26, 2015, 5:59 p.m. OK Java 8 TESTS 65 296 33792000 1400
48712568 vikashkumarbissu C Jan. 22, 2019, 9:20 a.m. OK Java 8 TESTS 65 296 37683200 1400
9422931 Spacejoker C Jan. 13, 2015, 11:14 a.m. OK Java 8 TESTS 65 296 40960000 1400
69074236 mban259 C Jan. 19, 2020, 1:40 a.m. OK Mono C# TESTS 65 420 34304000 1400
50896554 nemars C March 6, 2019, 3:20 p.m. OK Mono C# TESTS 65 436 40448000 1400
11016557 bonem C May 6, 2015, 8:48 p.m. OK Mono C# TESTS 65 982 40038400 1400
11360296 sicon54 C May 30, 2015, 7:28 p.m. OK MS C# TESTS 65 389 41574400 1400
16760773 Arcey C March 17, 2016, 9:40 a.m. OK MS C# TESTS 65 452 34508800 1400
21788975 pomjuice C Oct. 26, 2016, 7:36 a.m. OK MS C# TESTS 65 499 40140800 1400
28900374 balalaika C July 26, 2017, 9:43 a.m. OK MS C# TESTS 65 561 53350400 1400
18539279 ARMy C June 17, 2016, 8:45 a.m. OK MS C# TESTS 65 623 36147200 1400
20322296 Chubcheg C Sept. 1, 2016, 1:02 p.m. OK MS C# TESTS 65 1185 42905600 1400
16260447 vjudge1 C Feb. 21, 2016, 2:20 p.m. OK MS C++ TESTS 65 124 10240000 1400
16259256 Tes_peach C Feb. 21, 2016, 1:16 p.m. OK MS C++ TESTS 65 124 10240000 1400
16270381 vjudge2 C Feb. 22, 2016, 3:13 a.m. OK MS C++ TESTS 65 124 10240000 1400
24610705 vjudge4 C Feb. 12, 2017, 2:31 p.m. OK MS C++ TESTS 65 124 14131200 1400
12738634 Yunir C Aug. 29, 2015, 5:31 a.m. OK MS C++ TESTS 65 140 12083200 1400
15851548 ACTY C Feb. 7, 2016, 1:09 a.m. OK MS C++ TESTS 65 156 22425600 1400
16253353 wzm C Feb. 21, 2016, 3:08 a.m. OK MS C++ TESTS 65 249 18432000 1400
11588319 M.Bani_Ahmad C June 14, 2015, 9:41 p.m. OK MS C++ TESTS 65 265 21401600 1400
11588335 M.Bani_Ahmad C June 14, 2015, 9:45 p.m. OK MS C++ TESTS 65 265 21401600 1400
14929485 FLEXer C Dec. 22, 2015, 6:50 p.m. OK MS C++ TESTS 65 265 22323200 1400
58236572 IbraheemJanajreh C Aug. 3, 2019, 7:57 p.m. OK MS C++ 2017 TESTS 65 327 20992000 1400
62363877 CtrlAlt C Oct. 11, 2019, 1:16 p.m. OK MS C++ 2017 TESTS 65 343 20992000 1400
35873767 _____i_____ C March 3, 2018, 7:37 a.m. OK Perl TESTS 65 234 33894400 1400
35874633 ______u______ C March 3, 2018, 7:57 a.m. OK Perl TESTS 65 234 33894400 1400
35874450 ______n______ C March 3, 2018, 7:51 a.m. OK Perl TESTS 65 234 33894400 1400
35873915 _____k_____ C March 3, 2018, 7:40 a.m. OK Perl TESTS 65 234 33894400 1400
35870339 ______h______ C March 3, 2018, 6:28 a.m. OK Perl TESTS 65 234 33894400 1400
35870333 ______k______ C March 3, 2018, 6:28 a.m. OK Perl TESTS 65 234 33894400 1400
35864106 ______i______ C March 2, 2018, 11:01 p.m. OK Perl TESTS 65 234 33894400 1400
35862638 ______M______ C March 2, 2018, 10:30 p.m. OK Perl TESTS 65 249 33894400 1400
12729969 mayakin C Aug. 28, 2015, 10:42 a.m. OK PHP TESTS 65 311 42188800 1400
32858176 Yash_ C Dec. 2, 2017, 12:44 p.m. OK PyPy 2 TESTS 65 436 45875200 1400
14013783 mirs C Nov. 1, 2015, 7:13 p.m. OK PyPy 2 TESTS 65 452 24985600 1400
17307811 Grevozin C April 13, 2016, 8:55 p.m. OK PyPy 2 TESTS 65 467 27136000 1400
20485045 dsharma080 C Sept. 9, 2016, 7:07 p.m. OK PyPy 2 TESTS 65 467 36352000 1400
39633298 sasasagagaga C June 24, 2018, 10:09 p.m. OK PyPy 2 TESTS 65 483 24780800 1400
14675705 kfx C Dec. 6, 2015, 12:48 p.m. OK PyPy 2 TESTS 65 483 29081600 1400
23275567 Trunks C Dec. 24, 2016, 4:25 p.m. OK PyPy 2 TESTS 65 499 46284800 1400
11532975 fuzzz3r C June 11, 2015, 12:29 p.m. OK PyPy 2 TESTS 65 530 24985600 1400
11086330 Dremov C May 13, 2015, 8:02 a.m. OK PyPy 2 TESTS 65 1216 31744000 1400
62525110 lIn_nIl C Oct. 13, 2019, 5:03 p.m. OK PyPy 3 TESTS 65 1372 35635200 1400
50209066 osoblanco C Feb. 19, 2019, 9:20 p.m. OK PyPy 3 TESTS 65 1388 56217600 1400
9486115 vovaminiof C Jan. 20, 2015, 4:11 p.m. OK Python 2 TESTS 65 342 26828800 1400
11057240 a2linx C May 9, 2015, 6:30 p.m. OK Python 2 TESTS 65 342 30208000 1400
17809338 slitvinov C May 8, 2016, 2:54 p.m. OK Python 2 TESTS 65 342 32870400 1400
12556847 abear888 C Aug. 16, 2015, 7:35 a.m. OK Python 2 TESTS 65 343 27033600 1400
26832208 drj_reddy C May 4, 2017, 10:32 a.m. OK Python 2 TESTS 65 358 22528000 1400
12158127 Deshwal C July 22, 2015, 5:17 a.m. OK Python 2 TESTS 65 373 27852800 1400
9195900 Lei_Xufei C Dec. 19, 2014, 11:18 a.m. OK Python 2 TESTS 65 373 30208000 1400
9621430 vjudge1 C Jan. 30, 2015, 1:56 a.m. OK Python 2 TESTS 65 373 31744000 1400
25347757 aapc_chuck C March 8, 2017, 6:34 p.m. OK Python 2 TESTS 65 373 36044800 1400
34192417 laoliumang C Jan. 15, 2018, 8:54 a.m. OK Python 2 TESTS 65 373 37068800 1400
40773885 orailly C July 26, 2018, 10:08 a.m. OK Python 3 TESTS 65 311 32665600 1400
47521241 jaaguptamme C Dec. 26, 2018, 1:11 p.m. OK Python 3 TESTS 65 389 18636800 1400
65029422 Annvv C Nov. 15, 2019, 9:13 a.m. OK Python 3 TESTS 65 436 35532800 1400
9815340 GogolGrind C Feb. 13, 2015, 11:20 a.m. OK Python 3 TESTS 65 467 30515200 1400
33592315 zhukm1227 C Dec. 24, 2017, 11:59 a.m. OK Python 3 TESTS 65 467 38297600 1400
27555450 gri C June 4, 2017, 4:32 a.m. OK Python 3 TESTS 65 468 34508800 1400
16646308 SilverVoo C March 11, 2016, 10:20 a.m. OK Python 3 TESTS 65 483 28364800 1400
10421893 ving.xia C March 24, 2015, 11:20 a.m. OK Python 3 TESTS 65 483 31744000 1400
10421872 ving.xia C March 24, 2015, 11:17 a.m. OK Python 3 TESTS 65 498 31334400 1400
55432205 Mohamed_Ayman C June 11, 2019, noon OK Python 3 TESTS 65 498 33075200 1400
11338405 tkain C May 28, 2015, 7:55 p.m. OK Ruby TESTS 65 1310 39833600 1400
11336943 tkain C May 28, 2015, 6:16 p.m. OK Ruby TESTS 65 1340 40960000 1400
11704044 lydxlx C June 22, 2015, 2:49 a.m. OK Scala TESTS 65 514 45056000 1400
13024126 reldan C Sept. 16, 2015, 2:16 p.m. OK Scala TESTS 65 514 51814400 1400
24542668 techaddict C Feb. 9, 2017, 6:38 a.m. OK Scala TESTS 65 639 55910400 1400

remove filters

Back to search problems