submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s653351047
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s883281545
p04044
C++
#include<iostream> using namespace std; int main() { int n, l; cin >> n >> l; string str[100]; for (int i = 0; i < n; ++i) { string s; cin >> s; str[i] = s; } sort(str, str + n); for (int i = 0; i < n; ++i) { cout << str[i]; } cout << endl; return ...
a.cc: In function 'int main()': a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(str, str + n); | ^~~~ | short
s585820849
p04044
C++
#include <iostream> #include <bits/stdc++.h> #include <vector> #include <string> using namespace std; int main(){ int N, L; cin >> N >> K; vector<string> vec(101, ""); string ans = ""; for(int i = 0; i < N; i++) cin >> vec[i]; sort(vec.begin(), vec.end()); for(int i = 0;i < N; i++) ans += ve...
a.cc: In function 'int main()': a.cc:12:15: error: 'K' was not declared in this scope 12 | cin >> N >> K; | ^
s760991779
p04044
C++
#include <iostream> #include <string> using namespace std; int n, l; string s[100]; int main() { cin >> n >> l; int i; for (i = 0; i < n; i++) cin >> s[i]; sort(s, s + n); for (i = 0; i < n; i++) cout << s[i]; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(s, s + n); | ^~~~ | short
s921411105
p04044
C++
#include <bits/stdc++.h> using namespace std; int main (){ int N,L; cin >> N >> L; vector<string> s(N); for (string 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); } }
a.cc: In function 'int main()': a.cc:9:25: error: no match for 'operator<' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 9 | for (string i = 0; i < N; i++) { | ~ ^ ~ | | | | | int ...
s482783826
p04044
C
#include<stdio.h> int l; int han(char* a,char* b){ int i; for(i=0;i<l;i++){ if(a[i]>b[i])return -1; if(a[i]<b[i])return 1; } return 0; } int main(){ int n,i;scanf("%d%d",&n,&l); char s[100][101]; for(i=0;i<n;i++){ scanf("%s",s[i]); } int ans[100]; for(i=0;i<n;i++)ans[i]=i; for(i=0;i<n...
main.c: In function 'main': main.c:21:9: error: 'j' undeclared (first use in this function) 21 | for(j=0;j<n;i++){ | ^ main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in main.c:22:32: error: expected ']' before ')' token 22 | if(han(s[ans[i]...
s436302480
p04044
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main(){ int N ,L; cin >> N >> L; string S[N]; for(int i=0;i<N;i++){ cin >> S[i]; } sort(S,S+N); for(int i=0;i<N;i++){ bb += S[i]; } string bb=""; for(int i=0;i<N;i++){ bb...
a.cc: In function 'int main()': a.cc:15:9: error: 'bb' was not declared in this scope 15 | bb += S[i]; | ^~
s119047100
p04044
C++
#include <stdio.h> #include <iostream> #include <string.h> int main(){ int N, L; std::cin >> N >> L; std::string str[100] = {}; for(int i=0;i<N;i++){ std::cin >> str[i]; } sort(str, str+N); for(int i=0;i<N;i++){ std::cout << str[i]; } std::cout << std::endl; }
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(str, str+N); | ^~~~ | short
s097586589
p04044
Java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int l = sc.nextInt(); // 使用しない String[] s = new String[n]; for (int i = 0; i < s.length; i++) { s[i] = sc.next(); } sc.close();...
Main.java:26: error: reached end of file while parsing } ^ 1 error
s298807723
p04044
C++
#include <iostream> #include <utility> #include <vector> using namespace std; int main(){ int N,L; cin >> N >> L; vector<vector<char>> words; for(int i=0;i<N;i++){ for(int j=0;j<L;j++{ cin >> words.at(i).at(j); } } for(int i=1;i<N;i++){ for(int j=0;j<L;j++){ ...
a.cc: In function 'int main()': a.cc:11:27: error: expected ')' before '{' token 11 | for(int j=0;j<L;j++{ | ~ ^ | )
s962817167
p04044
C++
#include <iostream> #include <utility> #include <vector> using namespace std; int main(){ int N,L; cin >> N >> L; vector<vector<char>> words; for(int i=0;i<N;i++){ cin >> words.at(i) } for(int i=1;i<N;i++){ for(int j=0;j<L;j++){ if (words.at(i-1).at(j)>words.at(i).at...
a.cc: In function 'int main()': a.cc:11:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type' {aka 'std::vector<char>'}) 11 | cin >> words.at(i) | ...
s148884849
p04044
C++
#include <iostream> #include <utility> using namespace std; int main(){ int N,L; cin >> N >> L; string word; vector<string> words; for(int i=0;i<N;i++){ cin >> word; words(i)=word; } for(int i=1;i<N;i++){ for(int j=0;j<L;j++){ if ('words[i-1][j]'>'words[i...
a.cc:16:17: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 16 | if ('words[i-1][j]'>'words[i][j]'){ | ^~~~~~~~~~~~~~~ a.cc:16:33: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes 16 | if ('words[i-1][...
s580800167
p04044
C++
#include <iostream.h> #include <utility.h> using namespace std; int main(){ int N,L; cin >> N >> L; string word; vector<string> words; for(int i=0;i<N;i++){ cin >> word; words(i)=word; } for(int i=1;i<N;i++){ for(int j=0;j<L;j++){ if ('words[i-1][j]'>'wor...
a.cc:1:10: fatal error: iostream.h: No such file or directory 1 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s964751365
p04044
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int L = sc.nextInt(); String[] S = new String[N]; for(int i=0; i<N; i++){ S[i] = sc.next(); } Arrays.sort(S); StringBuilder string = new String...
Main.java:13: error: cannot find symbol for(i=0; i<N; i++){ ^ symbol: variable i location: class Main Main.java:13: error: cannot find symbol for(i=0; i<N; i++){ ^ symbol: variable i location: class Main Main.java:13: error: cannot find symbol for(i=0; i<N; i++){ ...
s968949111
p04044
Java
import java.util.*; public class Main(){ public static void(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int L = sc.nextInt(); String[] S = new String[N]; for(int i=0; i<N; i++){ S[i] = sc.next(); } Arrays.sort(S); StringBuilder string = new StringBui...
Main.java:2: error: '{' expected public class Main(){ ^ Main.java:3: error: <identifier> expected public static void(String[] args){ ^ 2 errors
s238927067
p04044
C++
#include <iostream> #include <fstream> #include <stdio.h> #include <math.h> #include <time.h> #include <string> #include <tuple> #include <vector> #include <map> #include <list> #include <set> #include <stack> #include <queue> #include <cstdlib> #include <algorithm> #include <random> #include <cassert> using namespace ...
a.cc: In function 'int main()': a.cc:34:12: error: found ':' in nested-name-specifier, expected '::' 34 | int N,L: | ^ | :: a.cc:34:11: error: 'L' has not been declared 34 | int N,L: | ^ a.cc:35:9: error: qualified-id in declaration before '>>' token 35...
s148464040
p04044
Java
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long x = sc.nextInt(); List<Long> sweet = new ArrayList<Long>(); for(int i=0;i<N;i++) { long a=sc.nextInt(); sweet.add(a); } ...
Main.java:20: error: cannot find symbol for(int i=0;i<n;i++) ^ symbol: variable n location: class Main 1 error
s726500576
p04044
C++
#include<bits/stdc++.h> using namesapce std; int main() { int n,l; cin>>n>>l; string a[n+2]; for(int i=0;i<n;i++) { cin>>a[i]; } sort(a,a+n); for(int i=0;i<n;i++) { cout<<a[i]; } }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>n>>l; | ^~~ | std::cin In file included from /usr/i...
s869268352
p04044
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class AtCoderAbc042A { public static void main(String[] args)throws Exception { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); StringToken...
Main.java:6: error: class AtCoderAbc042A is public, should be declared in a file named AtCoderAbc042A.java public class AtCoderAbc042A { ^ 1 error
s843605044
p04044
C
#include<stdio.h> #include<string.h> int main(void) { int N,L; char moji[110][110],stock[110]; scanf("%d%d",&N,&L); for(int m = 0;m < N;m++) { scanf("%s",moji[m]); } for(int i = 0;i < N;i++) { for(int j = 0;j < N - 1;j++) { if(strcmp(moji[j],moji[j+1]) >= 0) { ...
main.c: In function 'main': main.c:23:29: error: 'stcok' undeclared (first use in this function); did you mean 'stock'? 23 | strcpy(moji[j+1],stcok); | ^~~~~ | stock main.c:23:29: note: each undeclared identifier is reported only once for...
s433977595
p04044
C
#include<stdio.h> #include<string.h> int main(void) { int N,L; char moji[110][110],stock[110]; scanf("%d%d",&N,&L); for(int m = 0;m < N;m++) { scanf("%s",moji[m]); } for(int i = 0;i < N;i++) { for(int j = 0;j < N - 1;j++) { if(strcmp(moji[j],moji[j+1] >= 0)) { ...
main.c: In function 'main': main.c:19:35: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 19 | if(strcmp(moji[j],moji[j+1] >= 0)) | ~~~~~~~~~~^~~~ | | | ...
s656606267
p04044
C
#include<stdio.h> #include<string.h> int main(void) { int N,L; char moji[110][110],stock[110]; scanf("%d%d",&N,&L); for(int m = 0;m < N;m++) { scanf("%s",moji[m]); } for(int i = 0;i < N;i++) { for(int j = 0;j < N - 1;j++) { if(strcmp(moji[j],moji[j+1] >= 0) { ...
main.c: In function 'main': main.c:19:35: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion] 19 | if(strcmp(moji[j],moji[j+1] >= 0) | ~~~~~~~~~~^~~~ | | | ...
s634858128
p04044
C
#include<stdio.h> #include<string.h> main() {int N,L,i,j; char a[105][105]; char c[105]; scanf("%d",&N); for(int i=1;i<N;i++) {for(int j=1;j<L;j++) scanf("%s",a[j]); } for(int i=1;i<N;i++) {for(int j=1;j<N-i;j++) if(strcmp(a[j],a[j+1])>0) { strcpy(c,a[j+1]); strcpy(a[j+1],a[j]); strcpy(a...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:26:33: error: expected declaration or statement at end of input 26 | } | ^
s895884714
p04044
C
#include<stdio.h> #include<string.h> main() {int N,L,i,j; char a[105][105]; char c[105]; scanf("%d",&N); for(int i=1;i<N;i++) {for(int j=1;j<L;j++) scanf("%s",a[j]); } for(int i=1;i<N;i++) {for(int j=1;j<N-i;j++) if(stcmp(a[j],a[j+1])>0) { strcpy(c,a[j+1]); strcpy(a[j+1],a[j]); strcpy(a[...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:14:36: error: implicit declaration of function 'stcmp'; did you mean 'strcmp'? [-Wimplicit-function-declaration] 14 | if(stcmp(a[j],a[j+1])>0) | ...
s970301153
p04044
C
#include<stdio.h> #include<string.h> main() {int N,L,i,j; char a[105][105]; char c[105]; scanf("%d",&N); for(int i=1;i<N;i++) {for(int j=1;j<L;j++) scanf("%s",str[j]); } for(int i=1;i<N;i++) {for(int j=1;j<N-i;j++) if(stcmp(a[j],a[j+1])>0) { strcpy(c,a[j+1]); strcpy(a[j+1],a[j]); strcpy(...
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:10:20: error: 'str' undeclared (first use in this function) 10 | scanf("%s",str[j]); | ^~~ main.c:10:20: note: each undeclared identifier is reported only ...
s492489282
p04044
C++
#include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; char a[1005]; char c[1005]; int main() {int N,L,i,j; scanf("%d %d",&N,&L); for(int i=1;i<=N;i++) scanf("%s",a[i]); for(int i=1;i<N;i++) {for(int j=1;j<N-i;j++) if(strcmp(a[j],a[j+1])>0) { strcpy(c,a[j+1]); ...
a.cc: In function 'int main()': a.cc:18:46: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 18 | if(strcmp(a[j],a[j+1])>0) | ~~~^ | | | ...
s113284933
p04044
C++
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <string> using namespace std; int main() { int L, N; cin >> N >> L; vector<string> s(N); for (int i = 0; i < N; ++i) { cin >> s[i]; } sort(s.begin(), s.end(), [](string s1, string s2) { r...
a.cc: In lambda function: a.cc:19:16: error: 'strcmp' was not declared in this scope 19 | return strcmp(s1.c_str(), s2.c_str()) < 0; | ^~~~~~ a.cc:5:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include <numeric> ++...
s117302776
p04044
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int n, l; cin >> n >> l: string s[100]; for (int i = 0 ; i < n; i++) { cin >> s[i]; } sort(s, s + n); for(int i = 0; i < n; i++){ cout << s[i]; } return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: found ':' in nested-name-specifier, expected '::' 8 | cin >> n >> l: | ^ | :: a.cc:8:15: error: 'l' is not a class, namespace, or enumeration 8 | cin >> n >> l: | ^ a.cc:10:41: error: 's' was not ...
s758327918
p04044
C++
#include <iostream> #include <string> #include <vector> #include<algrithm> typedef unsigned int UINT; using namespace std; int main(void) { int N, L; cin >> N >> L; vector<string> mas(L); for (string & s : mas) { cin >> s; } sort(mas.begine(), mas.end()); string ans = ""; for ...
a.cc:4:9: fatal error: algrithm: No such file or directory 4 | #include<algrithm> | ^~~~~~~~~~ compilation terminated.
s047055003
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l; cin>>n>>l; string a[n]; for(i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); for(i=0;i<n;i++) { cout<<a[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'i' was not declared in this scope 7 | for(i=0;i<n;i++){ | ^ a.cc:11:9: error: 'i' was not declared in this scope 11 | for(i=0;i<n;i++) | ^
s555415024
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l; cin>>n>>l; string a[n]; for(i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); for(i=0;i<n;i++) { cout<<a[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'i' was not declared in this scope 7 | for(i=0;i<n;i++){ | ^ a.cc:11:9: error: 'i' was not declared in this scope 11 | for(i=0;i<n;i++) | ^
s628800617
p04044
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int main(){ int len, n; cin >> len >> n; 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; }
a.cc: In function 'int main()': a.cc:16:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'} 16 | sort(s.begin(), s.end()); | ^~~~~ a.cc:16:21: error: request for member 'end' in 's', which is of non-class type 'std::...
s534215454
p04044
C++
N, L = map(int, input().split()) s = [0 for i in range(N)] for i in range(N): s[i] = input() s.sort() output = "" for i in range(L): output += s[i] print(output)
a.cc:1:1: error: 'N' does not name a type 1 | N, L = map(int, input().split()) | ^
s770891640
p04044
C++
N,L=map(int,input().split()) l=[] for i in range(N): l.append(input()) print("".join(sorted(l)))
a.cc:1:1: error: 'N' does not name a type 1 | N,L=map(int,input().split()) | ^
s732227734
p04044
C++
#include<iostream> #include<string> #include<math.h> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define N (1000000000+7) int main(void) { 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++)cou...
a.cc: In function 'int main()': a.cc:19:9: error: 're' was not declared in this scope 19 | re | ^~ a.cc:19:11: error: expected '}' at end of input 19 | re | ^ a.cc:11:16: note: to match this '{' 11 | int main(void) { | ^
s339786673
p04044
C++
#include <iostream> #include <stdlib.h> #include <string> int comp(const void *a, const void *b) { return strcmp((char*)a,(char*)b); } #define MAX 1000 using namespace std; int main() { int N, L; string str[MAX], result; cin >> N >> L; for(int i = 0; i < N; i++) cin >> str[i]; qsort(str, N, sizeof(...
a.cc: In function 'int comp(const void*, const void*)': a.cc:5:10: error: 'strcmp' was not declared in this scope 5 | { return strcmp((char*)a,(char*)b); } | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <std...
s475053134
p04044
C++
#include <iostream> #include <stdlib.h> int comp(const void *a, const void *b) { return strcmp((char*)a,(char*)b); } #define MAX 1000 using namespace std; int main() { int N, L; string str[MAX], result; cin >> N >> L; for(int i = 0; i < N; i++) cin >> str[i]; qsort(str, N, sizeof(str[0]), comp); ...
a.cc: In function 'int comp(const void*, const void*)': a.cc:4:10: error: 'strcmp' was not declared in this scope 4 | { return strcmp((char*)a,(char*)b); } | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <std...
s723330246
p04044
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<iostream> using namespace std; const int N = 10005; int s[N]; bool cmp(string a, string b){ return a < b; } int main(){ int n, l; scanf("%d %d", &n, &l); for(int i = 1; i <= n; i++) scanf("%d", &s[i]); sort(s+1, s+1+n, cmp); for(i...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from a.cc:3: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _It...
s274382468
p04044
C++
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; int a,n; string b[105]; int main() { //freopen("bfr.in","r",stdin); //freopen("bfr.out","w",stdout); cin>>a>>n; for(int s=0;s<a;s++) { cin>>b[s]; } sort(b,b+a); for(int s=0;s<a;s++) cou...
a.cc: In function 'int main()': a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 17 | sort(b,b+a); | ^~~~ | sqrt
s981675259
p04044
C++
int main() { int n,l; cin >>n>> l; int i,j; char s[100][100]; for (i = 0; i < n; i++) { for (j = 0; j < l; j++) { cin >> s[i][j]; } } int jun[100]; for (i = 0; i < n; i++) { jun[i] = i; } for (i = 1; i < n; i++) { for (j = i - 1; j >= 0; j--) { int k=0; int a; while (s[i][k] == s[j][k])...
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >>n>> l; | ^~~ a.cc:43:25: error: 'cout' was not declared in this scope 43 | cout << s[p[i]][j]; | ^~~~ a.cc:46:9: error: 'cout' was not declar...
s333539556
p04044
C++
int main() { int n,l; cin >>n>> l; int i,j; char s[100][100]; for (i = 0; i < n; i++) { for (j = 0; j < l; j++) { cin >> s[i][j]; } } int jun[100]; for (i = 0; i < n; i++) { jun[i] = i; } for (i = 1; i < n; i++) { for (j = i - 1; j >= 0; j--) { int k=0; int a; while (s[i][k] == s[j][k])...
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >>n>> l; | ^~~ a.cc:43:25: error: 'cout' was not declared in this scope 43 | cout << s[p[i]][j]; | ^~~~ a.cc:46:9: error: 'cout' was not declar...
s867333538
p04044
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main(){ int n, l; cin >> n >> l; vector<string> str(n); for(int i=0; i<n; i++){ cin >> str[i]; } sort(str.begin(),str.end()); for(int i=0; i<n; i++){ cout << str[i] ; } cout<<endl; }...
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(str.begin(),str.end()); | ^~~~ | short
s288076694
p04044
C++
#include<iostream> #include<algorithm> using namespace std; struct A { char c[101]; }a[101]; int main() { int n,i,j; char x[10]; cin>>n; cin>>x; for(i=0;i<=n-1;i++) cin>>a[i].c; sort(a,a+n); for(i=0;i<=n-1;i++) cout<<a[i].c; cout<<endl; return 0; }
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from...
s958934851
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s649928150
p04044
C++
#include<bits/stdc++.h> #include<string> using namespace std; int n, l; cin >> n >> l; int main(){ char s(l); for(int i = 0; i < n; ++i){ cin >> s[i]; sort(s.begin(), s.end(), greater<string>); } cout << *min_element(s) << endl; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> n >> l; | ^~~ a.cc: In function 'int main()': a.cc:9:13: error: invalid types 'char[int]' for array subscript 9 | cin >> s[i]; | ^ a.cc:10:12: error: request for member 'begin' in 's', which is of non-class type 'char' 10 | ...
s381516461
p04044
C++
#include<bits/stdc++.h> #include<string> using namespace std; int n, l; cin >> n >> l; int main(){ string s(n); for(int i = 0; i < n; ++i){ cin >> s[i]; sort(s.begin(), s.end(), greater<string>); } cout << *min_element(s) << endl; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> n >> l; | ^~~ a.cc: In function 'int main()': a.cc:7:13: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)' 7 | string s(n); | ^ In file included from /usr/include/c++/14/string:54, ...
s437605631
p04044
C++
#include<bits/stdc++.h> #include<string> using namespace std; int n, l; cin >> n >> l; int main(){ string s(n); for(int i = 0; i < n; ++i){ cin >> s[i]; sort(s.begin(), s.end(), greater<string>); } cout << *min_element(s) << endl; }
a.cc:4:11: error: 'cin' does not name a type 4 | int n, l; cin >> n >> l; | ^~~ a.cc: In function 'int main()': a.cc:6:13: error: no matching function for call to 'std::__cxx11::basic_string<char>::basic_string(int&)' 6 | string s(n); | ^ In file included from /usr/include/c+...
s494079330
p04044
C++
#include <iostream> #include <cstdio> #include <string> #include <vector> using namespace std; int main() { int len, num; scanf("%d", &num); scanf("%d", &len); string s; vector<string> vs; for (int i = 0; i < num; i++) { cin >> s; vs.push_back(s); } sort(vs.begin(),...
a.cc: In function 'int main()': a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(vs.begin(), vs.end()); | ^~~~ | short
s028462876
p04044
C++
#include<bits/stdc++.h> using namespace std; int n,l; string S[105]; int main() { 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]; return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: 's' was not declared in this scope 10 | cin>>s[i]; | ^ a.cc:12:10: error: 's' was not declared in this scope 12 | sort(s,s+n); | ^
s233770745
p04044
C++
#include<iostream> #include<cstring> #include<algorithm> using namespace std; bool cmp(string a, string b) { return a < b; } int main(){ long i,n,l; cin>>n>>l; string s[n]={}; sort(a,a+n-1,cmp); for (i=0;i<n;i++) cout<<s[i]; return 0; }
a.cc: In function 'int main()': a.cc:13:10: error: 'a' was not declared in this scope 13 | sort(a,a+n-1,cmp); | ^
s739468919
p04044
C++
#! /usr/bin/python3 # 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition) """ 1≦N,L≦100 全ての i(1≦i≦N) に対し、Si の長さは L に等しい。 各 i について, Si は全て半角英小文字のみから成る文字列である。 """ test_mode = False N, L = map(int, input().split()) S = [] for i in range(N): S.append(input()) if test_mode: print(S) S.sort() if test...
a.cc:1:2: error: invalid preprocessing directive #! 1 | #! /usr/bin/python3 | ^ a.cc:2:3: error: invalid preprocessing directive #\U00006587\U00005b57\U00005217\U00005927\U0000597d\U0000304d\U00003044\U0000308d\U0000306f\U00003061\U00003083\U00003093\U000030a4\U000030fc\U000030b8\U000030fc 2 | # 文字列大好きいろ...
s963912123
p04044
C++
#include <iostream> #include <cstring> #include <algorithm> #include <string> using namespace std; int main(void){ int N,L; cin>>N>>L; vector<string> str(N); for(int i=0;i<N;i++){ cin>>str[i]; } sort(str.begin(),str.end()); for(int i=0;i<N;i++){ cout<<str[i]; } ...
a.cc: In function 'int main()': a.cc:9:5: error: 'vector' was not declared in this scope 9 | vector<string> str(N); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm> +++ |+#include <vector> ...
s274995533
p04044
C++
#include<iostream> #include<algorihm> using namespace std; int main() { int N, L; cin >> N >> L; string A[N]; for (int i = 0; i < N; i++) { cin >> A[N]; } sort(A, A + N); for (int i = 0; i < N; i++) { cout << A[i]; if (i = N - 1) { cout << endl; } } }
a.cc:2:9: fatal error: algorihm: No such file or directory 2 | #include<algorihm> | ^~~~~~~~~~ compilation terminated.
s387599167
p04044
C++
#include<iostream> using namespace std; int main() { int N, L; cin >> N >> L; string A[N]; for (int i = 0; i < N; i++) { cin >> A[N]; } sort(A, A + N); for (int i = 0; i < N; i++) { cout << A[i]; if (i = N - 1) { cout << endl; } } }
a.cc: In function 'int main()': a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(A, A + N); | ^~~~ | short
s928997193
p04044
C++
#include<iostream> #include<sort> using namespace std; int main() { int N, L; cin >> N >> L; string A[N]; for (int i = 0; i < N; i++) { cin >> A[N]; } sort(A, A + N); for (int i = 0; i < N; i++) { cout << A[i]; if (i = N - 1) { cout << endl; } } }
a.cc:2:9: fatal error: sort: No such file or directory 2 | #include<sort> | ^~~~~~ compilation terminated.
s758194160
p04044
C++
#include<iostream> using namespace std; int main() { int a,b,h; cin>>a>>b>>h; cout<<''s=''<<(a+b)*h/2.0<<endl; return 0; }
a.cc:7:7: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~~ a.cc:7:11: error: empty character constant 7 | cout<<''s=''<<(a+b)*h/2.0<<endl; | ^~ a.cc: In function 'int main()': a.cc:6:6: error: 'a' was not declared in this scope 6 | cin>>a>>b>>h; | ...
s909147421
p04044
Java
import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.Comparator; public class Main { public static void main(String[] args) throws IOException { try (PrintWriter writer...
Main.java:17: error: cannot find symbol int[] ints = raeder.readIntsSplitByDelimiter(" "); ^ symbol: variable raeder location: class Main Main.java:18: error: cannot find symbol List<String> stringList = new ArrayList(ints[0]); ^ symbol: class List location: clas...
s895619489
p04044
C++
#include <iostream> using namespace std; int main() { int N, L; string S[101]; 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; }
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(S, S+N); | ^~~~ | short
s519964396
p04044
C
#include <stdio.h> #include <string.h> int main(void) { int n, l, i, j, k, m; char s[100][100], tmp[100]; scanf("%d %d", &n, &l); for (i = 0; i < n; i++) { scanf("%s", s[i]); } for (k = n - 1; k > 0; k--) { for (j = 0; j < k; j++) { for (i = 0; i < l...
main.c: In function 'main': main.c:25:41: error: expected ';' before '}' token 25 | s[j][m] = tmp[m] | ^ | ; 26 | } | ~
s552307262
p04044
C++
#include <bits/stdc++.h> #define ll long long #define pb push_back #define f first #define s second #define mp make_pair #define gg return 0; #define pii pair < int, int> using namespace std; const int maxn = (int)1e5 + 7; const int INF = (int)1e9; ll a,b[4],c,d,cnt,e[(int)2e3 + 1][(int)2e3 + 1],cost[maxn],tout[max...
a.cc: In function 'int main()': a.cc:28:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 28 | cout >> s[i]; | ~~~~ ^~ | | | ...
s119702616
p04044
C++
#include<stdio.h> #include<string.h> int main(void){ int n, l; scanf("%d%d", &n, &l); char s[n][l]; for(int i=0;i<n;i++){ scanf("%c", &s[i]); } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(strcmp(s[j],s[j+1])>0){ char a[]; a[l]=s[j+1...
a.cc: In function 'int main()': a.cc:14:22: error: storage size of 'a' isn't known 14 | char a[]; | ^ a.cc:16:23: error: invalid array assignment 16 | s[j+1]=s[j]; | ~~~~~~^~~~~
s631682960
p04044
C++
#include<stdio.h> #include<string.h> int main(void){ int n, l; scanf("%d%d", &n, &l); char s[n][l]; for(int i=0;i<n;i++){ scanf("%d", &s[i]); } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(strcmp(s[j],s[j+1])>0){ char a[l]; a[l]=s[j+...
a.cc: In function 'int main()': a.cc:15:27: error: invalid conversion from 'char*' to 'char' [-fpermissive] 15 | a[l]=s[j+1]; | ~~~~~^ | | | char* a.cc:16:23: error: invalid array assignment 16 | ...
s805813690
p04044
C++
#include<bits/stdc++.h> using namespace std; int a,n,i; string b[105]; int main() { cin>>a>>n; for(i=0;i<a;i++) { cin>>b[s]; } sort(b,b+a); for(i=0;i<a;i++) cout<<b[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:10:16: error: 's' was not declared in this scope 10 | cin>>b[s]; | ^
s792942072
p04044
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main(int argc, char const *argv[]) { int n, l; cin >> n >> l; vector<string> s(n); for (size_t i = 0; i < n; i++) cin >> s[i]; sort(s.begin(), s.end()); string ans; for (size_t i = 0; i < n; i++) ans += s[i]; cout << an...
a.cc: In function 'int main(int, const char**)': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(s.begin(), s.end()); | ^~~~ | short
s771129688
p04044
C++
#include<iostream> #include<cstdio> #include<algorithm> using namespace std; int a,n; char b[2333]; int main() { cin>>a>>n; for(int s=0;s<a;s++) cin>>b[s]; sort(b,b+a); for(int s=0;s<a;s++) cout<<b[s]; cout<<endl }
a.cc: In function 'int main()': a.cc:15:15: error: expected ';' before '}' token 15 | cout<<endl | ^ | ; 16 | } | ~
s370700388
p04044
C++
#include<iostream> #include<cstdio> using namespace std; int a,n; string b[105]; int main() { cin>>a>>n; for(int s=0;s<a;s++) { cin>>b[s]; } sort(b,b+a); for(int s=0;s<a;s++) cout<<b[s]; cout<<endl; }
a.cc: In function 'int main()': a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(b,b+a); | ^~~~ | short
s541412693
p04044
C++
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <cmath> using namespace std; struct a{string s;}b[1000000]; bool cmp(a a, a b) { return a.s < b.s; } int main() { int n,l; cin >> n >> l; for(int i = 1;i <= n;++i) cin >> b[i].s; sort(b + 1,b + 1 + n,cmp); for(int i = 1;i ...
a.cc:8:15: error: 'a' is not a type 8 | bool cmp(a a, a b) | ^ a.cc: In function 'bool cmp(a, int)': a.cc:10:24: error: request for member 's' in 'b', which is of non-class type 'int' 10 | return a.s < b.s; | ^ In file included from /usr/include/c++/14/bit...
s772057462
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,m string s[100]; cin>>n>>m; 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; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'string' 6 | string s[100]; | ^~~~~~ a.cc:7:11: error: 'm' was not declared in this scope 7 | cin>>n>>m; | ^ a.cc:9:10: error: 's' was not declared in this scope 9 | cin>>s[i]; | ^ a.c...
s020494587
p04044
C++
#incldeu <bits/stdc++.h> using namespace std; int main(){ int n,m string s[100]; cin>>n>>m; 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; }
a.cc:1:2: error: invalid preprocessing directive #incldeu; did you mean #include? 1 | #incldeu <bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'string' 6 | string s[100]; | ^~~~~~ a.cc:7:3: error: 'cin' was not declared in ...
s497173728
p04044
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a=sc.nextInt() int b=sc.nextInt(); String c[] =new String[a]; for(int i=0;i<b;i++){ c[i]=sc.next(); } Arrays.sort(c); for(int i=0;i<b;i++){ System.out.print(c[i]); } } }
Main.java:5: error: ';' expected int a=sc.nextInt() ^ 1 error
s993447524
p04044
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a=sc.nextInt(),b=nextInt(); String c[] =new String[a]; for(int i=0;i<b;i++){ c[i]=sc.next(); } Arrays.sort(c); for(int j=0;j<b;j++){ System.out.print(c[i]); } } }
Main.java:5: error: cannot find symbol int a=sc.nextInt(),b=nextInt(); ^ symbol: method nextInt() location: class Main Main.java:12: error: cannot find symbol System.out.print(c[i]); ^ symbol: variable i location: class Main 2 errors
s009834676
p04044
C++
#include <bits/stdc++.h> using namespace std; string s[111]; int main () { int n,l; 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; }
a.cc: In function 'int main()': a.cc:12:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 12 | cout>>s[i]; | ~~~~^~~~~~ | | | | | std::stri...
s480608862
p04044
C++
#include <bits/stdc++.h> using namespace std; string s[111]; int main () { int n,l; cin>>n>>l; for (int i = 0; i < n; ++i) cin>>s[i]; sort (s,s+n); for (int i = 0; i < ; ++i) cout>>s[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:11:25: error: expected primary-expression before ';' token 11 | for (int i = 0; i < ; ++i) | ^ a.cc:12:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::b...
s198012155
p04044
C++
#include<iostream> #include<algorithm> #include<cstring> using namespace std; struct ap{ int num; char ch[110]; }; bool cmp(ap a,ap b){ return a.num<b.num; } ap a[110]; int main(){ int n,l; // while(1){ cin>>n>>l;getchar(); for(int i=0;i<n;++i){ gets(a[i].ch); a[i].num=0; int m=strlen(a[i].ch); for...
a.cc: In function 'int main()': a.cc:19:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | gets(a[i].ch); | ^~~~ | getw
s027428321
p04044
C++
##includeinclude <iostream><iostream> ##includeinclude <algorithm><algorithm> #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 = ...
a.cc:2:1: error: stray '##' in program 2 | ##includeinclude <iostream><iostream> | ^~ a.cc:3:2: error: stray '##' in program 3 | ##includeinclude <algorithm><algorithm> | ^~ a.cc:2:3: error: 'includeinclude' does not name a type 2 | ##includeinclude <iostream><iostream> | ^~~~~~~~~~...
s995055476
p04044
C++
##includeinclude <iostream><iostream> ##includeinclude <algorithm><algorithm> #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...
a.cc:1:1: error: stray '##' in program 1 | ##includeinclude <iostream><iostream> | ^~ a.cc:2:2: error: stray '##' in program 2 | ##includeinclude <algorithm><algorithm> | ^~ a.cc:1:3: error: 'includeinclude' does not name a type 1 | ##includeinclude <iostream><iostream> | ^~~~~~~~~~...
s102986252
p04044
C++
#include<iostream> #include<algorithm> #include<cstring> using namespace std; struct ap{ int num; char ch[110]; }; bool cmp(ap a,ap b){ return a.num<b.num; } ap a[110]; int main(){ int n,l; // while(1){ cin>>n>>l;getchar(); for(int i=0;i<n;++i){ gets(a[i].ch); a[i].num=0; int m=strlen(a[i].ch); for...
a.cc: In function 'int main()': a.cc:19:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | gets(a[i].ch); | ^~~~ | getw
s257942012
p04044
C++
#include<cstdio> #include<cstring> #include<iostream> using namespace std; int main () { char s[110][110],t[50]; int n,i,j,k,l; while(scanf("%d%d\n",&n,&l)!=EOF) { for(i=0;i<n;i++) gets(s[i]); for(i=0;i<n-1;i++) { k=i; for(j=i+1;j<n;j++) if(strcmp(s[j],s[k])<0)k=j; strcpy(t,s[i]); strcpy(s[i],s[k]); strcp...
a.cc: In function 'int main()': a.cc:14:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | gets(s[i]); | ^~~~ | getw
s224677109
p04044
C++
#include<cstdio> #include<cstring> #include<iostream> using namespace std; int main () { char s[110][110],t[50]; int n,i,j,k,l; while(scanf("%d%d\n",&n,&l)!=EOF) { for(i=0;i<n;i++) gets(s[i]); for(i=0;i<n-1;i++) { k=i; for(j=i+1;j<n;j++) if(strcmp(s[j],s[k])<0)k=j; strcpy(t,s[i]); strcpy(s[i],s[k]); strcp...
a.cc: In function 'int main()': a.cc:14:4: error: 'gets' was not declared in this scope; did you mean 'getw'? 14 | gets(s[i]); | ^~~~ | getw
s781642403
p04044
C++
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0;i < n;i++) #define REPR(i, n) for(int i = n;i >= 0;i--) #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define VSORT(v) sort(v.begin(), v.end()); #define llong long long #define pb(a)...
a.cc: In function 'int main()': a.cc:28:8: error: 'vec' was not declared in this scope 28 | sort(vec.begin(),vec.end()); | ^~~
s973576977
p04044
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N,L; cin>>NL; char s[110]; 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; }
a.cc: In function 'int main()': a.cc:8:7: error: 'NL' was not declared in this scope; did you mean 'L'? 8 | cin>>NL; | ^~ | L
s525503166
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int l, n; cin >> n >> l; vactor<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; }
a.cc: In function 'int main()': a.cc:8:9: error: 'vactor' was not declared in this scope 8 | vactor<string> s(n); | ^~~~~~ a.cc:8:22: error: expected primary-expression before '>' token 8 | vactor<string> s(n); | ^ a.cc:8:24: error: 's' was not declared i...
s018561616
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int l, n; cin >> n >> l; string s[n]; for (int i = 0; i < n; i++) cin >> s[i]; sort(s[0], s[n]); for (int i = 0; i < n; i++) cout << s[i]; cout << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterato...
s323763152
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, l; cin >> n >> l; string s[n], ans; for (int i = 0; i < n; i++) cin >> s[i]; sort(s[0], s[n]); for (int i = 0; i < n; i++) ans += s[i]; cout << ans << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterato...
s661406135
p04044
C++
n = list(map(int, input().split())) a = [] for i in range(n[0]): a.append(input()) a.sort() for i in range(n[0]): print(a[i], end="") print()
a.cc:1:1: error: 'n' does not name a type 1 | n = list(map(int, input().split())) | ^
s972757286
p04044
C++
n = list(map(int, input().split())) a = [] for i in range(n[0]): a.append(input()) a.sort() for i in range(n[0]): print(a[i], end="") print()
a.cc:1:1: error: 'n' does not name a type 1 | n = list(map(int, input().split())) | ^
s292371050
p04044
C++
#include <bits/stdc++.h> #define FOR(i,x,y) for(int i=x;i<y;i++) using namespace std; int main(){ int N,L; cin >> N; vector<string> S(N); FOR(i,0,N)cin >> S[i]; sort(S.begin(),S.end()); for(auto x:S)cout << x; cout << endll }
a.cc: In function 'int main()': a.cc:11:11: error: 'endll' was not declared in this scope 11 | cout << endll | ^~~~~
s584292242
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s604650759
p04044
Java
public class Main { public static void main(String[] args) { Scanner sd = new Scanner(System.in); String s = sd.next(); String t = sd.next(); //行数 int a = Integer.parseInt(s); //文字列の長さ int b = Integer.parseInt(t); //配列に入力 String[] mozi = new String[a]; for(int i=0; i<a; i++) { mozi[i] = sd.next...
Main.java:3: error: cannot find symbol Scanner sd = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner sd = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s577053815
p04044
C++
#include<iostream> #include<algorithm> #include<math.h> #include<cstdio> #include<ctype.h> #include<stdio.h> #include<set> #include<vector> #include<map> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<numeric> #include<string> typedef long long ll; using namespace std...
a.cc: In function 'int main()': a.cc:35:14: error: 'i' was not declared in this scope 35 | ans+=S[i]; | ^
s447226846
p04044
C++
l = input().split(' ') N = int(l[0]) L = int(l[1]) S=[] for i in range(N): S.append(input()) S.sort() for str in S: print(str,end="") print()
a.cc:1:1: error: 'l' does not name a type 1 | l = input().split(' ') | ^
s108459371
p04044
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> #include<iostream> #include<string> #include<vector> #include<queue> #include<map> using namespace std; typedef long long LL; #define M(a,b) memset(a,b,sizeof(a)) #define pb push_back const int maxn = 200000+5; string s[105]; int main() { int n,l;...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 24 | sort(s+1,s+1+n); | ^~~~ | sqrt
s851234409
p04044
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { int n, l; cin >> n >> l; string s[110]; for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s, s+n); string stot; for (int i = 0; i < n; i++) { stot += s[i]; } cout << stot << endl return 0; }
a.cc: In function 'int main()': a.cc:20:23: error: expected ';' before 'return' 20 | cout << stot << endl | ^ | ; 21 | return 0; | ~~~~~~
s832474728
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,l; cin>>n>>l; string t; 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++){ t+=s.at(i) } cout<<t<<endl; return 0; }
a.cc: In function 'int main()': a.cc:14:13: error: expected ';' before '}' token 14 | t+=s.at(i) | ^ | ; 15 | } | ~
s537095150
p04044
C++
#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)<<end; } cout>>endl; return 0; }
a.cc: In function 'int main()': a.cc:13:17: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 13 | cout<< s.at(i)<<end; | ~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c+...
s071659270
p04044
C++
#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()) for (int i=0;i<n;i++){ cin >> s[i]; } }
a.cc: In function 'int main()': a.cc:11:32: error: expected ';' before 'for' 11 | sort(s.begin(),s.end()) | ^ | ; 12 | for (int i=0;i<n;i++){ | ~~~ a.cc:12:22: error: 'i' was not declared i...
s980673432
p04044
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int N, L; vector<string> sv; for(int i = 0; i < N; i++) { string tmp; cin >> tmp; sv.push_back(tmp); } sort(sv.begin(), sv.end()); for(int i = 0, svsize = sv.size(); i < svsize; i++) { cout <...
a.cc: In function 'int main()': a.cc:9:3: error: 'vector' was not declared in this scope 9 | vector<string> sv; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm> +++ |+#include <vector> 4 | a.c...
s161235835
p04044
C++
#include<iostream> #include<vector> using namespace std; int main(){ int N,L; cin >> N >> L; vector<string> v; string ret; string s; for(int i = 0;i < N;i++){ cin >> s; v.push_back(s); } sort(v.begin(),v.end()); for(vector<string>::iterator it = v.begin() ;it != v.end();it++){...
a.cc: In function 'int main()': a.cc:23:5: error: 'sort' was not declared in this scope; did you mean 'short'? 23 | sort(v.begin(),v.end()); | ^~~~ | short
s399928161
p04044
C++
#include<iostream> #include<cmath> #include<vector> #include<map> using namespace std; int main(){ int N; int 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); } re...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 21 | sort(vec.begin(),vec.end()); | ^~~~ | sqrt
s370902505
p04044
C++
#include<vector> #include<iostream> #include<cmath> #include<map> using namespace std; int main(){ int N; int 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); } re...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 21 | sort(vec.begin(),vec.end()); | ^~~~ | sqrt