Codeforces Round 197 (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
339 Codeforces Round 197 (Div. 2) FINISHED False 7200 359908187 Aug. 26, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8388 ) C Xenia and Weights PROGRAMMING constructive algorithms dfs and similar dp graphs greedy shortest paths 1700

B'Xenia has a set of weights and pan scales. Each weight has an integer weight from 1 to 10 kilos. Xenia is going to play with scales and weights a little. For this, she puts weights on the scalepans, one by one. The first weight goes on the left scalepan, the second weight goes on the right scalepan, the third one goes on the left scalepan, the fourth one goes on the right scalepan and so on. Xenia wants to put the total of m weights on the scalepans. Simply putting weights on the scales is not interesting, so Xenia has set some rules. First, she does not put on the scales two consecutive weights of the same weight. That is, the weight that goes i-th should be different from the (i xe2 x80 x89+ xe2 x80 x891)-th weight for any i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89< xe2 x80 x89m). Second, every time Xenia puts a weight on some scalepan, she wants this scalepan to outweigh the other one. That is, the sum of the weights on the corresponding scalepan must be strictly greater than the sum on the other pan. You are given all types of weights available for Xenia. You can assume that the girl has an infinite number of weights of each specified type. Your task is to help Xenia lay m weights on xe2 x80 x8b xe2 x80 x8bthe scales or to say that it can 't be done. The first line contains a string consisting of exactly ten zeroes and ones: the i-th (i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x891) character in the line equals "1" if Xenia has i kilo weights, otherwise the character equals "0". The second line contains integer m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). In the first line print "YES", if there is a way to put m weights on the scales by all rules. Otherwise, print in the first line "NO". If you can put m weights on the scales, then print in the next line m integers -- the weights ' weights in the order you put them on the scales. If there are multiple solutions, you can print any of them.'...

Tutorials

