submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s998643270 | p04043 | Runtime Error | a = list(map(int,inpt().split()))
5count = 0
7count = 0
for i in range(3):
if a[i] == 5:
5count +=1
elif a[i] == 7:
7count += 1
if 5count == 2 and 7count == 1:
print('YES')
else:
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s211167130 | p04043 | Runtime Error | a,b,c=map(int,input().split())
list1=[a,b,c]
list2=sorted(list1)
if list2[0]==list2[1]==5 and list2[2]==7:
print("YES")
else:
print(NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s275136843 | p04043 | Runtime Error | a=[int(input()) for _ in range(3)]
b=sorted(a)
if b[0]==5 and b[1]==5 and b[2]==7:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s572267647 | p04043 | Runtime Error | a=[int(input()) for _ in range(3)]
a.sort()
if a[0]==5 and a[1]==5 and a[2]==7:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s482881448 | p04043 | Runtime Error | a=[int(input()) for _ in range(3)]
if sorted(a)==[5,5,7]:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s365864240 | p04043 | Runtime Error | a=[int(input()) for _ in range()]
if sorted(a)==[5,5,7]:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s300482052 | p04043 | Runtime Error | A, B, C = [int(i) for i in input().split()]
if sorted([A,B,C]==[5,5,7]):
print('YES')
else:
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s844853399 | p04043 | Runtime Error | print("YES" if 5, 7, 5 == map(int, input().split()) else "NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s019573240 | p04043 | Runtime Error | print("YES" is 5, 7, 5 == list(map(int, input().split())) else "NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s165999849 | p04043 | Runtime Error | print("YES" is 5, 7, 5 == map(int, input().split()) else "NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s035005370 | p04043 | Runtime Error | # main関数
if __name__ == '__main__':
n, l = map(int,input().split())
a = []
for i in range(n) :
a.append(input())
a.sort()
for i in range(n) :
print(a[i], end="")
print() | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s312793810 | p04043 | Runtime Error | x = list(map(int, input().split()))
if x.count[5] == 2 and x.count[7] == 1:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s877462689 | p04043 | Runtime Error | x = lsit(map(int, input().split()))
if x.count[5] == 2 and x.count[7] == 1:
print("YES")
else:
print("NO")
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s541805245 | p04043 | Runtime Error | a, b, c = map(int,input().split())
if a == 7:
if b == c and c ==5:
print("YES")
else:
print("NO")
elif a == 5:
if b ==7 and c == 5:
print("YES")
ellif b == 5 and c ==7:
print("YES")
else:
print("NO")
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s542239038 | p04043 | Runtime Error | a, b, c = map(int,input().split())
if a == 7:
if b == c ==5:
print("Yes")
else:
print("No")
elif a == 5:
if b ==7 and c == 5:
print("Yes")
ellif b == 5 and c ==7:
print("Yes")
else:
print("No")
else:
print("No") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s595850735 | p04043 | Runtime Error | n = list(map(int,input().split()))
if 5 in n :
n.remove(5)
if 5 in n and if 7 in n :
print("YES")
else:
print("NO")
else :
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s419776576 | p04043 | Runtime Error | n = list(map(int,input().split()))
if 5 in n :
n.remove(5)
elif 5 in n :
elif 7 in n :
print("YES")
else :
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s639153547 | p04043 | Runtime Error | n = list(map(int,input().split()))
if 5 in n :
n.remove(5)
elif 5 in n :
elif 7 in n :
print("YES")
else :
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s653553109 | p04043 | Runtime Error | nyuuryoku_num , _ = [int(i) for i in input().split()]
test_lists = [input() for i in range(nyuuryoku_num)]
print("".join(sorted(test_lists)))
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s874664695 | p04043 | Runtime Error | a = map(int, raw_input().strip().split())
sort(a)
if a[0] == 5 and a[1] == 5 and a[2] == 7:
print('YES')
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s655235431 | p04043 | Runtime Error | L, N = map(int,input().split())
S = [input() for i in range(N)]
S.sort()
A=''.join(S)
print(A) | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s671858175 | p04043 | Runtime Error | list = []
for i in range(3):
n = int(input())
list.append(n)
list.sort()
if list[0] == 5 & list[1] == 5 & list[2]:
print('YES')
else:
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s846330723 | p04043 | Runtime Error | a = list(map(int, input().split()))
a.sort()
if a == [5, 5, 7];
print("YES")
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s894176466 | p04043 | Runtime Error | haiku = int(input())
x = haiku.split(' ')
num_5 = 0
num_7 = 0
for v in x:
if x[v] == 5:
num_5 ++
elif x[v] == 7:
num_7 ++
if num_5 == 2 and num_7 == 1:
print('YES')
else:
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s581560679 | p04043 | Runtime Error | haiku = int(input())
x = haiku.split(' ')
num_5 = 0
num_7 = 0
for v in x:
if x[v] == 5:
num_5 ++
elif x[v] == 7:
num_7 ++
if num_5 == 2 and num_7 == 1
print('YES')
else
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s789042016 | p04043 | Runtime Error | a = [int(i) for i in input().split()]
a.sort()
if a[0] == 5 and a[1] == 5 and a[2] == 7 :
print('YES')
else
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s505893943 | p04043 | Runtime Error | L, N = map(int, raw_input().split())
if L > 100 or L < 1:
print 'error'
exit()
if N > 100 or N < 1:
print 'error'
exit()
input = []
for i in range(0, N):
sentence = raw_input()
if len(sentence) != L:
print 'error'
exit()
for j in range(0, L):
if sentence[j] < 'a' or sentence[j] > 'z':
print 'error'
exit()
input.append(sentence)
for x in sorted(input):
print x | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s568351626 | p04043 | Runtime Error | n,l=map(int,raw_input().split())
l=[]
for i in range(n):
l.append(raw_input())
l.sort()
print ''.join(l) | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s630031938 | p04043 | Runtime Error | f = map(int, input().split())
f = sorted(f)
if f==[5, 5, 7]:
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s249291950 | p04043 | Runtime Error | if '557' == ''.join(sorted(input().split())):
return 'YES'
else:
return 'NO'
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s091037129 | p04043 | Runtime Error | n,k=map(int,input().split())
d=[i for i in input().split()]
while True:
f=False
for i in d:
if i not in str(n):
f=True
break
if f:
break
n+=1
print(n) | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s980440259 | p04043 | Runtime Error |
N, K = raw_input().split()
D = raw_input().split()
candi = [str(i) for i in xrange(10)]
for d in D:
candi.remove(d)
def decide(i):
if i >= len(N):
return ''
for c in candi:
if N[i] == c:
return c + decide(i + 1)
elif N[i] < c:
return c + candi[0] * (len(N) - i - 1)
if candi[-1] * len(N) >= N:
print decide(0)
else:
print (candi[0] if candi[0] != '0' else candi[1]) + candi[0] * len(N)
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s184857529 | p04043 | Runtime Error | a = map(int, input().split()
flag5=0
flag7=0
for i in range(len(a)):
if a[i] = 5:
flag5 += 1
elif a[i] = 7:
flag7 += 1
else:
flag5 = 0
break
if flag5=2 and flag7=1:
print('YES')
else:
print('NO')
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s543956258 | p04043 | Runtime Error | #coding: utf-8
#ABC042C
n,k=map(int,raw_input().split())
d=raw_input().split()
while True:
if all(x not in str(n) for x in d):
res=n
break
n+=1
print res
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s781073740 | p04043 | Runtime Error | #coding: utf-8
#ABC042B
n,l=map(int,raw_input().split())
s=[raw_input() for i in xrange(n)]
s.sort()
res="".join(s)
print res
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s131573094 | p04043 | Runtime Error | N,L=map(int, input().split())
a=[]
for i in range(N):
a.append(input())
a.sort()
for i in range(N):
print(a[i],end='')
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s782152101 | p04043 | Runtime Error | N,L=input().split()
N=int(N)
a=[]
for i in range(N):
s=input()
a.append(s)
a.sort()
for i in range(N):
print(a[i],end='')
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s536261971 | p04043 | Runtime Error |
ini = int(input().split(" ")[0])
negaset = [int(x) for x in input().split(" ")]
okset = sorted([str(i) for i in range (10) if i not in negaset])
#print(ini,okset)
for p in itertools.product(okset,repeat = 5):
stp = int("".join(p))
if stp >= ini:
print(stp)
break | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s631244407 | p04043 | Runtime Error | import itertools
ini = int(input().split(" ")[0])
negaset = [int(x) for x in input().split(" ")]
okset = sorted([str(i) for i in range (10) if i not in negaset])
#print(ini,okset)
for p in itertools.product(okset,repeat = 5):
stp = int("".join(p))
if stp >= ini:
print(stp)
break | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s345807959 | p04043 | Runtime Error | # coding: utf-8
# Here your code !
import itertools
ini = int(input().split(" ")[0])
negaset = [int(x) for x in input().split(" ")]
okset = sorted([str(i) for i in range (10) if i not in negaset])
#print(ini,okset)
for p in itertools.product(okset,repeat = 5):
stp = int("".join(p))
if stp >= ini:
print(stp)
break | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s376134665 | p04043 | Runtime Error | # coding: utf-8
# Here your code !
ipt = input().split(" ")
j,k =0,0
for i in ipt:
if i == 5:
k +=1
elif i==7:
j += 1
if J == 1 & K == 2:
print("YES")
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s629150975 | p04043 | Runtime Error | xs = map(int, raw_input())
print 'YES' if sorted(xs) == [5, 5, 7] else 'NO' | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s136773580 | p04043 | Runtime Error | if sorted(arr) == [5,5,7]:
print('YES')
else:
print('NO') | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s922048921 | p04043 | Runtime Error | M=10**9+7;F=[pow(X,M-2,M)for X in range(2*10**5)];H,W,A,B=map(int,input().split());Z=C=1
for I in range(H-1):Z=C=C*(W+H-B-2-I)*F[I+1]%M
for I in range(1,H-A):C=C*(B-1+I)*F[I]*(H-I)*F[W+H-B-1-I]%M;Z=(Z+C)%M
print(Z) | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s478399324 | p04043 | Runtime Error | n,l=map(int,raw_input().split())
a=[]
for i in range(n):
a.append(raw_input())
a.sort()
print ''.join(a)
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s072221015 | p04043 | Runtime Error | # coding: utf-8
# Here your code !
N, K = map(int, raw_input().split(" "))
D = map(int, raw_input().split(" "))
nums = range(0,10)
#好きな数字を昇順のリストに整理
like = list(set(nums).difference(set(D)))
like.sort()
print like
#数字を上から1文字づつ処理
grade = len(str(N))-1
ans = 0
flag = False #上の桁で嫌いな数字があるか
for i in str(N):
if int(i) == 9 and 9 not in like and not flag:
ans += 10**(grade+1)
flag = True
elif int(i) not in like and not flag:
for j in like:
if j > int(i):
ans += j*10**(grade)
flag = True
break
elif flag:
ans += like[0]*10**(grade)
grade -= 1
if ans < N:
ans = N
print ans
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s156092194 | p04043 | Runtime Error | #!/usr/bin/env python2
#encoding: UTF-8
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import math
line=raw_input().rstrip().split(' ')
N=int(line[0])
L=int(line[1])
listo=[]
for i in range(L):
listo.append(raw_input().rstrip())
listi=sorted(listo)
listni=''
for i in range(L):
listni+=listi[i]
print listni | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s941377590 | p04043 | Runtime Error | n,l = map(int,raw_input().split())
s = []
for i in xrange(n) :
s.append(raw_input())
s.sort()
t = ''
for j in xrange(n) :
t += s[j]
print t
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s955418530 | p04043 | Runtime Error | n, _ = input().split(' ')
o = set([d for d in range(10)])
d = set([int(t) for t in input().split(' ')])
o = list(o.difference(d))
o.sort()
ans = []
for t in n:
t = int(t)
for tt in o:
if tt >= t:
ans.append(tt)
break
else:
ans.append(o[0])
if int(''.join(map(str,ans))) < int(n):
ans.insert(0, o[0] if o[0] != 0 else o[1])
print(''.join(map(str,ans))) | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s816960231 | p04043 | Runtime Error | N,L = list(map(int, input().split()))
a = [input() for i in range(N)]
b = []
for i in range(N):
n = 0
for j in range(L):
n = (n*100) + ord( a[i][j])-96
b.append(n)
ind = b.index(max(b))
print('%s' % str(a[ind]))
| 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s835245471 | p04043 | Runtime Error | a, b, c = sorted(map(int, input().split()))
if a, b, c == 5, 5, 7:
print("YES")
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s354079959 | p04043 | Runtime Error | a, b, c = sorted(map(int, input().split()))
if a, b, c = 5, 5, 7:
print("YES")
else:
print("NO") | 5 5 7
| YES
| <span class="lang-en">
<p>Score : <var>100</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha loves <em>Haiku</em>. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with <var>5</var>, <var>7</var> and <var>5</var> syllables, in this order.</p>
<p>To create a Haiku, Iroha has come up with three different phrases. These phrases have <var>A</var>, <var>B</var> and <var>C</var> syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.</p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1≦A,B,C≦10</var></li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>A</var> <var>B</var> <var>C</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>If it is possible to construct a Haiku by using each of the phrases once, print <code>YES</code> (case-sensitive). Otherwise, print <code>NO</code>.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>5 5 7
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>YES
</pre>
<p>Using three phrases of length <var>5</var>, <var>5</var> and <var>7</var>, it is possible to construct a Haiku.</p>
</section>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 2</h3><pre>7 7 5
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 2</h3><pre>NO
</pre></section>
</div>
</span> |
s511663127 | p04044 | Wrong Answer | n,l = map(int,input().split())
a = []
for i in range(n):
a.append(input())
a.sort()
for i in a:
print(i) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s839103397 | p04044 | Wrong Answer | N, L = map(int, input().split())
s = []
for i in range(N):
s.append(input())
print(s)
print(''.join(sorted(s))) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s713661684 | p04044 | Wrong Answer | from sys import stdin, stdout
from time import perf_counter
import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7
# import sys
# sys.stdout = open("e:/cp/output.txt","w")
# sys.stdin = open("e:/cp/input.txt","r")
n,l = map(int,input().split())
a = [input() for item in range(n)]
print(''.join(a)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s769207686 | p04044 | Wrong Answer | n,l = map(int,input().split())
s = sorted([i for i in range(n)])
print(*s,sep="") | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s274435074 | p04044 | Wrong Answer | n, l = map(int, input().split())
ans = []
for i in range(n):
#index = 0
s = str(input())
for i in range(n):
#print(ans, len(ans))
if i > len(ans):
ans.append(s)
break
elif str(ans[i*l:(i+1)*l]) < s:
ans.insert(i-1,s)
break
#print(ans)
print("".join(ans))
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s022013178 | p04044 | Wrong Answer | n, l = map(int, input().split())
a = list(input() for i in range(n))
print(sorted(a)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s055074704 | p04044 | Wrong Answer | import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect
def main():
n,l = map(int, input().split())
array = [input() for _ in range(n)]
array.sort()
print('a'.join(array))
if __name__ == '__main__':
main()
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s978524927 | p04044 | Wrong Answer | N, L = map(int, input().split())
S_i = [input() for i in range(N)]
s = sorted(S_i)
m = ""
for x in s:
m += x
print(m) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s272583519 | p04044 | Wrong Answer | from sys import stdin, stdout
from time import perf_counter
import sys
sys.setrecursionlimit(10**9)
mod = 10**9+7
n,l = map(int, input().split())
s = [input() for _ in range(n)]
s.sort()
result = ''.join(s)
print(s)
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s302542042 | p04044 | Wrong Answer | info = input().split()
lst = []
for i in range(int(info[0])):
lst.append(str(input()))
lst = sorted(lst)
print(lst) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s268881293 | p04044 | Wrong Answer | from sys import stdin
input = stdin.readline
L, N = map(int, input().split())
D = []
for i in range(N):
D.append(input().strip())
D.sort()
print(''.join(D)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s466694583 | p04044 | Wrong Answer | a=input()
b=[]
for i in range(int(a[0])):
b.append(input())
f=sorted(b)
for i in range(int(a[0])):
print(f[i],end='') | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s927327262 | p04044 | Wrong Answer | n, l = map(int, input().split())
s = [input() for i in range(n)]
s.sort()
"".join(s) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s569967140 | p04044 | Wrong Answer | import sys
input = sys.stdin.readline
def find_where( List , word ):
for i , list_i in enumerate(List):
if list_i > word:
break
return i
def main():
n , l = map( int, input().split() )
I = []
for i in range(n):
s = str(input())
s = s[:-1]
I.append( s )
Ss = []
Ss.append( I[0] )
for i in range(1,n):
s = I[i]
where_i = find_where( Ss , s )
Ss.insert( where_i , s )
ans = ''.join(Ss)
print(ans)
main() | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s181641314 | p04044 | Wrong Answer | N, L = map(int, input().split())
s = []
for i in range(N):
s.append(input())
s.sort()
print(s)
print(''.join(s))
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s105574583 | p04044 | Wrong Answer | #!/usr/bin/env python3
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s692537008 | p04044 | Wrong Answer | # cook your dish here
abc=list(map(int , input().split()))
# frequency check is used
count=0
element=5
element1=7
frequency1=abc.count(5)
frequency2=abc.count(7)
if(frequency1 == 2):
if(frequency2 == 1):
count+=1
else:
count+=0
else:
count+=0
if(count == 1):
print("Yes")
else:
print("No") | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s047225546 | p04044 | Wrong Answer | n,l = map(int,input().split())
for i in range(n):
s = sorted([input()])
print(*s,sep="")
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s437002750 | p04044 | Wrong Answer | n,l=map(int,input().split())
s=[]
ss=''
for i in range(n):
s.append(input())
s=sorted(s)
for i in range(n):
ss+=s[i]
print(print) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s195348043 | p04044 | Wrong Answer | n,l=map(int,input().split())
s=[]
for i in range(n):
s.append(input())
print(sorted(s)[0]) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s443277319 | p04044 | Wrong Answer | n,l=map(int,input().split())
s=list(map(str,input().split()))
s=sorted(s)
print(s[0]) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s775485605 | p04044 | Wrong Answer | n, l = map(int, input().split())
ll = []
for i in range(n):
ll.append(input())
print(ll)
ll.sort()
print(ll)
ans = ""
for j in ll:
ans += j
print(ans) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s304377135 | p04044 | Wrong Answer |
l,n = map(int, input().split())
s = [str(input()) for _ in range(l)]
s.sort()
for i in s:
print(i) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s685123652 | p04044 | Wrong Answer | val = input()
splited_val = val.split()
val_list=[]
for x in range(int(splited_val[0])):
val = input()
val_list.append(val)
print(sorted(val_list)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s665524829 | p04044 | Wrong Answer | n, l = map(int, input().split())
a = []
if n == 1:
print(input())
exit()
for i in range(n):
a.append(input())
a.sort()
print(a[0]) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s990296399 | p04044 | Wrong Answer | i = input().split()
if i.count("7") == 1 and i.count("5") == 2:
print("YES")
else:
print("NO") | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s255183723 | p04044 | Wrong Answer | N,L=map(int, input().split(" "))
s=[]
for i in range(N):
s.append(input())
s.sort()
print(s) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s625345311 | p04044 | Wrong Answer | import sys
import numpy as np
from heapq import heappush, heappop
from bisect import bisect_left as bi_l, bisect_right as bi_r
from collections import deque, Counter, defaultdict
from itertools import combinations, product
import string
inf = float('inf')
MOD = 10**9+7
# MOD = 998244353
class NumberTheory():
def __init__(self, n=2*10**6, numpy=True):
self.n = n
self.np_flg = numpy
self.is_prime_number, self.prime_numbers = self.sieve_of_eratosthenes(n)
def sieve_of_eratosthenes(self, n):
if self.np_flg:
sieve = np.ones(n+1, dtype=np.int64); sieve[:2] = 0
for i in range(2, int(n**.5)+1):
if sieve[i]: sieve[i*2::i] = 0
prime_numbers = np.flatnonzero(sieve)
else:
sieve = [1] * (n+1); sieve[0] = sieve[1] = 0
for i in range(2, int(n**.5)+1):
if not sieve[i]: continue
for j in range(i*2, n+1, i): sieve[j] = 0
prime_numbers = [i for i in range(2, n+1) if sieve[i]]
return sieve, prime_numbers
def prime_factorize(self, n):
res = dict()
if n < 2: return res
border = int(n**.5)
for p in self.prime_numbers:
if p > border: break
while n % p == 0: res[p] = res.get(p, 0)+1; n //= p
if n == 1: return res
res[n] = 1; return res
def prime_factorize_factorial(self, n):
res = dict()
for i in range(2, n+1):
for p, c in self.prime_factorize(i).items(): res[p] = res.get(p, 0)+c
return res
@staticmethod
def gcd(a, b): return gcd(b, a%b) if b else abs(a)
@staticmethod
def lcm(a, b): return abs(a // gcd(a, b) * b)
@staticmethod
def find_divisors(n):
divisors = []
for i in range(1, int(n**.5)+1):
if n%i: continue
divisors.append(i)
j = n // i
if j != i: divisors.append(j)
return divisors
@staticmethod
def base_convert(n, b):
if not n: return [0]
res = []
while n:
n, r = divmod(n, b)
if r < 0: n += 1; r -= b
res.append(r)
return res
class UnionFind():
def __init__(self, n=10**6):
self.root = list(range(n))
self.height = [0] * n
self.size = [1] * n
def find_root(self, u):
if self.root[u] == u: return u
self.root[u] = self.find_root(self.root[u])
return self.root[u]
def unite(self, u, v):
ru = self.find_root(u)
rv = self.find_root(v)
if ru == rv: return
hu = self.height[ru]
hv = self.height[rv]
if hu >= hv:
self.root[rv] = ru
self.size[ru] += self.size[rv]
self.height[ru] = max(hu, hv+1)
else:
self.root[ru] = rv
self.size[rv] += self.size[ru]
class Combinatorics():
def __init__(self, N=10**9, n=10**6, mod=10**9+7, numpy=True):
self.mod = mod
self.nCr = dict()
self.np_flg=numpy
self.make_mod_tables(N, n)
sys.setrecursionlimit(10**6)
def choose(self, n, r, mod=None): # no mod, or mod ≠ prime
if r > n or r < 0: return 0
if r == 0: return 1
if (n, r) in self.nCr: return self.nCr[(n, r)]
if not mod:
self.nCr[(n, r)] = (self.choose(n-1, r) + self.choose(n-1, r-1))
else:
self.nCr[(n, r)] = (self.choose(n-1, r, mod) + self.choose(n-1, r-1, mod)) % mod
return self.nCr[(n,r)]
def cumprod(self, a):
p = self.mod
l = len(a); sql = int(np.sqrt(l)+1)
a = np.resize(a, sql**2).reshape(sql, sql)
for i in range(sql-1): a[:, i+1] *= a[:, i]; a[:, i+1] %= p
for i in range(sql-1): a[i+1] *= a[i, -1]; a[i+1] %= p
return np.ravel(a)[:l]
def make_mod_tables(self, N, n):
p = self.mod
if self.np_flg:
fac = np.arange(n+1); fac[0] = 1; fac = self.cumprod(fac)
ifac = np.arange(n+1, 0, -1); ifac[0] = pow(int(fac[-1]), p-2, p)
ifac = self.cumprod(ifac)[n::-1]
n_choose = np.arange(N+1, N-n, -1); n_choose[0] = 1;
n_choose[1:] = self.cumprod(n_choose[1:])*ifac[1:n+1]%p
else:
fac = [None]*(n+1); fac[0] = 1
for i in range(n): fac[i+1] = fac[i]*(i+1)%p
ifac = [None]*(n+1); ifac[n] = pow(fac[n], p-2, p)
for i in range(n, 0, -1): ifac[i-1] = ifac[i]*i%p
n_choose = [None] * (n+1); n_choose[0] = 1
for i in range(n): n_choose[i+1] = n_choose[i]*(N-i)%p
for i in range(n+1): n_choose[i] = n_choose[i]*ifac[i]%p
self.fac, self.ifac, self.mod_n_choose = fac, ifac, n_choose
def z_algorithm(s):
n = len(s)
a = [0] * n; a[0] = n
l = r = -1
for i in range(1, n):
if r >= i: a[i] = min(a[i-l], r-i)
while i + a[i] < n and s[i+a[i]] == s[a[i]]: a[i] += 1
if i+a[i] >= r: l, r = i, i+a[i]
return a
class ABC001():
def A():
h1, h2 = map(int, sys.stdin.read().split())
print(h1-h2)
def B(): pass
def C(): pass
def D(): pass
class ABC002():
def A():
x, y = map(int, sys.stdin.readline().split())
print(max(x, y))
def B():
vowels = set('aeiou')
s = sys.stdin.readline().rstrip()
t = ''
for c in s:
if c in vowels: continue
t += c
print(t)
def C():
*coords, = map(int, sys.stdin.readline().split())
def triangle_area(x0, y0, x1, y1, x2, y2):
x1 -= x0; x2 -= x0; y1 -= y0; y2 -= y0;
return abs(x1*y2 - x2*y1) / 2
print(triangle_area(*coords))
def D():
n, m = map(int, sys.stdin.readline().split())
edges = set()
for _ in range(m):
x, y = map(int, sys.stdin.readline().split())
x -= 1; y -= 1
edges.add((x, y))
cand = []
for i in range(1, 1<<n):
s = [j for j in range(n) if i>>j & 1]
for x, y in combinations(s, 2):
if (x, y) not in edges: break
else:
cand.append(len(s))
print(max(cand))
class ABC003():
def A():
n = int(sys.stdin.readline().rstrip())
print((n+1)*5000)
def B():
atcoder = set('atcoder')
s, t = sys.stdin.read().split()
for i in range(len(s)):
if s[i] == t[i]: continue
if s[i] == '@' and t[i] in atcoder: continue
if t[i] == '@' and s[i] in atcoder: continue
print('You will lose')
return
print('You can win')
def C():
n, k, *r = map(int, sys.stdin.read().split())
res = 0
for x in sorted(r)[-k:]:
res = (res+x) / 2
print(res)
def D(): pass
class ABC004():
def A():
print(int(sys.stdin.readline().rstrip())*2)
def B():
c = [sys.stdin.readline().rstrip() for _ in range(4)]
for l in c[::-1]:
print(l[::-1])
def C():
n = int(sys.stdin.readline().rstrip())
n %= 30
res = list(range(1, 7))
for i in range(n):
i %= 5
res[i], res[i+1] = res[i+1], res[i]
print(''.join(map(str, res)))
def D(): pass
class ABC005():
def A():
x, y = map(int, sys.stdin.readline().split())
print(y//x)
def B():
n, *t = map(int, sys.stdin.read().split())
print(min(t))
def C():
t = int(sys.stdin.readline().rstrip())
n = int(sys.stdin.readline().rstrip())
a = [int(x) for x in sys.stdin.readline().split()]
m = int(sys.stdin.readline().rstrip())
b = [int(x) for x in sys.stdin.readline().split()]
i = 0
for p in b:
if i == n: print('no'); return
while p-a[i] > t:
i += 1
if i == n: print('no'); return
if a[i] > p: print('no'); return
i += 1
print('yes')
def D():
n = int(sys.stdin.readline().rstrip())
d = np.array([sys.stdin.readline().split() for _ in range(n)], np.int64)
s = d.cumsum(axis=0).cumsum(axis=1)
s = np.pad(s, 1)
max_del = np.zeros((n+1, n+1), dtype=np.int64)
for y in range(1, n+1):
for x in range(1, n+1):
max_del[y, x] = np.amax(s[y:n+1, x:n+1] - s[0:n-y+1, x:n+1] - s[y:n+1, 0:n-x+1] + s[0:n-y+1, 0:n-x+1])
res = np.arange(n**2+1)[:, None]
i = np.arange(1, n+1)
res = max_del[i, np.minimum(res//i, n)].max(axis=1)
q = int(sys.stdin.readline().rstrip())
p = np.array(sys.stdin.read().split(), dtype=np.int64)
print(*res[p], sep='\n')
class ABC006():
def A():
n = sys.stdin.readline().rstrip()
if '3' in n: print('YES')
elif int(n)%3 == 0: print('YES')
else: print('NO')
def B():
mod = 10007
t = [0, 0, 1]
for _ in range(1001001):
t.append(t[-1]+t[-2]+t[-3]); t[-1] %= mod
n = int(sys.stdin.readline().rstrip())
print(t[n-1])
def C():
n, m = map(int, sys.stdin.readline().split())
cnt = [0, 0, 0]
if m == 1: cnt = [-1, -1, -1]
else:
if m & 1: m -= 3; cnt[1] += 1; n -= 1
cnt[2] = m//2 - n
cnt[0] = n - cnt[2]
if cnt[0]<0 or cnt[1]<0 or cnt[2]<0: print(-1, -1, -1)
else: print(*cnt, sep=' ')
def D():
n, *c = map(int, sys.stdin.read().split())
lis = [inf]*n
for x in c: lis[bi_l(lis, x)] = x
print(n - bi_l(lis, inf))
class ABC007():
def A():
n = int(sys.stdin.readline().rstrip())
print(n-1)
def B():
s = sys.stdin.readline().rstrip()
if s == 'a': print(-1)
else: print('a')
def C():
r, c = map(int, sys.stdin.readline().split())
sy, sx = map(int, sys.stdin.readline().split())
gy, gx = map(int, sys.stdin.readline().split())
sy -= 1; sx -=1; gy -= 1; gx -= 1
maze = [sys.stdin.readline().rstrip() for _ in range(r)]
queue = deque([(sy, sx)])
dist = np.full((r, c), np.inf); dist[sy, sx] = 0
while queue:
y, x = queue.popleft()
for i, j in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
i += y; j += x
if maze[i][j] == '#' or dist[i, j] != np.inf: continue
dist[i, j] = dist[y, x] + 1
queue.append((i, j))
print(int(dist[gy, gx]))
def D(): pass
class ABC008():
def A():
s, t = map(int, sys.stdin.readline().split())
print(t-s+1)
def B():
n, *s = sys.stdin.read().split()
res = defaultdict(int)
for name in s: res[name] += 1
print(sorted(res.items(), key=lambda x: x[1])[-1][0])
def C():
n, *a = map(int, sys.stdin.read().split())
a = np.array(a)
c = n - np.count_nonzero(a[:, None]%a, axis=1)
print(np.sum((c+1)//2/c))
def D(): pass
class ABC009():
def A():
n = int(sys.stdin.readline().rstrip())
print((n+1)//2)
def B():
n, *a = map(int, sys.stdin.read().split())
print(sorted(set(a))[-2])
def C():
n, k = map(int, sys.stdin.readline().split())
s = list(sys.stdin.readline().rstrip())
cost = [1]*n
r = k
for i in range(n-1):
q = []
for j in range(i+1, n):
if s[j] < s[i] and cost[i]+cost[j] <= r:
heappush(q, (s[j], cost[i]+cost[j], -j))
if not q: continue
_, c, j = heappop(q); j = -j
s[i], s[j] = s[j], s[i]
r -= c
cost[i] = cost[j] = 0
print(''.join(s))
def D(): pass
class ABC010():
def A():
print(sys.stdin.readline().rstrip()+'pp')
def B():
n, *a = map(int, sys.stdin.read().split())
tot = 0
for x in a:
c = 0
while x%2==0 or x%3==2:
x -= 1
c += 1
tot += c
print(tot)
def C():
sx, sy, gx, gy, t, v, n, *xy = map(int, sys.stdin.read().split())
x, y = np.array(xy).reshape(-1, 2).T
def dist(x1, y1, x2, y2):
return np.sqrt((x2-x1)**2 + (y2-y1)**2)
ans = 'YES' if (dist(sx, sy, x, y)+dist(x, y, gx, gy) <= v*t).any() else 'NO'
print(ans)
def D(): pass
class ABC011():
def A():
n = int(sys.stdin.readline().rstrip())
print(n%12+1)
def B():
s = sys.stdin.readline().rstrip()
print(s[0].upper()+s[1:].lower())
def C():
n, *ng = map(int, sys.stdin.read().split())
ng = set(ng)
if n in ng: print('NO')
else:
r = 100
while n > 0:
if r == 0: print('NO'); return
for i in range(3, 0, -1):
if (n-i) in ng: continue
n -= i
r -= 1
break
else: print('NO'); return
print('YES')
def D(): pass
class ABC041():
def A():
s, i = sys.stdin.read().split()
i = int(i)
print(s[i-1])
def B():
MOD = 10**9+7
a, b, c = map(int, sys.stdin.readline().split())
ans = a * b % MOD * c % MOD
print(ans)
def C():
n, *a = map(int, sys.stdin.read().split())
for i, h in sorted(enumerate(a), key=lambda x: -x[1]):
print(i+1)
def D():
n, m, *xy = map(int, sys.stdin.read().split())
*xy, = zip(*[iter(xy)]*2)
edges = [0] * n
for x, y in xy:
x -= 1; y -= 1
edges[x] |= 1<<y
comb = [None] * (1<<n); comb[0] = 1
def count(edges, bit):
if comb[bit] is not None: return comb[bit]
comb[bit] = 0
for i in range(n):
if (bit>>i) & 1 and not edges[i]:
nxt_bit = bit & ~(1<<i)
nxt_edges = edges.copy()
for j in range(n):
nxt_edges[j] &= ~(1<<i)
cnt = count(nxt_edges, nxt_bit)
comb[bit] += cnt
return comb[bit]
print(count(edges, (1<<n)-1))
class ABC042():
def A():
a = [int(x) for x in sys.stdin.readline().split()]
c = Counter(a)
print('YES' if c[5]==2 and c[7]==1 else 'NO')
def B():
n, l, *s = sys.stdin.read().split()
print(''.join(sorted(s)))
def C(): pass
def D(): pass
class ABC170():
def A():
x = [int(x) for x in sys.stdin.readline().split()]
for i in range(5):
if x[i] != i+1:
print(i+1)
break
def B():
x, y = map(int, sys.stdin.readline().split())
print('Yes' if 2*x <= y <= 4*x and y%2 == 0 else 'No')
def C():
x, n, *p = map(int, sys.stdin.read().split())
a = list(set(range(102)) - set(p))
a = [(abs(y-x), y) for y in a]
print(sorted(a)[0][1])
def D():
n, *a = map(int, sys.stdin.read().split())
cand = set(a)
cnt = 0
for x, c in sorted(Counter(a).items()):
cnt += c == 1 and x in cand
cand -= set(range(x*2, 10**6+1, x))
print(cnt)
def E():
n, q = map(int, sys.stdin.readline().split())
queue = []
num_kindergarten = 2*10**5
queue_kindergarten = [[] for _ in range(num_kindergarten)]
highest_kindergarten = [None] * num_kindergarten
where = [None] * n
rate = [None] * n
def entry(i, k):
where[i] = k
while queue_kindergarten[k]:
r, j = heappop(queue_kindergarten[k])
if where[j] != k or j == i: continue
if rate[i] >= -r:
highest_kindergarten[k] = rate[i]
heappush(queue, (rate[i], k, i))
heappush(queue_kindergarten[k], (r, j))
break
else:
highest_kindergarten[k] = rate[i]
heappush(queue, (rate[i], k, i))
heappush(queue_kindergarten[k], (-rate[i], i))
def transfer(i, k):
now = where[i]
while queue_kindergarten[now]:
r, j = heappop(queue_kindergarten[now])
if where[j] != now or j == i: continue
if highest_kindergarten[now] != -r:
highest_kindergarten[now] = -r
heappush(queue, (-r, now, j))
heappush(queue_kindergarten[now], (r, j))
break
else:
highest_kindergarten[now] = None
entry(i, k)
def inquire():
while True:
r, k, i = heappop(queue)
if where[i] != k or r != highest_kindergarten[k]: continue
heappush(queue, (r, k, i))
return r
for i in range(n):
a, b = map(int, sys.stdin.readline().split())
rate[i] = a
entry(i, b-1)
for _ in range(q):
c, d = map(int, sys.stdin.readline().split())
transfer(c-1, d-1)
print(inquire())
def F(): pass
class ABC171():
def A():
c = sys.stdin.readline().rstrip()
print('A' if c < 'a' else 'a')
def B():
n, k, *p = map(int, sys.stdin.read().split())
print(sum(sorted(p)[:k]))
def C():
n = int(sys.stdin.readline().rstrip())
n -= 1
l = 1
while True:
if n < pow(26, l):
break
n -= pow(26, l)
l += 1
res = ''.join([chr(ord('a')+d%26) for d in NumberTheory.base_convert(n, 26)][::-1])
res = 'a'*(l-len(res)) + res
print(res)
def D():
n = int(sys.stdin.readline().rstrip())
a = [int(x) for x in sys.stdin.readline().split()]
s = sum(a)
cnt = Counter(a)
q = int(sys.stdin.readline().rstrip())
for _ in range(q):
b, c = map(int, sys.stdin.readline().split())
s += (c-b)*cnt[b]
print(s)
cnt[c] += cnt[b]; cnt[b] = 0
def E():
n, *a = map(int, sys.stdin.read().split())
s = 0
for x in a: s ^= x
b = map(lambda x: x^s, a)
print(*b, sep=' ')
def F(): pass
class ABC172():
def A(): pass
def B(): pass
def C(): pass
def D(): pass
def E(): pass
def F(): pass
class ABC173():
def A():
n = int(sys.stdin.readline().rstrip())
charge = (n+999)//1000 * 1000 - n
print(charge)
def B():
n, *s = sys.stdin.read().split()
c = Counter(s)
for v in 'AC, WA, TLE, RE'.split(', '):
print(f'{v} x {c[v]}')
def C():
h, w, k = map(int, sys.stdin.readline().split())
c = [sys.stdin.readline().rstrip() for _ in range(h)]
tot = 0
for i in range(1<<h):
for j in range(1<<w):
cnt = 0
for y in range(h):
for x in range(w):
if i>>y & 1 or j>>x & 1:
continue
cnt += c[y][x] == '#'
tot += cnt == k
print(tot)
def D():
n, *a = map(int, sys.stdin.read().split())
a.sort(reverse=True)
res = a[0] + sum(a[1:1+(n-2)//2])*2 + a[1+(n-2)//2]*(n & 1)
print(res)
def E():
MOD = 10**9+7
n, k, *a = map(int, sys.stdin.read().split())
minus = [x for x in a if x < 0]
plus = [x for x in a if x > 0]
if len(plus) + len(minus)//2*2 >= k: # plus
*minus, = map(abs, minus)
minus.sort(reverse=True)
plus.sort(reverse=True)
cand = []
if len(minus)&1: minus = minus[:-1]
for i in range(0, len(minus)-1, 2):
cand.append(minus[i]*minus[i+1]%MOD)
if k & 1:
res = plus[0]
plus = plus[1:]
else:
res = 1
if len(plus)&1: plus = plus[:-1]
for i in range(0, len(plus)-1, 2):
cand.append(plus[i]*plus[i+1]%MOD)
cand.sort(reverse=True)
for x in cand[:k//2]:
res *= x
res %= MOD
print(res)
elif 0 in a:
print(0)
else:
cand = sorted(map(abs, a))
res = 1
for i in range(k):
res *= cand[i]
res %= MOD
res = MOD - res
print(res)
pass
def F(): pass
if __name__ == '__main__':
ABC042.A() | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s658843038 | p04044 | Wrong Answer | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N, L = map(int, readline().split())
S = [readline().strip() for _ in range(L)]
S.sort()
ans = ''.join(S)
print(ans)
return
if __name__ == '__main__':
main()
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s047178909 | p04044 | Wrong Answer | n,l = map(int, input().split())
s = [input() for _ in range(n)]
print(sorted(s)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s900169559 | p04044 | Wrong Answer | n, l = map(int, input().split())
S = [list(input()) for _ in range(n)]
S.sort(key=lambda x: x[0])
for s in S:
for i in s:
print(i, end="") | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s447223157 | p04044 | Wrong Answer | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
def input():
return sys.stdin.readline().strip()
def _main():
input()
s = sorted(list(input().split()))
print("".join(s))
if __name__ == "__main__":
_main()
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s813786113 | p04044 | Wrong Answer | # -*- coding: UTF-8 -*-
import sys
def input():
return sys.stdin.readline().strip()
def _main():
s = sorted(list(input().split()))
print("".join(s))
if __name__ == "__main__":
_main()
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s661417892 | p04044 | Wrong Answer | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
def input():
return sys.stdin.readline().strip()
def _main():
s = sorted(list(input().split()))
print("".join(s))
if __name__ == "__main__":
_main()
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s916062885 | p04044 | Wrong Answer | n, l = map(int, input().split())
a = sorted([input() for i in range(n)])
print(a) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s619790928 | p04044 | Wrong Answer | N, L = map(int, input().split())
s = [input() for i in range(N)]
s.sort()
print(s)
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s389394957 | p04044 | Wrong Answer | import sys
def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def input():
return sys.stdin.readline().rstrip()
#############
# Main Code #
#############
n, m = getNM()
ords = []
for _ in range(m):
s = input()
ords.append([[ord(x) for x in s]])
ords[-1].append(s)
ords.sort(key=lambda x: x[0])
for _, s in ords:
print(s, end='')
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s269136561 | p04044 | Wrong Answer | #B
n,l = map(int,input().split())
word_list=[]
for i in range(n):
word = str(input())
word_list.append(word)
x = sorted(word_list)
print(''.join(word_list)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s547788303 | p04044 | Wrong Answer | N, L, *inputs = input().split()
inputs.sort()
"".join(inputs)
print(inputs);
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s897027311 | p04044 | Wrong Answer | n,l = map(int,input().split())
list = []
for i in range(n):
word = input()
list.append(word)
list_connect = "".join(list)
print(list_connect) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s181253834 | p04044 | Wrong Answer | N, L = map(int, input().split())
S = [input() for i in range(N)]
while True:
t = 0
for i in range(N - 1):
for j in range(L):
if S[i+1][j] < S[i][j]:
#print("{} < {}".format(S[i+1][j], S[i][j]))
temp = S[i+1]
S[i+1] = S[i]
S[i] = temp
t = 1
break
if t == 0:
break
N -= 1
print(''.join(S))
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s172827399 | p04044 | Wrong Answer | N, L = map(int, input().split())
S = [input() for i in range(N)]
while True:
t = 0
for i in range(N - 1):
for j in range(L):
if S[i+1][j] < S[i][j]:
#print("{} < {}".format(S[i+1][j], S[i][j]))
temp = S[i+1]
S[i+1] = S[i]
S[i] = temp
t = 1
if t == 0:
break
N -= 1
print(''.join(S))
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s049007301 | p04044 | Wrong Answer | N, L = map(int, input().split())
S = [input() for i in range(N)]
while True:
t = 0
for i in range(N - 1):
for j in range(L):
if S[i+1][j] < S[i][j]:
print("{} < {}".format(S[i+1][j], S[i][j]))
temp = S[i+1]
S[i+1] = S[i]
S[i] = temp
t = 1
if t == 0:
break
N -= 1
print(''.join(S))
| 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s725113736 | p04044 | Wrong Answer | s = sorted(list(input().split()))
s = "".join(s)
print(s) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s528820733 | p04044 | Wrong Answer | s = [str(x) for x in input()]
s.sort()
s = "".join(s)
print(s) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s359250927 | p04044 | Wrong Answer | N, L = map(int, input().split())
s = list(input().split())
t = ''.join(sorted(s))
print(t) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s152850410 | p04044 | Wrong Answer | N, L = list(map(int, input().strip().split()))
strl = [input().strip() for s in range(N)]
strl = sorted(strl)
s = strl[0]
for t in strl:
s += str(t)
print(s) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
s065351155 | p04044 | Wrong Answer | n,l = map(int,input().split())
s = []
for i in range(n):
s.append(input())
sorted(s)
print(''.join(s)) | 3 3
dxx
axx
cxx
| axxcxxdxx
| <span class="lang-en">
<p>Score : <var>200</var> points</p>
<div class="part">
<section>
<h3>Problem Statement</h3><p>Iroha has a sequence of <var>N</var> strings <var>S_1, S_2, ..., S_N</var>. The length of each string is <var>L</var>.</p>
<p>She will concatenate all of the strings in some order, to produce a long string.</p>
<p>Among all strings that she can produce in this way, find the lexicographically smallest one.</p>
<p>Here, a string <var>s=s_1s_2s_3</var>...<var>s_n</var> is <em>lexicographically smaller</em> than another string <var>t=t_1t_2t_3</var>...<var>t_m</var> if and only if one of the following holds:
<ul>
<li>There exists an index <var>i(1≦i≦min(n,m))</var>, such that <var>s_j = t_j</var> for all indices <var>j(1≦j<i)</var>, and <var>s_i<t_i</var>.</li>
<li><var>s_i = t_i</var> for all integers <var>i(1≦i≦min(n,m))</var>, and <var>n<m</var>.</li>
</ul></p>
</section>
</div>
<div class="part">
<section>
<h3>Constraints</h3><ul>
<li><var>1 ≦ N, L ≦ 100</var></li>
<li>For each <var>i</var>, the length of <var>S_i</var> equals <var>L</var>.</li>
<li>For each <var>i</var>, <var>S_i</var> consists of lowercase letters.</li>
</ul>
</section>
</div>
<hr/>
<div class="io-style">
<div class="part">
<section>
<h3>Input</h3><p>The input is given from Standard Input in the following format:</p>
<pre><var>N</var> <var>L</var>
<var>S_1</var>
<var>S_2</var>
:
<var>S_N</var>
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Output</h3><p>Print the lexicographically smallest string that Iroha can produce.</p>
</section>
</div>
</div>
<hr/>
<div class="part">
<section>
<h3>Sample Input 1</h3><pre>3 3
dxx
axx
cxx
</pre>
</section>
</div>
<div class="part">
<section>
<h3>Sample Output 1</h3><pre>axxcxxdxx
</pre>
<p>The following order should be used: <code>axx</code>, <code>cxx</code>, <code>dxx</code>.</p></section>
</div>
</span> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.