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 |
| 736
|
Codeforces Round 382 (Div. 1) |
FINISHED |
False |
7200 |
296141123 |
Nov. 27, 2016, 4:35 p.m. |
Problems
Ostap is preparing to play chess again and this time he is about to prepare. Thus, he was closely monitoring one recent chess tournament. There were m players participating and each pair of players played exactly one game. The victory gives 2 points, draw — 1 points, lose — 0 points. Ostap is lazy, so he never tries to remember the outcome of each game. Instead, he computes the total number of points earned by each of the players (the sum of his points in all games which he took part in), sort these value in non-ascending order and then remembers first n integers in this list. Now the Great Strategist Ostap wonders whether he remembers everything correct. He considers that he is correct if there exists at least one tournament results table such that it will produce the given integers. That means, if we count the sum of points for each player, sort them and take first n elements, the result will coincide with what Ostap remembers. Can you check if such table exists? The first line of the input contains two integers m and n ( 1 ≤ n ≤ m ≤ 3000 ) — the number of participants of the tournament and the number of top results Ostap remembers. The second line contains n integers, provided in non-ascending order — the number of points earned by top participants as Ostap remembers them. It's guaranteed that this integers are non-negative and do not exceed 2· m . If there is no tournament such that Ostap can obtain the given set of integers using the procedure described in the statement, then print " no " in the only line of the output. Otherwise, the first line of the output should contain the word " yes ". Next m lines should provide the description of any valid tournament. Each of these lines must contain m characters ' X ', ' W ', ' D ' and ' L '. Character ' X ' should always be located on the main diagonal (and only there), that is on the i -th position of the i -th string. Character ' W ' on the j -th position of the i -th string means that the i -th player won |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
22637332 |
ljsss |
E |
Dec. 1, 2016, 10:55 a.m. |
OK |
GNU C++ |
TESTS |
35 |
140 |
36352000 |
|
2800 |
|
23170086 |
ELNUR.ktl |
E |
Dec. 20, 2016, 5:31 a.m. |
OK |
GNU C++ |
TESTS |
35 |
171 |
65638400 |
|
2800 |
|
26164608 |
Manchery |
E |
April 6, 2017, 8:07 a.m. |
OK |
GNU C++ |
TESTS |
35 |
187 |
10956800 |
|
2800 |
|
31450818 |
vjudge5 |
E |
Oct. 17, 2017, 1:44 p.m. |
OK |
GNU C++ |
TESTS |
35 |
187 |
57241600 |
|
2800 |
|
28167090 |
Dream-Reality |
E |
June 30, 2017, 8:07 a.m. |
OK |
GNU C++ |
TESTS |
35 |
202 |
10956800 |
|
2800 |
|
31437998 |
Starria |
E |
Oct. 17, 2017, 4:18 a.m. |
OK |
GNU C++ |
TESTS |
35 |
202 |
11161600 |
|
2800 |
|
31441735 |
vjudge2 |
E |
Oct. 17, 2017, 7:25 a.m. |
OK |
GNU C++ |
TESTS |
35 |
249 |
38195200 |
|
2800 |
|
31481183 |
vjudge5 |
E |
Oct. 18, 2017, 1:16 p.m. |
OK |
GNU C++ |
TESTS |
35 |
249 |
38297600 |
|
2800 |
|
31443400 |
vjudge5 |
E |
Oct. 17, 2017, 9:30 a.m. |
OK |
GNU C++ |
TESTS |
35 |
249 |
74547200 |
|
2800 |
|
24864329 |
Dylans |
E |
Feb. 21, 2017, 7:29 a.m. |
OK |
GNU C++ |
TESTS |
35 |
264 |
39116800 |
|
2800 |
|
40983129 |
ReaLNero1 |
E |
July 30, 2018, 6:44 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
77 |
9113600 |
|
2800 |
|
23188395 |
jimola |
E |
Dec. 20, 2016, 10:48 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
93 |
11161600 |
|
2800 |
|
55587706 |
RedStar_13 |
E |
June 15, 2019, 10:34 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
108 |
9216000 |
|
2800 |
|
22590993 |
ainta |
E |
Nov. 29, 2016, 4:57 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
8908800 |
|
2800 |
|
55583370 |
RedStar_13 |
E |
June 15, 2019, 8:02 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
9113600 |
|
2800 |
|
55583083 |
RedStar_13 |
E |
June 15, 2019, 7:53 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
9113600 |
|
2800 |
|
22560242 |
Marcin_smu |
E |
Nov. 27, 2016, 8:52 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
9113600 |
|
2800 |
|
57813578 |
py_ultron |
E |
July 26, 2019, 6:33 p.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
36352000 |
|
2800 |
|
22571919 |
jiry_2 |
E |
Nov. 28, 2016, 11:24 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
124 |
38502400 |
|
2800 |
|
57878168 |
lopare |
E |
July 28, 2019, 6:32 a.m. |
OK |
GNU C++11 |
TESTS |
35 |
139 |
36352000 |
|
2800 |
|
22558256 |
IceCocoa |
E |
Nov. 27, 2016, 7:34 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
93 |
13107200 |
|
2800 |
|
23361057 |
Ali.Pi |
E |
Dec. 27, 2016, 2:34 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
109 |
14950400 |
|
2800 |
|
22638482 |
NiroBC |
E |
Dec. 1, 2016, noon |
OK |
GNU C++14 |
TESTS |
35 |
139 |
9011200 |
|
2800 |
|
22555885 |
Golovanov399 |
E |
Nov. 27, 2016, 6:32 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
155 |
46489600 |
|
2800 |
|
22549246 |
Egor.Lifar |
E |
Nov. 27, 2016, 5:54 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
171 |
10956800 |
|
2800 |
|
23002962 |
fqw |
E |
Dec. 15, 2016, 10:13 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
202 |
9523200 |
|
2800 |
|
33497712 |
g1n0st |
E |
Dec. 22, 2017, 7:59 a.m. |
OK |
GNU C++14 |
TESTS |
35 |
202 |
27136000 |
|
2800 |
|
31450801 |
q234rty |
E |
Oct. 17, 2017, 1:44 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
202 |
57139200 |
|
2800 |
|
23008815 |
jiaqiyang |
E |
Dec. 15, 2016, 2:20 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
218 |
9113600 |
|
2800 |
|
23563594 |
koratel |
E |
Jan. 5, 2017, 10 p.m. |
OK |
GNU C++14 |
TESTS |
35 |
218 |
11366400 |
|
2800 |
|
61722379 |
Roundgod |
E |
Oct. 2, 2019, 2:07 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
217 |
9113600 |
|
2800 |
|
64038705 |
majk |
E |
Nov. 1, 2019, 5:29 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
218 |
9523200 |
|
2800 |
|
69292256 |
hjk1030 |
E |
Jan. 22, 2020, 10:46 a.m. |
OK |
GNU C++17 |
TESTS |
35 |
233 |
9113600 |
|
2800 |
|
66286580 |
kempusss |
E |
Dec. 4, 2019, 7:34 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
405 |
36352000 |
|
2800 |
|
65725682 |
Fly_37 |
E |
Nov. 25, 2019, 10:43 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
483 |
13312000 |
|
2800 |
|
69544607 |
maras |
E |
Jan. 26, 2020, 1:05 a.m. |
OK |
GNU C++17 |
TESTS |
35 |
514 |
36147200 |
|
2800 |
|
56624933 |
amnesiac_dusk |
E |
July 6, 2019, 1:24 p.m. |
OK |
GNU C++17 |
TESTS |
35 |
639 |
9216000 |
|
2800 |
|
22558062 |
Lewin |
E |
Nov. 27, 2016, 7:30 p.m. |
OK |
Java 8 |
TESTS |
35 |
296 |
17817600 |
|
2800 |
|
22558016 |
Lewin |
E |
Nov. 27, 2016, 7:29 p.m. |
OK |
Java 8 |
TESTS |
35 |
311 |
17715200 |
|
2800 |
|
22584178 |
mmaxio |
E |
Nov. 28, 2016, 7:42 p.m. |
OK |
Java 8 |
TESTS |
35 |
343 |
17510400 |
|
2800 |
|
50334460 |
tri |
E |
Feb. 22, 2019, 8:05 p.m. |
OK |
Java 8 |
TESTS |
35 |
951 |
40448000 |
|
2800 |
|
22577805 |
666qwerty |
E |
Nov. 28, 2016, 1:45 p.m. |
OK |
MS C++ |
TESTS |
35 |
1138 |
9420800 |
|
2800 |
remove filters
Back to search problems