Codeforces Round #197 — Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51158759 aditya_sheth C March 11, 2019, 11:23 a.m. OK Clang++17 Diagnostics TESTS 40 62 24473600 1700
55584962 chaorenhaha C June 15, 2019, 8:58 a.m. OK FPC TESTS 40 31 102400 1700
55857529 chaorenhaha C June 21, 2019, 7:46 a.m. OK FPC TESTS 40 31 1024000 1700
58541471 rainboy C Aug. 10, 2019, 2:24 p.m. OK GNU C11 TESTS 40 31 102400 1700
47871406 ahmed_sobhy C Jan. 3, 2019, 1:04 p.m. OK GNU C++11 TESTS 40 30 0 1700
49182800 vjudge3 C Jan. 30, 2019, 3:24 a.m. OK GNU C++11 TESTS 40 30 102400 1700
56745521 vjudge5 C July 9, 2019, 9:31 a.m. OK GNU C++11 TESTS 40 30 102400 1700
49987039 Shutterbug C Feb. 16, 2019, 11:01 a.m. OK GNU C++11 TESTS 40 30 102400 1700
54641088 ankita24 C May 25, 2019, 7:33 p.m. OK GNU C++11 TESTS 40 30 716800 1700
69251948 _Binary_Search_ C Jan. 21, 2020, 2:33 p.m. OK GNU C++11 TESTS 40 31 0 1700
69068881 yagmur C Jan. 18, 2020, 8:10 p.m. OK GNU C++11 TESTS 40 31 0 1700
66386908 5_se7n C Dec. 6, 2019, 7:49 a.m. OK GNU C++11 TESTS 40 31 0 1700
62968361 red_coder21 C Oct. 20, 2019, 5:51 a.m. OK GNU C++11 TESTS 40 31 0 1700
60387741 DetectivePeralta C Sept. 11, 2019, 12:09 p.m. OK GNU C++11 TESTS 40 31 0 1700
50796835 Fahim_Ahmed_Shojib C March 4, 2019, 7:07 p.m. OK GNU C++14 TESTS 40 15 102400 1700
57354075 _4C3_ C July 20, 2019, 5:23 a.m. OK GNU C++14 TESTS 40 15 102400 1700
55927365 niranjanens16 C June 22, 2019, 9:55 a.m. OK GNU C++14 TESTS 40 15 102400 1700
55489824 tanmay2904 C June 12, 2019, 9:36 a.m. OK GNU C++14 TESTS 40 15 102400 1700
53096210 himanshu C April 21, 2019, 1:40 p.m. OK GNU C++14 TESTS 40 15 102400 1700
48941787 natha C Jan. 25, 2019, 4:55 p.m. OK GNU C++14 TESTS 40 15 102400 1700
47546203 hritvi C Dec. 27, 2018, 10:18 a.m. OK GNU C++14 TESTS 40 15 102400 1700
53565371 dungenmaster84 C April 30, 2019, 12:08 p.m. OK GNU C++14 TESTS 40 15 204800 1700
48171848 rdd6584 C Jan. 10, 2019, 7:13 a.m. OK GNU C++14 TESTS 40 15 307200 1700
57089323 Admiral_Wolf C July 15, 2019, 10:07 a.m. OK GNU C++14 TESTS 40 15 307200 1700
60276052 mia_ortizma C Sept. 8, 2019, 5:52 p.m. OK GNU C++17 TESTS 40 15 0 1700
54225737 codeict C May 16, 2019, 6:11 a.m. OK GNU C++17 TESTS 40 15 102400 1700
52764247 AMosa3d C April 15, 2019, 12:58 a.m. OK GNU C++17 TESTS 40 15 102400 1700
51993250 laplace_3 C March 29, 2019, 10 p.m. OK GNU C++17 TESTS 40 15 102400 1700
51486773 ish.ranga11 C March 19, 2019, 1:52 p.m. OK GNU C++17 TESTS 40 15 102400 1700
53957579 Ram_Newton C May 10, 2019, 12:34 p.m. OK GNU C++17 TESTS 40 15 102400 1700
59628903 patelaman C Aug. 28, 2019, 5:12 p.m. OK GNU C++17 TESTS 40 15 102400 1700
58118969 maximum2000 C Aug. 1, 2019, 9:55 a.m. OK GNU C++17 TESTS 40 15 102400 1700
57585634 vjudge1 C July 23, 2019, 10:31 a.m. OK GNU C++17 TESTS 40 15 102400 1700
60266931 Machado C Sept. 8, 2019, 1:47 p.m. OK GNU C++17 TESTS 40 15 204800 1700
68137750 sunnycarlos C Jan. 3, 2020, 7:50 p.m. OK Java 11 TESTS 40 202 0 1700
66267917 Oom C Dec. 4, 2019, 11:13 a.m. OK Java 8 TESTS 40 109 0 1700
66990648 adarsh000321 C Dec. 15, 2019, 8:11 p.m. OK Java 8 TESTS 40 109 0 1700
47172677 jenish9599 C Dec. 17, 2018, 3:51 p.m. OK Java 8 TESTS 40 109 0 1700
68229558 alireza_sh C Jan. 5, 2020, 8:39 a.m. OK Java 8 TESTS 40 124 0 1700
65764745 gouh9qn C Nov. 26, 2019, 5:23 p.m. OK Java 8 TESTS 40 124 0 1700
64896937 NMouad21 C Nov. 14, 2019, 5:02 p.m. OK Java 8 TESTS 40 124 0 1700
63681017 AhmedZ C Oct. 28, 2019, 7:59 p.m. OK Java 8 TESTS 40 124 0 1700
63501499 insane_28 C Oct. 26, 2019, 5:21 p.m. OK Java 8 TESTS 40 124 0 1700
62956726 johnny16 C Oct. 19, 2019, 8:54 p.m. OK Java 8 TESTS 40 124 0 1700
62169065 sonusingh.nitaa C Oct. 8, 2019, 10:40 p.m. OK Java 8 TESTS 40 124 0 1700
51870734 nemars C March 26, 2019, 5:15 p.m. OK Mono C# TESTS 40 109 6758400 1700
52312984 vjudge5 C April 4, 2019, 3:37 p.m. OK MS C++ TESTS 40 30 102400 1700
57326450 vjudge5 C July 19, 2019, 12:20 p.m. OK MS C++ TESTS 40 31 0 1700
52336658 vjudge3 C April 5, 2019, 8:20 a.m. OK MS C++ TESTS 40 31 0 1700
47349890 vjudge2 C Dec. 22, 2018, 1:13 a.m. OK MS C++ TESTS 40 31 0 1700
47299928 vjudge3 C Dec. 20, 2018, 1:44 p.m. OK MS C++ TESTS 40 31 0 1700
57189396 vjudge5 C July 17, 2019, 9:54 a.m. OK MS C++ TESTS 40 31 0 1700
56747794 vjudge1 C July 9, 2019, 10:35 a.m. OK MS C++ TESTS 40 31 102400 1700
56752320 vjudge3 C July 9, 2019, 12:25 p.m. OK MS C++ TESTS 40 31 102400 1700
52945880 vjudge1 C April 18, 2019, 11:31 a.m. OK MS C++ TESTS 40 31 102400 1700
52531731 vjudge5 C April 9, 2019, 1:44 p.m. OK MS C++ TESTS 40 31 102400 1700
64482675 chaudhary_19 C Nov. 7, 2019, 4:30 p.m. OK PyPy 3 TESTS 40 140 9830400 1700
47827519 homoeconomicus C Jan. 2, 2019, 2:12 a.m. OK PyPy 3 TESTS 40 155 1024000 1700
66992780 pac-man21 C Dec. 15, 2019, 9:39 p.m. OK PyPy 3 TESTS 40 156 70758400 1700
64482241 chaudhary_19 C Nov. 7, 2019, 4:21 p.m. OK PyPy 3 TESTS 40 170 9830400 1700
67125706 ashok123 C Dec. 17, 2019, 7:59 p.m. OK PyPy 3 TESTS 40 171 15667200 1700
63663393 adivannik C Oct. 28, 2019, 2:32 p.m. OK PyPy 3 TESTS 40 171 16793600 1700
50101879 toysheeyeyraku C Feb. 18, 2019, 3:19 p.m. OK PyPy 3 TESTS 40 202 5222400 1700
60842404 swapnil2597 C Sept. 19, 2019, 11:27 a.m. OK PyPy 3 TESTS 40 202 26624000 1700
51871190 Mr.Inconsistent C March 26, 2019, 5:28 p.m. OK PyPy 3 TESTS 40 234 27443200 1700
61838763 Wizmann C Oct. 4, 2019, 8:54 a.m. OK Python 2 TESTS 40 187 819200 1700
61779849 vjudge2 C Oct. 3, 2019, 12:51 p.m. OK Python 2 TESTS 40 202 716800 1700
48190198 nickk2002 C Jan. 10, 2019, 5:26 p.m. OK Python 3 TESTS 40 109 716800 1700
52310649 soto_nlp C April 4, 2019, 2:28 p.m. OK Python 3 TESTS 40 109 3072000 1700
53389233 codershuvo C April 27, 2019, 6:08 a.m. OK Python 3 TESTS 40 124 8704000 1700
53089124 5amessi C April 21, 2019, 10:20 a.m. OK Python 3 TESTS 40 155 16076800 1700
55233072 MajAK C June 7, 2019, 6:50 a.m. OK Python 3 TESTS 40 171 3276800 1700
65474585 tuna_salad C Nov. 21, 2019, 9:32 a.m. OK Rust TESTS 40 31 409600 1700

remove filters

Back to search problems