Codeforces Round 306 (Div. 2)

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
550 Codeforces Round 306 (Div. 2) FINISHED False 7200 342970223 June 4, 2015, 4:30 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1498 ) E Brackets in Implications PROGRAMMING constructive algorithms greedy implementation math 2300

Implication is a function of two logical arguments, its value is false if and only if the value of the first argument is true and the value of the second argument is false. Implication is written by using character ' ', and the arguments and the result of the implication are written as ' 0 ' ( false ) and ' 1 ' ( true ). According to the definition of the implication: When a logical expression contains multiple implications, then when there are no brackets, it will be calculated from left to fight. For example, . When there are brackets, we first calculate the expression in brackets. For example, . For the given logical expression determine if it is possible to place there brackets so that the value of a logical expression is false. If it is possible, your task is to find such an arrangement of brackets. The first line contains integer n ( 1 ≤ n ≤ 100 000 ) — the number of arguments in a logical expression. The second line contains n numbers a 1 , a 2 , ..., a n ( ), which means the values of arguments in the expression in the order they occur. Print " NO " (without the quotes), if it is impossible to place brackets in the expression so that its value was equal to 0. Otherwise, print " YES " in the first line and the logical expression with the required arrangement of brackets in the second line. The expression should only contain characters ' 0 ', ' 1 ', ' - ' (character with ASCII code 45), ' > ' (character with ASCII code 62), ' ( ' and ' ) '. Characters ' - ' and ' > ' can occur in an expression only paired like that: (" -> ") and represent implication. The total number of logical arguments (i.e. digits ' 0 ' and ' 1 ') in the expression must be equal to n . The order in which the digits follow in the expression from left to right must coincide with a 1 , a 2 , ..., a n . The expression should be correct . More formally, a correct expression is determined as follows: Expressions " 0 ", " 1 " (without the quotes) are correct. If v 1 , v 2 are correct, t

Tutorials

