submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s009095013 | p04044 | Accepted | N, L = [int(i) for i in input().split()]
s = []
for i in range(N):
s.append(input())
# print(s)
s_sort = sorted(s)
concat = ''.join(s_sort)
print(concat) | 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> |
s549952116 | p04044 | Accepted | n,l = map(int,input().split())
l=[]
for i in range(n):l.append(str(input()))
l=sorted(l)
print(''.join(l)) | 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> |
s762947138 | p04044 | Accepted | n, l = map(int, input().split(" "))
ss = [input() for i in range(n)]
ss.sort()
print(''.join(ss))
| 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> |
s248075002 | p04044 | Accepted | N , L= map(int,input().split())
lst = []
for i in range(N):
lst.append(input())
lst.sort()
Str = ''
for j in range(N):
Str += lst[j]
print(Str) | 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> |
s013470351 | p04044 | Accepted | a = list(map(int,input().split()))
b = [input() for i in range(a[0])]
c = sorted(b)
print("".join(c)) | 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> |
s628402783 | p04044 | Accepted | n, l = map(int, input().split())
list = []
for _ in range(n):
list.append(input())
list.sort()
string = ""
for s in list:
string += s
print("".join(string)) | 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> |
s807884239 | p04044 | Accepted | n, l = map(int, input().split())
list = []
for _ in range(n):
list.append(input())
list.sort()
str = ""
for s in list:
str += s
print(str) | 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> |
s471293819 | p04044 | Accepted | N, L = map(int, input().split())
list = []
for _ in range(N):
list.append(input())
list.sort()
string = ""
for l in list:
string += l
print(string) | 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> |
s613647777 | p04044 | Accepted | row = input().split()
N = int(row[0])
L = int(row[1])
row2 = [input().split() for i in range(N)]
s = []
for i in range(N):
s.append(row2[i][0])
s.sort()
ans = "".join(s)
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> |
s756435862 | p04044 | Accepted | a = list(map(int,input().split()))
b = [input() for i in range(a[0])]
c = sorted(b)
print("".join(c))
| 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> |
s206137693 | p04044 | Accepted | from sys import stdin
N, L = map(int,input().split())
S = sorted([s for s in stdin.read().splitlines()])
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> |
s069999024 | p04044 | Accepted | N , L= map(int,input().split())
lst = []
for i in range(N):
lst.append(input())
lst.sort()
Str = ''
for j in range(N):
Str += lst[j]
print(Str)
| 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> |
s565707556 | p04044 | Accepted | N,L=map(int, input().split())
S=[]
for i in range(N):
S.append(input())
S.sort()
result=''
for j in range(N):
result+=S[j]
print(result) | 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> |
s920792749 | p04044 | Accepted | N, L = list(map(int, input().split()))
S = [0]*N
for i in range(N):
S[i] = input()
S.sort()
ans = ''.join(S)
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> |
s193116288 | p04044 | Accepted | n,l=map(int,input().split())
t=sorted([input() for i in range(n)])
print(*t,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> |
s259552183 | p04044 | Accepted | n, l = map(int, input().split())
s = [input().rstrip() for _ in range(n)]
s.sort()
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> |
s445929840 | p04044 | Accepted | N, L = map(int, input().split())
print("".join(sorted((input() for _ in range(N)))))
| 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> |
s590504965 | p04044 | Accepted | N,L = map(int,input().split())
Strings = list()
for i in range(N):
Strings.append(input())
ansString=""
for i in range(len(Strings)):
for j in range(len(Strings)-1,i,-1):
if Strings[j] < Strings[j-1]:
Strings[j], Strings[j-1] = Strings[j-1], Strings[j]
for k in Strings:
ansString += k
print(ansString) | 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> |
s301252183 | p04044 | Accepted | n,l=map(int,input().split())
sl=[input() for _ in range(n)]
sl=sorted(sl)
print(''.join(sl)) | 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> |
s917844509 | p04044 | Accepted | N, L = map(int, input().split())
S = [input() for i in range(N)]
S.sort()
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> |
s856030396 | p04044 | Accepted | N,L=map(int, input().split())
S=[]
for i in range(N):
S.append(input())
S.sort()
result=''
for j in range(N):
result+=S[j]
print(result) | 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> |
s341152009 | p04044 | Accepted | N, L = list(map(int, input().split(' ')))
#print(N, L)
S = []
for i in range(N):
S.append(list(input()))
#print(S)
S.sort()
#print(S)
for word in S:
for char in word:
print(char, end='')
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> |
s229355747 | p04044 | Accepted | N, L = map(int, input().split())
s = []
for i in range(N):
s += [input()]
s.sort()
for i in range(N):
print(s[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> |
s761755032 | p04044 | Accepted | N, L = map(int, input().split())
S = list(input() for i in range(N))
S.sort()
str = ""
for i in S:
str += i
print(str)
| 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> |
s532034645 | p04044 | Accepted | N, L = map(int, input().split())
S = list(input() for i in range(N))
str = ""
for i in range(N-1):
for j in range(N-1):
if S[j+1] + S[j] <= S[j] + S[j+1]:
S[j], S[j+1] = S[j+1], S[j]
for i in S:
str += i
print(str)
| 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> |
s909700663 | p04044 | Accepted | # coding: utf-8
# Your code here!
N, L = map(int, input().split())
arr = [input() for i in range(N)]
sort_arr = sorted(arr)
for i in range(len(sort_arr)):
print(sort_arr[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> |
s969150092 | p04044 | Accepted | def main():
n, l = map(int, input().split())
words = [input() for i in range(n)]
# words = []
# for i in range(n):
# words.append(input())
words.sort()
print(''.join(words))
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> |
s762151112 | p04044 | Accepted | def main():
n, l = map(int, input().split())
words = []
for i in range(n):
words.append(input())
words.sort()
print(''.join(words))
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> |
s114066811 | p04044 | Accepted | N, L = map(int, input().split())
S = sorted([input() for i in range(N)])
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> |
s255634973 | p04044 | Accepted | N, L = map(int, input().split())
S = []
for _ in range(N):
S.append(input())
S.sort()
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> |
s892471225 | p04044 | Accepted | n,l = map(int,input().split())
s = ["" for i in range(n)]
for i in range(n):
s[i] = input()
s.sort()
a =""
for i in s:
a += i
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> |
s606801588 | p04044 | Accepted | N,L = map(int,input().split())
S = [input() for i in range(N)]
S = sorted(S)
str = ''
for i in range(N):
str += S[i]
print(str)
| 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> |
s136971510 | p04044 | Accepted | n, l = map(int, input().split())
words = [""] * n
for i in range(n):
words[i] = input()
words.sort()
print("".join(words)) | 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> |
s565601045 | p04044 | Accepted | n,l = list(map(int, input().split()))
s = []
for i in range(n):
s.append(input())
s.sort()
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> |
s116168848 | p04044 | Accepted | n, l = [int(x) for x in input().split()]
s = [0] * n
for i in range(n):
s[i] = input()
s.sort()
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> |
s700856194 | p04044 | Accepted | nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()
N, L = nl()
Ss = []
for i in range(N):
Ss.append(s())
print(''.join(sorted(Ss)))
| 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> |
s357191186 | p04044 | Accepted | p=input().rstrip().split(' ')
l=[]
for i in range(0,int(p[0])):
s=input().rstrip()
l.append(s)
l.sort()
print(''.join(l))
| 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> |
s094679998 | p04044 | Accepted | # encoding:utf-8
import copy
import random
import bisect #bisect_left これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
N,L = LI()
S = [0 for i in range(N)]
for i in range(N):
S[i] = str(input())
S.sort()
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> |
s084763881 | p04044 | Accepted | def abc():
n, l = map(int, input().split())
s = []
for i in range(n):
s.append(input().rstrip())
s.sort()
print(''.join(s))
abc()
| 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> |
s103548902 | p04044 | Accepted | n, l = map(int, input().strip().split())
s_list = [input() for _ in range(n)]
s_list.sort()
for s in s_list:
print(s, end='')
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> |
s784276325 | p04044 | Accepted | n, l = map(int, input().split())
s_list = [input() for _ in range(n)]
s_list.sort()
for s in s_list:
print(s, end='')
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> |
s407173672 | p04044 | Accepted | N, L=map(int, input().split())
lst = []
ans = ""
for i in range(N):
lst.append(input())
lst.sort()
for i in range(len(lst)):
ans += lst[i]
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> |
s443942758 | p04044 | Accepted | N, L = list(map(int, input().split()))
S = []
for i in range(N):
S.append(input())
S.sort()
S2 = ""
for item in S:
S2 += item
print(S2)
| 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> |
s311983357 | p04044 | Accepted | N, L = map(int, input().split())
S_list = list(input() for i in range(N))
S_list.sort()
print(''.join(S_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> |
s920092180 | p04044 | Accepted | N, L = map(int, input().split())
S_list = list(input() for i in range(N))
S_list.sort()
ans = ''
for s in S_list:
ans += s
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> |
s390953746 | p04044 | Accepted | # B - 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition)
n, l=map(int,input().split())
s = sorted([input() 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> |
s488603751 | p04044 | Accepted | n,l=map(int,input().split())
words=[]
for i in range(n):
words.append(input())
for i in range(l-1,-1,-1):
words.sort(key=lambda x:ord(x[i]))
ans=""
for i in range(n):
ans+=words[i]
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> |
s669172888 | p04044 | Accepted | N,L = map(int, input().split())
S = [input() for _ in range(N)]
S = sorted(S)
string = ''
for i in range(N):
string += S[i]
print(string) | 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> |
s776253590 | p04044 | Accepted | n, l = map(int , input().split())
s = sorted([input() for i in range(n)])
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> |
s355598444 | p04044 | Accepted | N,L = [int(i) for i in input().split()]
S = [input() for _ in range(N)]
S.sort()
ans = ''
for i in S:
ans += i
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> |
s271851924 | p04044 | Accepted | [n,l]=[int(_) for _ in input().split()]
s=[]
for i in range(n):
s.append(input())
s.sort()
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> |
s217224246 | p04044 | Accepted | n, l = map(int, input().split())
strings = [input() for _ in range(n)]
strings.sort()
s = ''
for i in range(n):
s += strings[i]
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> |
s079029955 | p04044 | Accepted | n, l = map(int, input().split())
s = []
for i in range(n):
s.append(input())
s.sort()
ans = ""
for word in s:
ans += word
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> |
s989018457 | p04044 | Accepted | N, L = map(int,input().split())
S = list(input() for _ in range(N))
for i in sorted(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> |
s204649663 | p04044 | Accepted | n, l = map(int, input().split())
s = [input() for _ in range(n)]
for i in sorted(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> |
s172062363 | p04044 | Accepted | n, l = map(int, input().split())
dat_s = []
for i in range(n):
s = input()
dat_s.append(s)
dat_s.sort()
print("".join(dat_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> |
s883072364 | p04044 | Accepted | n, l = map(int, input().split())
sList = []
for i in range(n):
sList.append(input())
sList.sort()
print(''.join(sList)) | 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> |
s207895896 | p04044 | Accepted | ###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###
N, L = mi()
print(''.join(sorted([input() for _ in range(N)])))
| 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> |
s822812434 | p04044 | Accepted | N, L = map(int, input().split())
words = []
for i in range(0, N):
words.append(input())
words.sort()
ans = ''
for i in range(0, N):
ans = ans + words[i]
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> |
s316079377 | p04044 | Accepted | N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
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> |
s310060129 | p04044 | Accepted | N,L=map(int,input().split());print(''.join(sorted([input() for i in range(N)]))) | 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> |
s243105295 | p04044 | Accepted | n, l = [int(i) for i in input().split()]
lst = []
for i in range(n):
lst.append(input())
lst.sort()
ans = ""
for i in lst:
ans += i
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> |
s611078617 | p04044 | Accepted | n, l =list(map(int,input().split()))
a = [input() for i in range(n)]
a.sort()
print(*a,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> |
s365021331 | p04044 | Accepted | n,l = map(int,input().split())
s = []
for i in range(n):
w = input()
s.append(w)
for i in sorted(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> |
s373605571 | p04044 | Accepted | # 長さが同じなので単純
N,L = map(int,input().split())
S = [input() for _ in range(N)]
S.sort()
answer = ''.join(S)
print(answer) | 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> |
s184852331 | p04044 | Accepted | n,l=map(int,input().split(" "))
word=[]
for i in range(n):
w =input()
word.append(w)
word_sorted = sorted(word)
for i in word_sorted:
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> |
s846617218 | p04044 | Accepted | n,l = map(int,input().split())
s = [input() for i in range(n)]
s.sort()
letter = ""
for i in range(n):
letter += s[i]
print(letter) | 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> |
s338398903 | p04044 | Accepted | # -*- coding: utf-8 -*-
n, l = map(int, input().split())
s = [input() for i in range(n)]
s.sort()
for i in range(n):
print(s[i], sep='', 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> |
s783367937 | p04044 | Accepted | N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
ans = ""
for s in S:
ans+=s
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> |
s215425431 | p04044 | Accepted | N,L = map(int,input().split())
s = sorted([input() for i in range(N)])
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> |
s801279655 | p04044 | Accepted | n, l = map(int, input().split())
li = []
for _ in range(n):
li.append(input())
sortedli = sorted(li)
ans = ''
for s in sortedli:
ans += s
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> |
s356036365 | p04044 | Accepted | # 貪欲
n, _ = map(int, input().split())
ans = ''.join(list(sorted([input() for _ in range(n)])))
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> |
s882051189 | p04044 | Accepted | N, L = map(int, input().split())
strs = [input() for _ in range(N)]
print("".join(sorted(strs))) | 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> |
s340113957 | p04044 | Accepted | nk = list(map(int,input().split(' ')))
doc = []
for i in range(0,nk[0]):
#doc[i] = input()
doc.append(input())
doc.sort()
print(''.join(doc)) | 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> |
s526462295 | p04044 | Accepted | N,L=(int(i) for i in input().split())
S=[input() for i in range(N)]
S.sort()
X=""
for i in range(N):
X=X+S[i]
print(X) | 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> |
s752798378 | p04044 | Accepted | def main():
n,l=map(int,input().split(' '))
l_list=[]
for i in range(n):
l_list.append(input())
sorted_l = sorted(l_list)
for i in sorted_l:
print(i,end='')
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> |
s593432849 | p04044 | Accepted | n, l = [int(v) for v in input().split()]
s_s = [input() for i in range(n)]
s_s.sort()
ans = "".join(s_s)
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> |
s629419542 | p04044 | Accepted | n, l = list(map(int, input().split()))
arr = list()
for i in range(0, n):
arr.append(input())
arr.sort()
for str in arr:
print(str, end="")
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> |
s279845766 | p04044 | Accepted | N, L = map(int, input().split())
word = [input() for i in range(N)]
print(''.join(sorted(word, reverse=False)))
| 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> |
s278748943 | p04044 | Accepted | N, L = map(int, input().split())
S = []
for i in range(N):
s_i = input().strip()
S.append(s_i)
S = sorted(S)
print("".join([x for x in 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> |
s974939289 | p04044 | Accepted | N, L = map(int, input().split())
S = [input() for i in range(N)]
S.sort()
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> |
s306845967 | p04044 | Accepted | N,L=map(int,input().split())
S=[input() for _ in range(N)]
S.sort()
answer=""
for i in range(N):
answer+=S[i]
print(answer) | 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> |
s829564653 | p04044 | Accepted | N, L = map(int, input().split())
lists = []
for i in range(N):
S = str(input())
lists.append(S)
lists.sort()
ans = "".join(lists)
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> |
s531342910 | p04044 | Accepted | n, l = map(int, input().split())
a = []
for x in range(n):
a.append(input())
a.sort()
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> |
s967666367 | p04044 | Accepted | n, l = map(int, input().split())
S = []
for _ in range(n):
S.append(input())
S.sort()
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> |
s234968419 | p04044 | Accepted | N, L = map(int, input().split())
S = [''.join([i for i in input().split()]) for i in range(N)]
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> |
s204646218 | p04044 | Accepted | int = list(map(int, input().split()))
li = [input() for i in range(int[0])]
li = sorted(li)
for i in range(int[0]):
print(li[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> |
s491056276 | p04044 | Accepted | from functools import reduce
n, l = map(lambda x: int(x), input().split(' '))
s = []
for i in range(n):
s.append(input())
def concat_str(a, b):
return a + b
s.sort()
print(reduce(concat_str, 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> |
s622953903 | p04044 | Accepted | a,b=map(int,input().split())
List=[]
for i in range(a):
List.append(input())
print("".join(sorted(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> |
s455963811 | p04044 | Accepted | l,m=map(int,input().split())
word=[]
for i in range(l):
word.append(input())
sw=sorted(word)
print("".join(sw))
| 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> |
s974418901 | p04044 | Accepted | n,l = map(int,input().split())
s = [input() for i in range(n)]
s.sort()
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> |
s680376316 | p04044 | Accepted | N,L= map(int,input().split())
text = []
for i in range(N):
text.append(input())
text.sort()
ans = "".join(text)
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> |
s670403501 | p04044 | Accepted | N,L = list(map(int, input().split()))
list = []
for n in range(N):
list.append(input())
list.sort()
literal = ""
for n in range(N):
literal +=list[n]
print(literal) | 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> |
s716279800 | p04044 | Accepted | n,l=map(int,input().split())
ans=''
words=[]
for i in range(n):
s=input()
words.append(s)
words_sort=sorted(words)
for i in range(n):
ans=ans+words_sort[i]
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> |
s597393743 | p04044 | Accepted | n,l = map(int,input().split())
list = sorted([input() for i in range(n)])
print("".join(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> |
s248342634 | p04044 | Accepted | N,L = map(int,input().split())
S = [input() for _ in range(N)]
S.sort()
for n in range(1,N):
S[0] = S[0]+S[n]
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> |
s251677546 | p04044 | Accepted | N, L = map(int,input().split())
str_list = []
for i in range(N):
str_list.append(input())
str_list.sort()
ans = "".join(str_list)
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> |
s779382714 | p04044 | Accepted | N,L=map(int,input().split())
A=[]
for i in range(N):
A.append(input())
print("".join(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> |
s731124956 | p04044 | Accepted | N, L = map(int,input().split())
s_list = []
for i in range(N):
s_list.append(input())
print("".join(sorted(s_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> |
s895219769 | p04044 | Accepted | n,l=map(int,input().split())
dic=[]
for i in range(n):
x=input()
dic.append(x)
print("".join(sorted(dic)))
| 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.