buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> #include <vector> using namespace std; int main() { int N, L; vector<string> S(N); cin >> L >> N; for (int i = 0; i < N; i++) { cin >> S.at(i); } sort(S.begin(), S.end()); for (auto S_dash : S) { cout << S_dash; } }
#include <bits/stdc++.h> #include <vector> using namespace std; int main() { int N, L; vector<string> S(101); cin >> N >> L; for (int i = 0; i < N; i++) { cin >> S.at(i); } sort(S.begin(), S.end()); for (auto S_dash : S) { cout << S_dash; } cout << endl; }
[["-", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1,...
1
87
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define f first #define s second #define pb push_back #define mp make_pair #define l...
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define f first #define s second #define pb push_back #define mp make_pair #define l...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
258
#include <algorithm> #include <iostream> using namespace std; int main() { int N, L; cin >> N >> L; string a[60]; cin >> N >> L; for (int i = 0; i < N; i++) cin >> a[i]; sort(a, a + N); string ans; for (int i = 0; i < N; i++) { ans += a[i]; } cout << ans << endl; }
#include <algorithm> #include <iostream> using namespace std; int main() { int N, L; cin >> N >> L; string a[110]; string ans; for (int i = 0; i < N; i++) cin >> a[i]; sort(a, a + N); for (int i = 0; i < N; i++) { ans += a[i]; } cout << ans << endl; }
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, ...
1
99
n, l = map(int, input().split()) s = list([input() for i in ramge(n)]) s1 = s.sort() print("".join(s1))
n, l = map(int, input().split()) s = [input() for i in range(n)] s.sort() print("".join(s))
[["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 658, 0, 659, 12, 652, 63, 22], ["+", 0, 662, 12, 658, 0, 659, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-...
5
50
#include <algorithm> #include <cmath> #include <iostream> #include <string> using namespace std; #define INF 1e9 #define rep(i, n) for (int i = 0; i < n; i++) #define sortI(a, b, c) c == 0 ? sort(a, a + b) : sort(a, a + b, greater<int>()) int digit(int n) { int res = 0; while (n > 0) { res += n % 10; n /= ...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define INF 1e9 #define rep(i, n) for (int i = 0; i < n; i++) #define sortI(a, b, c) c == 0 ? sort(a, a + b) : sort(a, a + b, greater<int>()) #define vi vector<int> #define vs vector<string> int digit(int...
[["+", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-",...
1
138
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string str; int a, b; cin >> a >> b; string StringArray[a]; for (int i = 0; i < a; i++) { cin >> str; StringArray[i] = str; cout << StringArray[i] << endl; } sort(StringArray, StringArray + a); for...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string str; int a, b; cin >> a >> b; string StringArray[a]; for (int i = 0; i < a; i++) { cin >> str; StringArray[i] = str; } sort(StringArray, StringArray + a); for (int i = 0; i < a; i++) { cout ...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0,...
1
107
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { int i, j; int N, L; scanf("%d %d", &N, &L); char s[N][64]; char l[64]; for (i = 0; i <= N - 1; i++) { scanf("%s", s[i]); } for (i = 0; i <= N - 2; i++) { for (j = i + 1; j <= N - 2; j++) { i...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { int i, j; int N, L; scanf("%d %d", &N, &L); char s[N][101]; char l[101]; for (i = 0; i <= N - 1; i++) { scanf("%s", s[i]); } for (i = 0; i <= N - 1; i++) { for (j = i + 1; j <= N - 1; j++) { ...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22], ["-", 31, 2, 3, 4, 0, 69, 71, 16, 17, 72], ["-", 31, 2, 3, 4, 0...
0
220
n, l = map(int,input().split()) s = [] for i in range(n): s.append(input()) print(s) s.sort() print(s) print("".join(s))
n, l = map(int,input().split()) s = [] for i in range(n): s.append(input()) #print(s) s.sort() #print(s) print("".join(s))
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
59
arr = gets.strip.split(" ").map!(&:to_i) n = arr[0] str = Array.new(n) n.times do |i| str[i] = gets.strip end n.times do |i| min = i i.step(n-1) do |j| if(str[min] > str[j]) then s = str[min] str[min] = str[j] str[j] = s min = j end end end n.times do |i| print str[i] end put...
arr = gets.strip.split(" ").map!(&:to_i) n = arr[0] str = Array.new(n) n.times do |i| str[i] = gets.strip end n.times do |i| min = i i.step(n-1) do |j| if(str[min] > str[j]) then min = j end end s = str[i] str[i] = str[min] str[min] = s end n.times do |i| print str[i] end puts
[["+", 8, 736, 0, 121, 64, 749, 0, 662, 31, 22], ["+", 8, 736, 0, 121, 64, 749, 0, 662, 0, 32], ["+", 8, 736, 0, 121, 64, 749, 0, 662, 12, 22], ["+", 0, 652, 196, 737, 8, 736, 0, 121, 0, 444], ["+", 196, 737, 8, 736, 0, 652, 196, 737, 0, 444], ["-", 0, 121, 64, 749, 0, 662, 12, 742, 0, 22], ["+", 196, 737, 8, 736, 0, 6...
4
124
#include <bits/stdc++.h> using namespace std; int main() { vector<string> s; int n, l; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s.at(i); } sort(s.begin(), s.end()); for (int i = 0; i < n; i++) { cout << s.at(i); } cout << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, l; cin >> n >> l; vector<string> s(n); for (int i = 0; i < n; i++) { cin >> s.at(i); } sort(s.begin(), s.end()); for (int i = 0; i < n; i++) { cout << s.at(i); } cout << endl; }
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9...
1
98
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<string> l(N); for (int i = 0; i < N; ++i) cin >> l[i]; sort(l.begin(), l.end()); // a[0:N] ใ‚’ๅคงใใ„้ †ใซใ‚ฝใƒผใƒˆ string new_s; for (auto &s : l) { new_s += s; } cout << new_s; }
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S(N); for (int i = 0; i < N; ++i) cin >> S[i]; sort(S.begin(), S.end()); // a[0:N] ใ‚’ๅคงใใ„้ †ใซใ‚ฝใƒผใƒˆ string new_s; for (auto &s : S) { new_s += s; } cout << new_s; }
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["-", 0, 7, 8, 1, 0, 16, 12, 69, 28, 22], ["+", 0, 7, 8, 1, 0, 16, ...
1
86
strings,num = map(int,input().split()) result = "" str_array = [] for i in range (num): str_array.append(input()) str_array.sort() for i in range (num): result += str_array[i] print(result)
num,strings = map(int,input().split()) result = "" str_array = [] for i in range (num): str_array.append(input()) str_array.sort() for x in range (num): result = result + str_array[x] print(result)
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", ...
5
63
<?php fscanf(STDIN, "%d %d", $n, $l); $array = array(); for($i = 0; $i < $n; $i++){ $array[$i] = trim(fget(STDIN)); } $array = sort($array); for($j = 0; $j < $n; $j++){ print $array[$j]; }
<?php fscanf(STDIN, "%d %d", $n, $l); $array = array(); for($i = 0; $i < $n; $i++){ fscanf(STDIN, "%s", $array[$i]); } sort($array); for($j = 0; $j < $n; $j++){ print $array[$j]; }
[["+", 0, 7, 0, 9, 0, 1, 0, 613, 63, 141], ["+", 0, 9, 0, 1, 0, 613, 3, 3, 0, 24], ["+", 0, 1, 0, 613, 3, 3, 0, 28, 0, 141], ["+", 0, 9, 0, 1, 0, 613, 3, 3, 0, 21], ["+", 0, 613, 3, 3, 0, 28, 0, 609, 0, 62], ["+", 0, 613, 3, 3, 0, 28, 0, 609, 0, 610], ["-", 0, 7, 0, 9, 0, 1, 0, 11, 0, 32], ["-", 0, 9, 0, 1, 0, 11, 12, ...
6
93
/* ใ“ใ‚Œใ‚’ๅ…ฅใ‚ŒใฆๅฎŸ่กŒ g++ code.cpp ./a.out */ #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1,...
/* ใ“ใ‚Œใ‚’ๅ…ฅใ‚ŒใฆๅฎŸ่กŒ g++ code.cpp ./a.out */ #include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1,...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0...
1
418
N , L= map(int,input().split()) lst = [] Str = '' for i in range(N): lst.append(input()) lst.sort() for j in range(N): Str += Slst[j] print(Str)
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)
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 654], ["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 655], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 654], ["+...
5
63
#include <algorithm> #include <cctype> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; void sout(string *a, string *b) { if (*a > *b) { s...
#include <algorithm> #include <cctype> #include <cstdlib> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <sstream> #include <stdio.h> #include <string> #include <vector> using namespace std; void sout(string *a, string *b) { if (*a > *b) { s...
[["+", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9...
1
178
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> bemiho(2 * N); for (int i = 0; i < N; i++) { cin >> bemiho.at(i); } for (int i = 0; i < N; i++) { bemiho.at(N + i) = bemiho.at(i); } sort(bemiho.begin(), bemiho.end()); vector<string> katoshi(N)...
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> bemiho(N); for (int i = 0; i < N; i++) { cin >> bemiho.at(i); } sort(bemiho.begin(), bemiho.end()); vector<string> katoshi(N); for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { kat...
[["-", 0, 43, 49, 50, 51, 4, 0, 16, 31, 13], ["-", 0, 43, 49, 50, 51, 4, 0, 16, 17, 48], ["-", 0, 1, 0, 16, 12, 2, 63, 118, 28, 22], ["-", 0, 1, 0, 16, 12, 2, 63, 118, 17, 131], ["-", 0, 1, 0, 16, 12, 2, 63, 118, 119, 120], ["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["-", 0, 1, 0, 1...
1
172
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define F first #define S second #define forn(i, n) for (int i = 0; i < (int)n; i++) #define pb push_back #define fastIO ios::sync_with_stdio(0), cin.tie(0); #define...
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)(x).size() #define F first #define S second #define forn(i, n) for (int i = 0; i < (int)n; i++) #define pb push_back #define fastIO ios::sync_with_stdio(0), cin.tie(0); #define...
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, ...
1
145
package main import( "fmt" "sort" ) func main() { var n, l int fmt.Scan(&n, &l) s := make([]string, n) fmt.Scan(s) sort.Strings(s) for _, t := range s { fmt.Print(t) } }
package main import( "fmt" "sort" ) func main() { var n, l int fmt.Scan(&n, &l) s := make([]string, n) for i := range s { fmt.Scan(&s[i]) } sort.Strings(s) for _, t := range s { fmt.Print(t) } }
[["+", 0, 434, 0, 435, 8, 196, 0, 7, 0, 88], ["+", 8, 196, 0, 7, 0, 442, 31, 432, 0, 22], ["+", 0, 435, 8, 196, 0, 7, 0, 442, 0, 466], ["+", 0, 435, 8, 196, 0, 7, 0, 442, 0, 475], ["+", 0, 435, 8, 196, 0, 7, 0, 442, 12, 22], ["+", 0, 435, 8, 196, 0, 7, 8, 196, 0, 45], ["+", 0, 1, 0, 2, 3, 4, 0, 91, 17, 67], ["+", 0, 2,...
7
80
#include <bits/stdc++.h> #include <vector> using namespace std; typedef long long ll; int main(void) { int n, l; cin >> n >> l; vector<string> a(n); for (int i = 0; i < n; i++) { string s; cin >> s; sort(s.begin(), s.end()); a[i] = s; } sort(a.begin(), a.end()); for (int i = 0; i < n; i++)...
#include <bits/stdc++.h> #include <vector> using namespace std; typedef long long ll; int main(void) { int n, l; cin >> n >> l; vector<string> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); for (int i = 0; i < n; i++) { cout << a[i]; } }
[["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-...
1
123
n, l = map(int, input().split()) s = list() for _ in range(n): s.append(input()) print(''.join(s.sort()))
n, l = map(int, input().split()) s = list() for _ in range(n): s.append(input()) s.sort() print(''.join(s))
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["...
5
51
a = input().split(" ") s = [input() for i in range(a)] print("".join(sorted(s))
a = input().split(" ") s = [input() for i in range(int(a[0]))] print("".join(sorted(s)))
[["+", 0, 659, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 3, 4, 0, 652, 3, 4, 0, 206, 0, 70], ["+", 3, 4, 0, 652, 3, 4, 0, 206, 206, 612], ["+", 3, 4, 0, 652, 3, 4, 0, 206, 0, 73], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
38
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; int m...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string.h> #include <string> #include <vector> using namespace std; int m...
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 8, 9, ...
1
136
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) int main() { int L, N; cin >> N >> L; string S[N]; REP(i, N) { cin >> S[i]; cout << S[i] << endl; } sort(S, S + N, [](const string x, const string y) { return x < y; }); string ans; REP(i, N) { ans += ...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < n; i++) int main() { int L, N; cin >> N >> L; string S[N]; REP(i, N) { cin >> S[i]; } sort(S, S + N, [](const string x, const string y) { return x < y; }); string ans; REP(i, N) { ans += S[i]; } cout << ans << endl; ...
[["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0...
1
116
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; string a[n + 1]; for (int i = 1; i <= n; i++) { cin >> a[i]; } sort(a + 1, a + n + 1); string res = ""; for (int i = 1; i <= n; i++) { res += a[i]; } cout << res; }
#include <bits/stdc++.h> using namespace std; int main() { int n; int l; cin >> n; cin >> l; string a[n + 1]; for (int i = 1; i <= n; i++) { cin >> a[i]; } sort(a + 1, a + n + 1); string res = ""; for (int i = 1; i <= n; i++) { cout << a[i]; } }
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 7, 8, 9, 0, 1, 0, 11,...
1
96
/* ๏ผต๏ผด๏ผฆ๏ผ๏ผ˜ */ #include <algorithm> #include <array> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <type_traits> #include <unordered_map> #include <unordered_set> #include...
/* ๏ผต๏ผด๏ผฆ๏ผ๏ผ˜ */ #include <algorithm> #include <array> #include <deque> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <type_traits> #include <unordered_map> #include <unordered_set> #include...
[["-", 8, 9, 0, 43, 39, 343, 141, 344, 141, 78], ["-", 0, 43, 39, 343, 141, 344, 3, 347, 0, 18], ["-", 141, 344, 3, 347, 0, 77, 39, 343, 345, 348], ["-", 141, 344, 3, 347, 0, 77, 39, 343, 0, 349], ["-", 141, 344, 3, 347, 0, 77, 39, 343, 141, 78], ["-", 0, 43, 39, 343, 141, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9,...
1
396
#! /usr/bin/env python # -*- coding: utf-8 -*- import pdb import sys F = sys.stdin N, L = F.readline().rstrip().split() print(type(int(N))) N = int(N) L = int(L) a = [F.readline().rstrip() for x in range(N)] a.sort() answer = ''.join(a) print(answer)
#! /usr/bin/env python # -*- coding: utf-8 -*- import pdb import sys F = sys.stdin N, L = F.readline().rstrip().split() N = int(N) L = int(L) a = [F.readline().rstrip() for x in range(N)] a.sort() answer = ''.join(a) print(answer)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["-", 0, 656, 0, 1, ...
5
88
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> char nome[120][120]; int ord(const void *x, const void *y) { // const char *a = x, *b=y; return strcmp(x, y); } int ord_indice(const void *x, const void *y) { const int *a = x, *b = y; return strcmp(nome[*a], nome[*b]); } int main(...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> char nome[120][120]; int ord(const void *x, const void *y) { // const char *a = x, *b=y; return strcmp(x, y); } int ord_indice(const void *x, const void *y) { const int *a = x, *b = y; return strcmp(nome[*a], nome[*b]); } int main(...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, ...
0
207
#pragma region header #include <bits/stdc++.h> using namespace std; #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_CAT_I(x, y) x##y //#define CPP_STR(x) CPP_STR_I(x) //#define CPP_STR_I(args...) #args //#define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = u...
#pragma region header #include <bits/stdc++.h> using namespace std; #define CPP_CAT(x, y) CPP_CAT_I(x, y) #define CPP_CAT_I(x, y) x##y //#define CPP_STR(x) CPP_STR_I(x) //#define CPP_STR_I(args...) #args //#define ASSERT(expr...) assert((expr)) using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = u...
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3...
1
660
N, L = map(int, input().split()) S = sorted([''.join(sorted(input())) for _ in range(N)]) print(''.join(S))
N, L = map(int, input().split()) S = sorted([input() for _ in range(N)]) print(''.join(S))
[["-", 0, 658, 8, 652, 63, 319, 500, 557, 0, 654], ["-", 0, 658, 8, 652, 63, 319, 500, 557, 0, 655], ["-", 3, 4, 0, 658, 8, 652, 63, 319, 0, 131], ["-", 3, 4, 0, 658, 8, 652, 63, 319, 319, 22], ["-", 3, 4, 0, 658, 8, 652, 3, 4, 0, 24], ["-", 0, 658, 8, 652, 3, 4, 0, 652, 63, 22], ["-", 8, 652, 3, 4, 0, 652, 3, 4, 0, 24...
5
52
#include <bits/stdc++.h> using namespace std; signed main() { int n; cin >> n; vector<string> s(n); for (auto &&u : s) cin >> u; sort(begin(s), end(s)); string ret = ""; for (auto &&u : s) ret += u; cout << ret << endl; }
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int n, l; cin >> n >> l; vector<string> s(n); for (auto &&u : s) cin >> u; sort(begin(s), end(s)); string ret = ""; for (auto &&u : s) ret += u; cout << ret << endl; }
[["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]]
1
77
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, l; cin >> n >> l; vector<string> s(110); for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s.begin(), s.end()); for (int i = 0; i < n; i++) { cout << s[i]; } cout << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, l; cin >> n >> l; vector<string> V(n); //ใพใ‚ใ„ใ„ใ‚„ for (int i = 0; i < n; i++) { cin >> V[i]; } sort(V.begin(), V.end()); for (int i = 0; i < n; i++) { cout << V[i]; } cout << endl; }
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 0, 43, 49, 53, 54, 55, 0, 56, 39, 78], ["-"...
1
103
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, l; cin >> n >> l; // l: ๆ–‡ๅญ—ๅˆ—ใฎ้•ทใ• vector<string> word(n); for (int i = 0; i < n; ++i) { string w; cin >> w; sort(w.begin(), w.end()); word[i] = w; } sort(word.begin(), word.end()); for (auto ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, l; cin >> n >> l; // l: ๆ–‡ๅญ—ๅˆ—ใฎ้•ทใ• vector<string> word(n); for (int i = 0; i < n; ++i) { string w; cin >> w; word[i] = w; } sort(word.begin(), word.end()); for (auto str : word) cout << str; ...
[["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21],...
1
115
#include <stdio.h> #include <stdlib.h> #include <string.h> int compare_string(const void *a, const void *b) { return *(char *)a - *(char *)b; } int main() { int N, L, i; scanf("%d%d", &N, &L); char moji[110][110]; for (i = 0; i < N; i++) { scanf("%s", moji[i]); } qsort(moji, N, sizeof(moji[0]), ...
#include <stdio.h> #include <stdlib.h> #include <string.h> int compare_string(const void *a, const void *b) { return strcmp(a, b); } int main() { int N, L, i; scanf("%d%d", &N, &L); char moji[110][110]; for (i = 0; i < N; i++) { scanf("%s", moji[i]); } qsort(moji, N, sizeof(moji[0]), compare_strin...
[["-", 8, 9, 0, 37, 0, 16, 31, 66, 17, 48], ["+", 0, 14, 8, 9, 0, 37, 0, 2, 63, 22], ["-", 0, 16, 31, 66, 28, 74, 39, 77, 39, 40], ["-", 31, 66, 28, 74, 39, 77, 49, 142, 0, 48], ["-", 0, 37, 0, 16, 31, 66, 28, 74, 0, 25], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 33], ["-", 8, 9, 0, 37, 0, 16, 12, 66, 17, 48], ["-", 0, 37, ...
0
152
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <string> #include <vector> int main(void) { int i, n, m; using namespace std; cin >> n >> m; vector<char> s(n); for (i = 0; i < n; i++) { cin >> s[i]; } sort(s.begin(), s.end()); for (i = 0; i < n; i++) { cout <...
#include <algorithm> #include <iostream> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; int main(void) { int i, n, m; string t; cin >> n >> m; vector<string> s(n); for (i = 0; i < n; i++) { cin >> s[i]; } sort(s.begin(), s.end()); for (i = 0; i < n; i++...
[["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 233], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 256], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 340, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 340, 0, 233], ["-", 0, 30, 0, 14, 8, 9, 0, 340, 0, 256], ["-", 0, 30, 0, 14, 8, 9, 0, 340, 0, 22], ["+", 0, ...
1
107
N, L = map(int, input().split()) s = [input() for i in range(n)] s = sorted(s) print(*s, sep="")
N,L =map(int,input().split()) s=sorted([input() for i in range(N)]) print(*s,sep="")
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 12, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["+", 0, 658, 0, 659, 12, 652, 3, 4, 0, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-"...
5
46
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S(N); for (int i = 0; i < N; i++) { cin >> S.at(i); } sort(S.begin(), S.end()); cout << N << " " << L << endl; for (int i = 0; i < N; i++) { cout << S.at(i) << en...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S(N); for (int i = 0; i < N; i++) { cin >> S.at(i); } sort(S.begin(), S.end()); string s; for (int i = 0; i < N; i++) { s += S.at(i); } cout << s << endl; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-",...
1
115
#include <bits/stdc++.h> using namespace std; const int INF = 1012345678; int main() { int n, k = 0; cin >> n >> k; vector<string> list(n); for (int i = 0; i < n; i++) { cin >> list[i]; } sort(list.begin(), list.end()); string ans = ""; for (int i = 0; i < k; i++) { ans += list[i]; } cout ...
#include <bits/stdc++.h> using namespace std; int main() { int n, k = 0; cin >> n >> k; vector<string> list(n); for (int i = 0; i < n; i++) { cin >> list[i]; } sort(list.begin(), list.end()); string ans = ""; for (int i = 0; i < list.size(); i++) { ans += list[i]; } cout << ans << "\n"; r...
[["-", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, ...
1
118
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int n, l; string s[110]; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; sort(s[i].begin(), s[i].end()); } sort(s, s + n); string res = ""; for (int i = 0; i < n; i++) { res += s[i]; } ...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int n, l; string s[110]; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s, s + n); string res = ""; for (int i = 0; i < n; i++) { res += s[i]; } cout << res << endl; return 0; }
[["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 2, 63, 118, 28, 69, 28, 22], ["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 70], ["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 73], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["-", 0, 2, 3,...
1
124
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> s(N); for (int i = 0; i < N; i++) { cin >> s.at(0); } sort(s.begin(), s.end()); string t = ""; for (int i = 0; i < N; i++) { t += s.at(i); } cout << t << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> s(N); for (int i = 0; i < N; i++) { cin >> s.at(i); } sort(s.begin(), s.end()); for (int i = 0; i < N; i++) { cout << s.at(i); } cout << endl; }
[["-", 0, 1, 0, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 16, 12, 2, 3, 4, 0, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 62], ["-", 0, 7, 8, 9, 0, 1, 0, 11,...
1
109
#include <bits/stdc++.h> using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef long long int ll; #define EPS (1e-7) #define INF ...
#include <bits/stdc++.h> using namespace std; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef long long int ll; #define EPS (1e-7) #define INF ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 2, 3, 4, 0, 218, 369, 370, 0, 70], ["-", 0, 2, 3, 4, 0, 218, 369, 370, 0, 73], ["-", 3, 4, 0, 218, 49, 185, 54, 55, 0, 24], ["-", 49, 185, 54, 55, 0, 56, 0, 153, 0, 154], ["-", 49, 185, 54, 55, 0, 56, 39, 361, 0, 190], ["-", 49, 185, 54, 55, 0, 56, 49, 352, 0, 67], ["-", ...
1
270
n,l=map(int,input().split()) ans=[] for i in range(n): s=list(input()) ans.append(s) ans.sort() answer="" for i in ans: answer+=i print(answer)
n,l=map(int,input().split()) ans=[] for i in range(n): s=list(input()) ans.append(s) ans.sort() answer="" for i in ans: p="".join(i) answer+=p print(answer)
[["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 662, 12, 652, 63, 319, 500, 557, 0, 654], ["+", 0, 662, 12, 652, 63, 319, 500, 557, 0, 655], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 319, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0,...
5
63
#include <bits/stdc++.h> using namespace std; /* REPmacro */ #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define REPR(i, n) for (int i = ((int)(n)-1); i >= 0; --i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) /*alias*/ #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((int)...
#include <bits/stdc++.h> using namespace std; /* REPmacro */ #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define REPR(i, n) for (int i = ((int)(n)-1); i >= 0; --i) #define FOR(i, m, n) for (int i = (int)(m); i < (int)(n); ++i) /*alias*/ #define ALL(x) (x).begin(), (x).end() #define SZ(x) ((int)...
[["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["+", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 16, 31, 2, 3, 4, 0, 22...
1
415
N, L = map(int, input().split()) Slist = list(input() for _ in range(N)) print(''.join(Slist.sort()))
N, L = map(int, input().split()) Slist = list(input() for _ in range(N)) Slist.sort() print(''.join(Slist))
[["+", 0, 656, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 0, 656, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["-", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["...
5
45
#include <algorithm> #include <cstdio> #include <cstring> #include <functional> using namespace std; int main(void) { int n, l, i, j; char s[100][101], wk[101]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", s[i]); for (i = 0; i < n; i++) sort(s[i], s[i] + l); for (i = 0; i < n - 1; i++...
#include <algorithm> #include <cstdio> #include <cstring> #include <functional> using namespace std; int main(void) { int n, l, i, j; char s[100][101], wk[101]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", s[i]); // for(i=0;i<n;i++) sort(s[i],s[i]+l); for (i = 0; i < n - 1; i++) { for...
[["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["-", 8, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["-", 0, 7, 8, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, ...
1
207
#include <algorithm> #include <cstdio> #include <cstring> #include <functional> using namespace std; int main(void) { int n, l, i, j; char s[100][101], wk[101]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", s[i]); for (i = 0; i < n; i++) sort(s[i], s[i] + l); for (i = 0; i < n - 1; i++...
#include <algorithm> #include <cstdio> #include <cstring> #include <functional> using namespace std; int main(void) { int n, l, i, j; char s[100][101], wk[101]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", s[i]); // for(i=0;i<n;i++) sort(s[i],s[i]+l); for (i = 0; i < n - 1; i++) { for...
[["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["-", 8, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["-", 0, 7, 8, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, ...
1
229
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N, L; vector<string> S(N); cin >> N >> L; for (int i = 0; i < N; i++) { cin >> S[i]; } sort(S.begin(), S.end()); for (int i = 0; i < N; i++) { cout << S...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N, L; cin >> N >> L; vector<string> S(N); for (int i = 0; i < N; i++) { cin >> S[i]; } sort(S.begin(), S.end()); for (int i = 0; i < N; i++) { cout << S...
[["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31,...
1
118
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <s...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <st...
[["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 184], ["-", 0, 30, 0, 14, 8, 9, 0, 171, 141, 22], ["-", 8, 9, 0, 171, 0, 1, 0, 2, 63, 22], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 171, 0, 1, 0, 2, 3, 4, 0, 2...
1
189
#include <stdio.h> #include <string.h> int main() { int N, L, i, j; char s[100][101], t[101]; scanf("%d %d", &N, &L); for (i = 0; i < N; i++) { scanf("%s", s[i]); for (j = i - 1; j >= 0; j--) { if (strcmp(s[i], s[j]) < 0) { strcpy(t, s[i]); strcpy(s[i], s[j]); strcpy(s[j]...
#include <stdio.h> #include <string.h> int main() { int N, L, i, j; char s[100][101], t[101]; scanf("%d %d", &N, &L); for (i = 0; i < N; i++) { scanf("%s", s[i]); for (j = i; j > 0; j--) { if (strcmp(s[j], s[j - 1]) < 0) { strcpy(t, s[j]); strcpy(s[j], s[j - 1]); strcpy(s...
[["-", 8, 9, 0, 7, 10, 11, 12, 16, 17, 33], ["-", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 47], ["-", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22], ["+", 0, 16, 31, 2, 3, 4, 0, 69, 71, 22], ["+", 31, 2, 3, 4, 0, 69, 71, 16, 17, 33], ["+", 31, 2, 3, 4, 0, 69...
0
179
package main import ( "fmt" "sort" ) type lex []string func (s lex) Len() int { return len(s) } func (s lex) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s lex) Less(i, j int) bool { for idx := range s[i] { if s[i][idx] < s[j][idx] { return true } else if s[i][idx] > s[j][idx] { return false }...
package main import ( "fmt" "sort" ) type lex []string func (s lex) Len() int { return len(s) } func (s lex) Swap(i, j int) { s[i], s[j] = s[j], s[i] } func (s lex) Less(i, j int) bool { for idx := range s[i] { if s[i][idx] < s[j][idx] { return true } else if s[i][idx] > s[j][idx] { return false }...
[["-", 8, 196, 0, 1, 0, 2, 63, 438, 439, 22], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 0, 131], ["-", 8, 196, 0, 1, 0, 2, 63, 438, 119, 120], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["-", 0, 2, 3, 4,...
7
252
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <utility> #include <vector> #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define all(x) (x).begin(), (x).end...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <utility> #include <vector> #define rep(i, a, n) for (int i = a; i < n; i++) #define per(i, a, n) for (int i = n - 1; i >= a; i--) #define all(x) (x).begin(), (x).end...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0...
1
126
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <map> #include <cstdio> #include <stack> #include <queue> #include <fstream> #include <cstdio> #include <deque> #include <iomanip> #include <numeric> //#include<bits/stdc++.h> using namespace std; #define ok1 printf(...
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <map> #include <cstdio> #include <stack> #include <queue> #include <fstream> #include <cstdio> #include <deque> #include <iomanip> #include <numeric> //#include<bits/stdc++.h> using namespace std; #define ok1 printf(...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, ...
1
324
n,l = map(int,input().split()) s = sorted([input() for _ in range(n)]) for i in range(n): print(*s,sep="")
n,l = map(int,input().split()) s = sorted([input() for _ in range(n)]) print(*s,sep="")
[["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 88], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 36, 36, 36, 36, 0, 656, 0, 7, 0, 267], ["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 25], ["-", 36, ...
5
51
#include <stdio.h> #include <stdlib.h> #include <string.h> int cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main(void) { int n, l; char s[110][110]; scanf("%d%d", &n, &l); for (int i = 0; i < n; i++) scanf("%s", s[i]); qsort(s, n, sizeof(s[0]), cmp); for (int i = 0; i < n; i++...
#include <stdio.h> #include <stdlib.h> #include <string.h> int cmp(const void *a, const void *b) { return strcmp(a, b); } int main(void) { int n, l; char s[110][110]; scanf("%d%d", &n, &l); for (int i = 0; i < n; i++) scanf("%s", s[i]); qsort(s, n, sizeof(s[0]), cmp); for (int i = 0; i < n; i++) pri...
[["-", 8, 9, 0, 37, 0, 16, 31, 66, 17, 48], ["+", 0, 14, 8, 9, 0, 37, 0, 2, 63, 22], ["-", 0, 16, 31, 66, 28, 74, 39, 77, 39, 40], ["-", 31, 66, 28, 74, 39, 77, 49, 142, 0, 48], ["-", 0, 37, 0, 16, 31, 66, 28, 74, 0, 25], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 33], ["-", 8, 9, 0, 37, 0, 16, 12, 66, 17, 48], ["-", 0, 37, ...
0
149
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i < (int)(n); i++) #define fs first #define sc second typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main() { int n, l;...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i < (int)(n); i++) #define fs first #define sc second typedef pair<ll, ll> l_l; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) int main() { int n, l;...
[["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+",...
1
111
n,l=map(int,input().split()) print(n) print(l) input_str = [] for i in range(n): input_str.append(input()) input_str.sort() mojiretu = ''.join(input_str) print(mojiretu)
n,l=map(int,input().split()) input_str = [] for i in range(n): input_str.append(input()) input_str.sort() mojiretu = ''.join(input_str) print(mojiretu)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
62
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> a(N); string ans; for (int i = 0; i < N; i++) cin >> a[i]; sort(a.begin(), a.end(), greater<string>()); for (int i = 0; i < N; i++) { ans += a[i]; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> a(N); string ans = ""; for (int i = 0; i < N; i++) { cin >> a[i]; } sort(a.begin(), a.end()); for (int i = 0; i < N; i++) { ans += a[i]; } cout << ans << endl; }
[["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 62], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 2, 3, 4, 0, 2, 63, 346, 141, 22], ...
1
107
package main import ( "bufio" "fmt" "os" "strconv" "strings" "sort" ) var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Scan() return sc.Text() } func main() { s := nextLine() ss := strings.Split(s, " ") N, _ := strconv.Atoi(ss[0]) L, _ := strconv.Atoi(ss[1]) ...
package main import ( "bufio" "fmt" "os" "strconv" "strings" "sort" ) var sc = bufio.NewScanner(os.Stdin) func nextLine() string { sc.Scan() return sc.Text() } func main() { s := nextLine() ss := strings.Split(s, " ") N, _ := strconv.Atoi(ss[0])//ๅ€‹ๆ•ฐ dic := [] string{} ...
[["-", 0, 435, 8, 196, 0, 431, 31, 432, 0, 22], ["-", 0, 435, 8, 196, 0, 431, 31, 432, 0, 21], ["-", 0, 434, 0, 435, 8, 196, 0, 431, 0, 466], ["-", 0, 431, 12, 432, 0, 2, 63, 438, 439, 22], ["-", 0, 431, 12, 432, 0, 2, 63, 438, 0, 131], ["-", 0, 431, 12, 432, 0, 2, 63, 438, 119, 120], ["-", 0, 431, 12, 432, 0, 2, 3, 4,...
7
184
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; // cout << << endl; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; int main() { vector<char> x; ll...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; // cout << << endl; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; int main() { ll a, b; cin >> a ...
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 1...
1
132
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int l; int n; cin >> l >> n; vector<string> words(n); rep(i, n) { cin >> words.at(i); } sort(words.begin(), words.end()); for (string w : words) { cout << w; } cout << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n, l; cin >> n >> l; vector<string> words(n); rep(i, n) { cin >> words.at(i); } sort(words.begin(), words.end()); for (string w : words) { cout << w; } cout << endl; }
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0,...
1
90
#include <bits/stdc++.h> using namespace std; using ll = long long; #define ld long double #define ull unsigned long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) // (i, 10) i=0๏ฝži=9ใพใง #define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10๏ฝži=0ใพใง #define FOR(i, m, n) for (int i = m; i < n;...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define ld long double #define ull unsigned long long int #define rep(i, n) for (int i = 0; i < (int)(n); i++) // (i, 10) i=0๏ฝži=9ใพใง #define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10๏ฝži=0ใพใง #define FOR(i, m, n) for (int i = m; i < n;...
[["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["+", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 24], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 25], ["+", 8, 9, 0, 1...
1
203
#include <algorithm> #include <cstdio> #include <iostream> #include <string> using namespace std; int main() { int n, l; string s[100]; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s, s + n); for (int i = 0; i < n; i++) { cout << s[i] << endl; } return 0; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int n, l; string s[100000]; cin >> n >> l; for (int i = 0; i < n; i++) cin >> s[i]; sort(s, s + n); for (int i = 0; i < n; i++) cout << s[i]; cout << endl; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 7, 8, 1, 0, 35], ["+", 0, 14, 8, 9, 0, ...
1
95
package main import ( "bufio" "fmt" "os" "sort" ) func main() { var N, L int fmt.Scan(&N, &L) a := make([]string, N) sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) for i := 0; i < N; i++ { sc.Scan() a[i] = sc.Text() } sort.Sort(sort.StringSlice(a)) for _, v := range a { fmt.Println(v) ...
package main import ( "bufio" "fmt" "os" "sort" ) func main() { var N, L int fmt.Scan(&N, &L) a := make([]string, N) sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) for i := 0; i < N; i++ { sc.Scan() a[i] = sc.Text() } sort.Sort(sort.StringSlice(a)) var r string for _, v := range a { r ...
[["+", 0, 434, 0, 435, 8, 196, 0, 440, 0, 217], ["+", 0, 435, 8, 196, 0, 440, 0, 441, 141, 22], ["+", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["+", 36, 36, 0, 434, 0, 435, 8, 196, 0, 165], ["+", 0, 7, 8, 196, 0, 436, 31, 432, 0, 22], ["+", 8, 196, 0, 7, 8, 196, 0, 436, 17, 107], ["+", 0, 7, 8, 196, 0, 436, 12, 432, 0,...
7
137
function Main(input) { input = input.split('\n'); var NL = input[0].split(' '); var S = []; for (var i = 0; i < Number(NL[0]); i++) { S[i] = input[i + 1]; } var V = S.sort((a, b) => a > b).reduce((a, b) => a + b); console.log(V); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));
function Main(input) { input = input.split('\n'); var NL = input[0].split(' '); var S = []; for (var i = 0; i < Number(NL[0]); i++) { S[i] = input[i + 1]; } var V = S.sort().reduce((a, b) => a + b); console.log(V); } Main(require("fs").readFileSync("/dev/stdin", "utf8"));
[["-", 500, 2, 3, 3, 0, 568, 54, 495, 0, 24], ["-", 500, 2, 3, 3, 0, 568, 54, 495, 0, 22], ["-", 500, 2, 3, 3, 0, 568, 54, 495, 0, 21], ["-", 63, 558, 500, 2, 3, 3, 0, 568, 0, 221], ["-", 500, 2, 3, 3, 0, 568, 8, 16, 31, 22], ["-", 500, 2, 3, 3, 0, 568, 8, 16, 17, 47], ["-", 500, 2, 3, 3, 0, 568, 8, 16, 12, 22], ["-", ...
2
132
#include <algorithm> #include <cctype> #include <cstdio> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x....
#include <algorithm> #include <cctype> #include <cstdio> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(), x.end()) #define REVE(x) reverse(x....
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 13], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 73], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
244
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<string> vec(N); for (int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec.end()); for (int i = 0; i < N; i++) { cout << vec[i] << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> vec(N); for (int i = 0; i < N; i++) { cin >> vec[i]; } sort(vec.begin(), vec.end()); for (int i = 0; i < N; i++) { cout << vec[i]; } cout << endl; }
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 4...
1
91
/* Converted from Scratch by scratch2cpp (https://github.com/yos1up/scratch2cpp). */ #include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string> #include <vector> #define debug \ cerr << "--" << __LINE__ << "-...
/* Converted from Scratch by scratch2cpp (https://github.com/yos1up/scratch2cpp). */ #include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string> #include <vector> #define debug \ cerr << "--" << __LINE__ << "-...
[["-", 0, 43, 49, 50, 51, 4, 0, 5, 0, 6], ["+", 0, 43, 49, 50, 51, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 7, 8, 9, 0, 1, 0, 16, ...
1
1,798
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; const int maxn = 5e5 + 5; const int inf = 0x3f3f3f3f; int main...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; const int maxn = 5e5 + 5; const int inf = 0x3f3f3f3f; bool cmp(...
[["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 0, 30, 0, 14, 49, 53, 49, 22], ["+", 0, 30, 0, 14, 49, 53, 54, 55, 0, 24], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 49, 22], ["+", 0, 30, 0, 14, 49, 53, 54, 55, 0, 21], ["+", 0, 30, 0, 14, 49, 53, 54, 55, 0, 25], ["+", 3...
1
139
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <map> #include <math.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i > (b); --i) #define SZ(a) a.size() #define ll long long #define ull un...
#include <algorithm> #include <iomanip> #include <iostream> #include <string> #include <vector> #define _USE_MATH_DEFINES #include <map> #include <math.h> #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (a); i > (b); --i) #define SZ(a) a.size() #define ll long long #define ull un...
[["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 24], ["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 49, 22], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 0, 35], ["+", 8, 9, 0, 9, 0, 1, 0, 16, ...
1
213
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { int n, l, i, j; char a[105][105]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", &a[i]); for (i = 0; i < n - 1; i++) { for (j = i + 1; j < n; j++) { if (a[i][0] > a[j][0...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { int n, l, i, j; char a[105][105]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) scanf("%s", &a[i]); for (i = 0; i < n - 1; i++) { for (j = i + 1; j < n; j++) { if (strcmp(a[i], a[j...
[["+", 0, 57, 15, 339, 51, 16, 31, 2, 63, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 24], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 13], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0...
1
205
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define lint long long #define VI vector<int> #define VL vector<lint> #define VC vector...
#include <algorithm> #include <climits> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define lint long long #define VI vector<int> #define VL vector<lint> #define VC vector...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0...
1
147
/** * Created by Sakib on 06/04/2018. */ #include <bits/stdc++.h> using namespace std; #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define debug(args...) ...
/** * Created by Sakib on 06/04/2018. */ #include <bits/stdc++.h> using namespace std; #define fast_io \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define debug(args...) ...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8...
1
347
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int N, L; string s[128]; string ans = ""; cin >> N >> L; for (int i = 0; i < N; i++) { cin >> s[i]; } // for (int i = 0; i < N; i++) { cout << s[i] << endl; } /* for (int i = 0; i <= N-1; i++) { for ...
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { int N, L; string s[128]; string ans = ""; cin >> N >> L; for (int i = 0; i < N; i++) cin >> s[i]; sort(s, s + N); for (int i = 0; i < N; i++) ans += s[i]; cout << ans << endl; }
[["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 46], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 31, 1...
1
111
#include <bits/stdc++.h> using namespace std; int main(void) { int N, L; vector<string> nibuntansaku(N); for (int i = 0; i < N; i++) { cin >> nibuntansaku.at(i); } sort(nibuntansaku.begin(), nibuntansaku.end()); for (int i = 0; i < N; i++) { cout << nibuntansaku.at(i); } cout << endl; }
#include <bits/stdc++.h> using namespace std; int main(void) { int N, L; cin >> N >> L; vector<string> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); for (int i = 0; i < N; i++) { cout << vec.at(i); } cout << endl; }
[["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 43, ...
1
96
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) #define REAP(i, a, n) for (int i = (a); i < (n); i++) #define YES cout << "Yes" << endl #define NO cout << "No" << endl #define fr first #define sc second #define pb push_back #define All(v) v.begin(), v.end() typedef long lo...
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); i++) #define REAP(i, a, n) for (int i = (a); i < (n); i++) #define YES cout << "Yes" << endl #define NO cout << "No" << endl #define fr first #define sc second #define pb push_back #define All(v) v.begin(), v.end() typedef long lo...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 2, 3, 4, 0, 69, 28, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, ...
1
127
#include <bits/stdc++.h> using namespace std; #define int long long #define otp(n) cout << n; #define ct(n) cout << n << endl; #define cts(n) cout << n << " "; #define cte cout << endl; #define ctv(v) rep(i, (v).size()) otp(v[i]) cte #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <=...
#include <bits/stdc++.h> using namespace std; #define int long long #define otp(n) cout << n; #define ct(n) cout << n << endl; #define cts(n) cout << n << " "; #define cte cout << endl; #define ctv(v) rep(i, (v).size()) otp(v[i]) cte #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <=...
[["-", 0, 30, 0, 42, 0, 14, 8, 9, 0, 45], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 73], ["-", 0, 42, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, ...
1
190
# n,l=map(int,input().split()) s=[0 for i in range(n)] for i in range(n): s[i]=input() print(s) s.sort() print(s) ans="" for i in range(n): ans+=s[i] print(ans)
# n,l=map(int,input().split()) s=[0 for i in range(n)] for i in range(n): s[i]=input() s.sort() ans="" for i in range(n): ans+=s[i] print(ans)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
80
data = list(map(lambda x: int(x), input().split())) strings = [input() for _ in range(data[1])] strings.sort() s = '' for x in strings: s += x print(s)
data = list(map(int, input().split())) strings = [input() for _ in range(data[0])] strings.sort() s = '' for x in strings: s += x print(s)
[["-", 3, 4, 0, 652, 3, 4, 0, 670, 0, 670], ["-", 0, 652, 3, 4, 0, 670, 54, 711, 0, 22], ["-", 3, 4, 0, 652, 3, 4, 0, 670, 0, 102], ["-", 3, 4, 0, 670, 8, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 670, 8, 652, 3, 4, 0, 22], ["-", 3, 4, 0, 670, 8, 652, 3, 4, 0, 25], ["-", 0, 659, 12, 652, 3, 4, 0, 206, 206, 612], ["+", 0, 659, ...
5
61
//ใŠใพใ˜ใชใ„ #include <algorithm> #include <iostream> #include <string> #include <vector> #define INF 1e9 + 7 #define roop(i, m, n) for (int i = m; i < n; i++) #define mroop(i, m, n) for (int i = m; i < n; i--) #define NO cout << "NO" << endl; #define YES cout << "YES" << endl; #define No cout << "No" << endl; #define Yes c...
//ใŠใพใ˜ใชใ„ #include <algorithm> #include <iostream> #include <string> #include <vector> #define INF 1e9 + 7 #define roop(i, m, n) for (int i = m; i < n; i++) #define mroop(i, m, n) for (int i = m; i < n; i--) #define NO cout << "NO" << endl; #define YES cout << "YES" << endl; #define No cout << "No" << endl; #define Yes c...
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 9, 0, 43, 49, ...
1
143
#include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string> using namespace std; int main() { string str[100]; string work; int n, l; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> str[i]; } for (int i = 0; i < n - 1; i++) { for (int p = i + 1; p < n; p...
#include <algorithm> #include <iostream> #include <math.h> #include <stdlib.h> #include <string> using namespace std; int main() { string str[100]; string work; int n, l; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> str[i]; } for (int i = 0; i < n - 1; i++) { for (int p = i + 1; p < n; p...
[["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 12, 69, 341, 342, 0, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 1, 0, 11, ...
1
160
#include <bits/stdc++.h> using namespace std; int main() { int n, l; char s[1000][1000], tmp[30]; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; } cout << s[0][0] << endl; for (int i = 1; i < n; i++) { for (int j = 1; j < n; j++) { if (strcmp(s[j - 1], s[j]) > 0) { strc...
#include <bits/stdc++.h> using namespace std; int main() { int n, l; char s[1000][1000], tmp[1000]; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; } for (int i = 1; i < n; i++) { for (int j = 1; j < n; j++) { if (strcmp(s[j - 1], s[j]) > 0) { strcpy(tmp, s[j - 1]); ...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 12, 69, 28, 69, 28, 22], ["-", 31, 16, 12, 69, 28, 69, 341, 342, 0, 70], ["-", 31, 16, 12, 69, 28, 69, 341, 342, 0, 13], ["-", ...
1
192
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using LL = long long; const LL LINF = 1e18; using namespace std; #define COUT(v) cout << (v) << endl #define CIN(n) \ long long int(n); ...
#include <bits/stdc++.h> const int INF = 1e9; const int MOD = 1e9 + 7; using LL = long long; const LL LINF = 1e18; using namespace std; #define COUT(v) cout << (v) << endl #define CIN(n) \ long long int(n); ...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 14, 8, 9, 0, 1, 0, 35]]
1
208
#include <stdio.h> #include <string.h> int main(void) { int a, b; char str[101][101]; char change[101]; char kekka[350] = {"\0"}; int i, j, k; scanf("%d %d", &a, &b); for (i = 0; i < a; i++) { scanf("%s", &str[i]); } for (i = 0; i < a - 1; i++) { j = 0; for (k = i + 1; k < a; k++) { ...
#include <stdio.h> #include <string.h> int main(void) { int a, b; char str[101][101]; char change[101]; char kekka[350] = {"\0"}; int i, j, k; scanf("%d %d", &a, &b); for (i = 0; i < a; i++) { scanf("%s", &str[i]); } for (i = 0; i < a - 1; i++) { j = 0; for (k = i + 1; k < a; k++) { ...
[["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 7, 8, 9, 0, 52, 0, 89], ["-", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["-", 75, 76, 0, 57, 64, 9, 0, 116, 0, 117], ["-", 75, 76, 0, 57, 64, 9, 0, 116, 0, 35], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11,...
0
242
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <set> #include <stdexcept> #include <string> #include <vector> #define rep(i, N) for (int i = 0; i < (N); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) using namespace std; const long long MOD = 1e9 + 7; const long long INF =...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <set> #include <stdexcept> #include <string> #include <vector> #define rep(i, N) for (int i = 0; i < (N); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) using namespace std; const long long MOD = 1e9 + 7; const long long INF =...
[["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 8, 9, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 14, 49, 53, 54, 55, 0, 21], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, ...
1
198
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #define...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define RREP(i, n) for (int i = (n)-1; i >= 0; i--) #define...
[["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["+", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1,...
1
296
#include <algorithm> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) for (int i = 0; i < (n...
#include <algorithm> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define REP(i, n) for (int i = 0; i < (n...
[["+", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 8, 9, 0, 14, 49, 53, 54, 55, 0, 24], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 8, 9, 0, 14, 49, 53, 54, 55, 0, 21], ["+", 8, 9, 0, 14, 49, 53, 54, 55, 0, 25], ["+", 0, 14, 8, 9, 0, 14, 8, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0,...
1
144
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int N, L; cin >> N >> L; vector<string> str(N); for (int i = 0; i < N; i++) cin >> str[i]; string tmp; string ans = ""; for (int i = 0; i < N - 1; i++) { for (int j = i; j < N - 1; j++) { if (str[j] > st...
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int N, L; cin >> N >> L; vector<string> str(N); for (int i = 0; i < N; i++) cin >> str[i]; string tmp; string ans = ""; for (int i = 0; i < N - 1; i++) { for (int j = 0; j < N - i - 1; j++) { if (str[j +...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+"...
1
181
/* Thank you for helping me out Endagorion You have really been an inspiration I will prove my worth to you i will return in APRIL "May God help me in this venture of mine" */ #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <float.h> #include <fstream> #include <iom...
/* Thank you for helping me out Endagorion You have really been an inspiration I will prove my worth to you i will return in APRIL "May God help me in this venture of mine" */ #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <float.h> #include <fstream> #include <iom...
[["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["-", 0, 2, 3, 4, 0, 66, 28, 69, 28, 22], ["-", 3, 4, 0, 66, 28, 69, 341, 342, 0, 70], ["-", 3, 4, 0, 66, 28, 69, 341, 342, 0, 13], ["-", 3, 4, 0, 66, 28, 69, 341, 342, 0, 73], ["-", 8, 9, 0, 1, 0, 2, 3...
1
214
n, l = map(int, input().split()) s = [[i for i in input()] for j in range(n)] print(s) s.sort() print(s) for i in range(n): s[i] = "".join(s[i]) s = "".join(s) print(s)
n, l = map(int, input().split()) s = [[i for i in input()] for j in range(n)] #print(s) s.sort() #print(s) for i in range(n): s[i] = "".join(s[i]) s = "".join(s) print(s)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
85
#include <stdio.h> #include <string.h> int main(void) { char str[100][100], temp[100]; int N, L, i; scanf("%d %d", &N, &L); gets(temp); for (L = 0; L < N; L++) gets(str[L]); for (L = 0; L < N; L++) { for (i = 0; i < N - 1; i++) { if (strcmp(str[i], str[i + 1]) < 0) { strcpy(temp, str[...
#include <stdio.h> #include <string.h> int main(void) { char str[102][102], temp[102]; int N, L, i; scanf("%d %d", &N, &L); gets(temp); for (L = 0; L < N; L++) gets(str[L]); for (L = 0; L < N - 1; L++) { for (i = 0; i < N - 1; i++) { if (strcmp(str[i], str[i + 1]) > 0) { strcpy(temp, ...
[["-", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 8, 9, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 5...
0
196
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, l; vector<string> s(n); cin >> n >> l; ; for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s.begin(), s.end()); for (int i = 0; i < n; i++) { cout << s[i]; } cout << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, l; cin >> n >> l; vector<string> s(n); for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s.begin(), s.end()); for (int i = 0; i < n; i++) { cout << s[i]; } cout << endl; return 0; }
[["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31,...
1
106
/* ID: marik_k1 PROG: LANG: C++ */ #include <bits/stdc++.h> using namespace std; // ifstream fin ("input.txt"); // ofstream fout ("output.txt"); #define forn(i, n) for (int i = 0; i < n; ++i) #define mp make_pair #define pb push_back #define all(t) t.begin(), t.end() #define gcd(x, y) __gcd(x, y) typedef unsigned l...
/* ID: marik_k1 PROG: LANG: C++ */ #include <bits/stdc++.h> using namespace std; // ifstream fin ("input.txt"); // ofstream fout ("output.txt"); #define forn(i, n) for (int i = 0; i < n; ++i) #define mp make_pair #define pb push_back #define all(t) t.begin(), t.end() #define gcd(x, y) __gcd(x, y) typedef unsigned l...
[["-", 0, 30, 0, 43, 49, 50, 51, 4, 0, 24], ["-", 0, 30, 0, 43, 49, 50, 51, 4, 0, 13], ["-", 0, 30, 0, 43, 49, 50, 51, 4, 0, 25], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["-", 0, 30, 0, 43, 49, 50, 51, 5, 0, 62], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 49, 22], ["+", 8, 9, 0, 7, 8, 9,...
1
202
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, const char *argv[]) { vector<string> a; int N, L; cin >> N >> L; for (int i = 0; i < N; i++) { string s; for (int j = 0; j < L; j++) cin >> s; a.push_back(s); } sort(a.beg...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, const char *argv[]) { vector<string> a; int N, L; cin >> N >> L; for (int i = 0; i < N; i++) { string s; cin >> s; a.push_back(s); } sort(a.begin(), a.end()); for (int i = 0; ...
[["-", 8, 9, 0, 7, 8, 9, 0, 7, 0, 88], ["-", 8, 9, 0, 7, 8, 9, 0, 7, 0, 24], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 7, 8, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 31...
1
131
info = gets.split.map(&:to_i) num = info[0] len = info[1] array = [] num.times do word = gets.chomp array << word end array.sort! s = "" for word in array do s << word end p s
info = gets.split.map(&:to_i) num = info[0] array = [] num.times do word = gets.chomp array << word end array.sort! s = "" for word in array do s << word end print s
[["-", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["-", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["-", 36, 36, 0, 493, 0, 662, 12, 742, 500, 22], ["-", 36, 36, 0, 493, 0, 662, 12, 742, 0, 70], ["-", 36, 36, 0, 493, 0, 662, 12, 742, 0, 612], ["-", 36, 36, 0, 493, 0, 662, 12, 742, 0, 73], ["-", 36, 36, 36, 36, 0, 493, 0, 65...
4
58
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) #define SORT(n) sort((n).begin(), (n).end(), greater<int>()) #define SORTP sort((n).begin(), (n).end(), greater<pair<int, int>>()); #define pb ...
#include <bits/stdc++.h> #define LL long long #define ULL unsigned long long #define REP(i, n) for (int i = 0; i < (n); i++) #define REP2(i, x, n) for (int i = x; i < (n); i++) #define SORT(n) sort((n).begin(), (n).end(), greater<int>()) #define SORTP sort((n).begin(), (n).end(), greater<pair<int, int>>()); #define pb ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0...
1
152
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <stack> #include <stdio.h> #include <string.h> #include <vector> #define x first #define y second using namespace std; typedef long long LL; const int N = 1e5 + 5; const int INF = 0x3f3f3f3f; vector<string> a; int main() { int n, m; ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <stack> #include <stdio.h> #include <string.h> #include <vector> #define x first #define y second using namespace std; typedef long long LL; const int N = 1e5 + 5; const int INF = 0x3f3f3f3f; vector<string> a; int main() { int n, m; ...
[["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 5...
1
151
#include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { ios::sync_with_stdio(false); std::cin.tie(0); int N, L; cin >> N >> L; cout << N << " " << L << endl; string str; vector<string> strs; for (int i ...
#include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <vector> using namespace std; int main(void) { ios::sync_with_stdio(false); std::cin.tie(0); int N, L; cin >> N >> L; string str; vector<string> strs; for (int i = 0; i < N; ++i) { cin >> str;...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-",...
1
143
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define ALL(x) (x).begin(), (...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define ALL(x) (x).begin(), (...
[["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 28, 22], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 17, 131], ["-", 0, 2, 3, 4, 0, 2, 63, 118, 119, 120], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21],...
1
235
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { int a[3]; int x = 0, y = 0; for (int i = 0; i < 3; i++) { if (a[i] == 5) x++; else if (a[i] == 7) y++; } if (x == 2 && y == 1) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { int a[3]; int x = 0, y = 0; cin >> a[0] >> a[1] >> a[2]; for (int i = 0; i < 3; i++) { if (a[i] == 5) x++; else if (a[i] == 7) y++; } if (x == 2 && y == 1) { cout << "YES\n"; } else { cout << "N...
[["+", 0, 1, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 16, 17, 152], ["+", 0, 16, 31, 16, 31, 16, 12, 69, 28, 22], ["+", 31, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 31, 16, 31, 16, 12, 69, 341, 342, 0, 13], ["+", 31, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152...
1
103
#include <iostream> int main() { int n1, n2, n3; std::cin >> n1; std::cin >> n2; std::cin >> n3; if (n1 == 5) { if (n2 == 7 && n3 == 7) { std::cout << "YES" << std::endl; return 0; } } else if (n2 == 5) { if (n1 == 7 && n3 == 7) { std::cout << "YES" << std::endl; return 0...
#include <iostream> int main() { int n1, n2, n3; std::cin >> n1; std::cin >> n2; std::cin >> n3; if (n1 == 7) { if (n2 == 5 && n3 == 5) { std::cout << "YES" << std::endl; return 0; } } else if (n2 == 7) { if (n1 == 5 && n3 == 5) { std::cout << "YES" << std::endl; return ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12,...
1
155