Codeforces Round #306 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41466893 jangjie E Aug. 11, 2018, 11:31 a.m. OK GNU C++ TESTS 140 46 1228800 2300
40986511 ReaLNero1 E July 30, 2018, 8:35 p.m. OK GNU C++ TESTS 140 46 1433600 2300
37635869 bojverdict2 E April 26, 2018, 12:37 p.m. OK GNU C++ TESTS 140 46 3891200 2300
37480343 vjudge5 E April 20, 2018, 8:05 a.m. OK GNU C++ TESTS 140 46 4198400 2300
37637292 bojverdict2 E April 26, 2018, 1:14 p.m. OK GNU C++ TESTS 140 46 4915200 2300
37549550 foyaz05 E April 23, 2018, 11:41 a.m. OK GNU C++ TESTS 140 46 5939200 2300
37634535 bojverdict1 E April 26, 2018, 12:01 p.m. OK GNU C++ TESTS 140 46 7577600 2300
37656136 bojverdict1 E April 27, 2018, 9:48 a.m. OK GNU C++ TESTS 140 61 4198400 2300
35787971 vjudge4 E Feb. 28, 2018, 2:32 p.m. OK GNU C++ TESTS 140 62 2560000 2300
37656185 bojverdict2 E April 27, 2018, 9:49 a.m. OK GNU C++ TESTS 140 62 4198400 2300
60409439 rainboy E Sept. 11, 2019, 8:27 p.m. OK GNU C11 TESTS 140 670 716800 2300
50072819 a1s3a E Feb. 17, 2019, 6:52 p.m. OK GNU C++11 TESTS 140 46 409600 2300
50485386 woshimolei E Feb. 25, 2019, 11:18 a.m. OK GNU C++11 TESTS 140 46 409600 2300
35788066 wangcwc E Feb. 28, 2018, 2:35 p.m. OK GNU C++11 TESTS 140 46 2560000 2300
43682906 _iconer_ E Oct. 2, 2018, 11:08 a.m. OK GNU C++11 TESTS 140 46 2560000 2300
43494196 luogu_bot3 E Sept. 27, 2018, 1:55 p.m. OK GNU C++11 TESTS 140 46 3993600 2300
37655197 MDK_L E April 27, 2018, 9:12 a.m. OK GNU C++11 TESTS 140 46 7782400 2300
63987402 luogu_bot1 E Nov. 1, 2019, 12:11 p.m. OK GNU C++11 TESTS 140 61 204800 2300
52774208 cheetose E April 15, 2019, 11:05 a.m. OK GNU C++11 TESTS 140 61 409600 2300
50496095 jkklyy E Feb. 25, 2019, 3:14 p.m. OK GNU C++11 TESTS 140 61 409600 2300
61987373 zuhiul E Oct. 6, 2019, 1:59 p.m. OK GNU C++11 TESTS 140 61 409600 2300
62970501 BadBot E Oct. 20, 2019, 6:44 a.m. OK GNU C++14 TESTS 140 46 409600 2300
50493349 pavlej E Feb. 25, 2019, 2:10 p.m. OK GNU C++14 TESTS 140 46 409600 2300
68344323 animeFORever E Jan. 7, 2020, 6:17 a.m. OK GNU C++14 TESTS 140 46 409600 2300
50427308 Sprdalo E Feb. 24, 2019, 12:13 p.m. OK GNU C++14 TESTS 140 46 819200 2300
69892122 minyzero E Jan. 31, 2020, 10:24 a.m. OK GNU C++14 TESTS 140 46 819200 2300
47605550 nitishk24 E Dec. 28, 2018, 4:25 a.m. OK GNU C++14 TESTS 140 46 1228800 2300
57312989 Arg_007 E July 19, 2019, 7:11 a.m. OK GNU C++14 TESTS 140 46 1945600 2300
35765386 waynetuinfor E Feb. 27, 2018, 2:23 p.m. OK GNU C++14 TESTS 140 46 2252800 2300
34648787 akaiNeko E Jan. 29, 2018, 3:33 a.m. OK GNU C++14 TESTS 140 46 2252800 2300
35765379 waynetuinfor E Feb. 27, 2018, 2:23 p.m. OK GNU C++14 TESTS 140 46 2355200 2300
69212488 limabeans E Jan. 20, 2020, 8:55 p.m. OK GNU C++17 TESTS 140 46 307200 2300
69575174 Yuki726 E Jan. 26, 2020, 3:19 p.m. OK GNU C++17 TESTS 140 46 409600 2300
65244218 ruo E Nov. 17, 2019, 9:46 a.m. OK GNU C++17 TESTS 140 46 409600 2300
63987327 realSpongeBob E Nov. 1, 2019, 12:09 p.m. OK GNU C++17 TESTS 140 46 409600 2300
53440103 lmiskiew E April 27, 2019, 10:48 p.m. OK GNU C++17 TESTS 140 46 409600 2300
51888006 mohammadrobot E March 27, 2019, 7:32 a.m. OK GNU C++17 TESTS 140 46 409600 2300
50479492 zpr E Feb. 25, 2019, 8:09 a.m. OK GNU C++17 TESTS 140 46 409600 2300
40470432 Martin53 E July 17, 2018, 9:09 a.m. OK GNU C++17 TESTS 140 46 409600 2300
50426157 KlzX E Feb. 24, 2019, 11:38 a.m. OK GNU C++17 TESTS 140 46 1433600 2300
69720839 wladw E Jan. 29, 2020, 10:35 a.m. OK GNU C++17 TESTS 140 46 1638400 2300
60410640 SecondThread E Sept. 11, 2019, 9:16 p.m. OK Java 8 TESTS 140 140 0 2300
39458683 mariem_kandil E June 21, 2018, 10:28 a.m. OK Java 8 TESTS 140 155 0 2300
39521941 Ahmad_Elsagheer E June 22, 2018, 4:20 p.m. OK Java 8 TESTS 140 156 0 2300
36754549 PrakharJain E March 30, 2018, 5:10 p.m. OK Java 8 TESTS 140 156 20684800 2300
39462440 Hoda_Hisham E June 21, 2018, 12:47 p.m. OK Java 8 TESTS 140 171 0 2300
39438197 Nesrin E June 20, 2018, 2:13 p.m. OK Java 8 TESTS 140 171 0 2300
60409438 Dukkha E Sept. 11, 2019, 8:27 p.m. OK Java 8 TESTS 140 249 0 2300
34462039 isofew E Jan. 22, 2018, 10:43 p.m. OK Java 8 TESTS 140 280 21196800 2300
42557449 Sarah_Abdelkhalek E Sept. 6, 2018, 2:51 p.m. OK Java 8 TESTS 140 326 0 2300
60410603 SecondThread E Sept. 11, 2019, 9:15 p.m. OK Java 8 TESTS 140 748 0 2300
60680560 Eva E Sept. 16, 2019, 1:48 p.m. OK Kotlin TESTS 140 171 614400 2300
50479507 vjudge1 E Feb. 25, 2019, 8:09 a.m. OK MS C++ TESTS 140 46 409600 2300
35887559 ______u______ E March 3, 2018, 2:06 p.m. OK Perl TESTS 140 46 4608000 2300
35887550 ______n______ E March 3, 2018, 2:06 p.m. OK Perl TESTS 140 46 4608000 2300
35887151 _____k_____ E March 3, 2018, 1:59 p.m. OK Perl TESTS 140 46 4608000 2300
35886187 _____i_____ E March 3, 2018, 1:42 p.m. OK Perl TESTS 140 46 4608000 2300
35875337 ______h______ E March 3, 2018, 8:15 a.m. OK Perl TESTS 140 46 4608000 2300
35875099 ______k______ E March 3, 2018, 8:08 a.m. OK Perl TESTS 140 46 4608000 2300
35874635 ______i______ E March 3, 2018, 7:57 a.m. OK Perl TESTS 140 46 4608000 2300
35872981 ______M______ E March 3, 2018, 7:22 a.m. OK Perl TESTS 140 46 4608000 2300
66021804 augurar E Nov. 30, 2019, 7:35 a.m. OK PyPy 3 TESTS 140 374 13926400 2300
67060480 NocturneBflat E Dec. 17, 2019, 8:50 a.m. OK Python 3 TESTS 140 218 10137600 2300

remove filters

Back to search problems