submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s424406142
p04044
Java
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n, l; String ary[] = new String[n]; n = sc.nextInt(); l = sc.nextInt(); for(int i=0; i<n; i++){ ary[i] = sc.next()...
Main.java:19: error: cannot find symbol Arrays.sort(ary); ^ symbol: variable Arrays location: class Main Main.java:23: error: cannot find symbol answer += ary[i]; ^ symbol: variable i location: class Main 2 errors
s046734550
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[] list = new String[n]; for (int i = 0; i < n; i++) { list[i] = sc.nextInt(); ...
Main.java:13: error: incompatible types: int cannot be converted to String list[i] = sc.nextInt(); ^ 1 error
s783159415
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.nectInt(); String[] list = new String[n]; for (int i = 0; i < n; i++) { list[i] = sc.nextInt(); ...
Main.java:8: error: cannot find symbol int l = sc.nectInt(); ^ symbol: method nectInt() location: variable sc of type Scanner Main.java:13: error: incompatible types: int cannot be converted to String list[i] = sc.nextInt(); ^ 2 errors
s756496514
p04044
C++
#include <iostream> #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); string ans = ""; for (int j = 0; j < n; j++) { ans += s[j]; } cout << ans; }
a.cc: In function 'int main()': a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s, s + n); | ^~~~ | short
s829655466
p04044
C++
#include <iostream> #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); string ans = ""; for (int j = 0; j < n; j++) { ans += s[j] } cout << ans; }
a.cc: In function 'int main()': a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s, s + n); | ^~~~ | short a.cc:18:16: error: expected ';' before '}' token 18 | ans += s[j] | ^ | ; 19 | } | ~ ...
s927408378
p04044
C++
// Created by liszt on 2019/07/21. #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++){ string s; cin>>s; S[i]=s; } sort(S.begin(),S.end()); for(int i=0;i<n;i++){ cout<<S[i]; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: no match for 'operator=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | S[i]=s; | ^ In file included from /usr/include/c++/14/vector:72, ...
s214750891
p04044
C++
#include<iostream> #include<algorithm> #include <cassert> #include<string> #include<vector> #include <utility> #include <math.h> #include<cmath> # include <set> # include <iomanip> # include <functional> # include <queue> #include<map> #define INF 1000000009; using namespace std; int gcd(int a, int b) { while (a % b !...
a.cc: In function 'int main()': a.cc:35:26: error: expected ';' before '<' token 35 | for (int i = 0, i < ko; i++) { | ^~ | ; a.cc:35:27: error: expected primary-expression before '<' token 35 | for (int i = 0, i < ko; i++) { | ...
s882191286
p04044
Java
import java.util.Scanner; import java.util.stream.Collectors; import java.util.stream.IntStream; public class ProblemB { public static void main(String[] args) { try (Scanner scanner = new Scanner(System.in)) { int n = scanner.nextInt(); scanner.nextInt(); System.out.println( IntStream.range(0, n).ma...
Main.java:5: error: class ProblemB is public, should be declared in a file named ProblemB.java public class ProblemB { ^ 1 error
s979009346
p04044
C
#include <stdio.h> int main(){ int i,L,n,max=0; char s[101][101]; scanf("%d%d",&n,&L); for(i=0;i<n;i++){ for(int j = 0; j < L; j++){ scanf("%c",s[i][j]); } } sort(s,s+n); for(int i = 0; i < n; i++){ for(int j = 0; j < l; j++){ printf("%s",s[i][j]); } } printf("\n"); return 0; }
main.c: In function 'main': main.c:14:1: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration] 14 | sort(s,s+n); | ^~~~ main.c:16:22: error: 'l' undeclared (first use in this function) 16 | for(int j = 0; j < l; j++){ | ^ main.c:16:22: note: each undec...
s372310174
p04044
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define MOD 1000000007 #define PI 3.141592653589793 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()); string ans...
a.cc:14:5: error: extended character   is not valid in an identifier 14 |   cin >> v[i]; | ^ a.cc:14:5: error: extended character   is not valid in an identifier a.cc:18:7: error: extended character   is not valid in an identifier 18 |  ans += s; | ^ a.cc: In function 'int main()':...
s644417364
p04044
C++
#include <iostream> #include <string> #include <map> 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++) cout << s[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(s, s+n); | ^~~~ | short
s118959556
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,L; cin>>N>>L; vector<string>ch (N); for(int i=0;i<ch.size;i++) cin>>ch.at(i); sort(ch.begin(),ch.end()); for(int i=0;i<ch.size;i++) cout<<ch.at(i); cout<<endl; }
a.cc: In function 'int main()': a.cc:7:20: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ...
s583151940
p04044
C++
#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; } }
a.cc: In function 'int main()': a.cc:12:30: error: expected ';' before 'for' 12 | sort(vec.begin(),vec.end()) | ^ | ; 13 | for(int i=0;i<N;i++){ | ~~~ a.cc:13:15: error: 'i' was not declared in this scope ...
s112830306
p04044
C++
#include<iostream> #include<vector> 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; } }
a.cc: In function 'int main()': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(vec.begin(),vec.end()); | ^~~~ | short
s685213521
p04044
C++
#include<iostream> #include<vector> 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; } }
a.cc: In function 'int main()': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(vec.begin(),vec.end()); | ^~~~ | short
s841032164
p04044
C++
#include<iostream> #include<vector> using namespace std; int main() { 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; } }
a.cc: In function 'int main()': a.cc:5:22: error: 'N' was not declared in this scope 5 | vector<string> vec(N); | ^ a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(vec.begin(),vec.end()); | ^~~~ | short
s015218059
p04044
C++
#include<bits/stdc++.h> using namespace std; int a,b; string s[50]; int main() { cin>>a>>b; if(a==1){ cout<<"frwgsga"; map<long long,long long>aa; for(int i=0; i<a; i++) { cin>>s[i]; aa[i]=s[i]; } } if(a==100){ for(int i=0;i<=pow(2,63)-1;i++){ if(sqrt(sqrt(i))*sqrt(sqrt(i))*sqrt(sq...
a.cc: In function 'int main()': a.cc:12:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::map<long long int, long long int>::mapped_type' {aka 'long long int'} in assignment 12 | aa[i]=s[i]; | ~~~^ | | ...
s712784437
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(void){ string s[3]; for(int i=0;i<3;i++){ cin>>s[i]; } sort(s.begin(),s.end()); cout<<s[0]<<s[1]<<s[2]<<endl; }
a.cc: In function 'int main()': a.cc:9:16: error: request for member 'begin' in 's', which is of non-class type 'std::string [3]' {aka 'std::__cxx11::basic_string<char> [3]'} 9 | sort(s.begin(),s.end()); | ^~~~~ a.cc:9:26: error: request for member 'end' in 's', which is of non-class ty...
s198531236
p04044
C++
#include <iostream> using namespace std; int main() { int n,l; string s; cin>>n>>l; vector<string> v; for(int i=0;i<n;i++) { cin>>s; v.push_back(s); } sort(v.begin(),v.end()); for(int i=0;i<n;i++) cout<<v[i]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'vector' was not declared in this scope 8 | vector<string> v; | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> ...
s750711311
p04044
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int cmp(const void *a,const void *b){ return strcmp(a,b); } int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; 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++)printf("%s",s[i])...
main.c:15:3: error: expected identifier or '(' before 'for' 15 | for(int i=0;i<n;i++)printf("%s",s[i]); | ^~~ main.c:15:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 15 | for(int i=0;i<n;i++)printf("%s",s[i]); | ^ main.c:15:20: error: expected '=', '...
s187451081
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; vector<string> str(a); for (int i = 0; i < a; i++) { cin >> str[i]; } str.sort(str.begin(), str.end()); for (int i = 0; i < a; i++) { cout << str[i]; } }
a.cc: In function 'int main()': a.cc:10:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'sort' 10 | str.sort(str.begin(), str.end()); | ^~~~
s429737572
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; vector<string> str(a); for (int i = 0; i < a; i++) { cin >> str[i]; } str.sort(); for (int i = 0; i < a; i++) { cout << str[i]; } }
a.cc: In function 'int main()': a.cc:10:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'sort' 10 | str.sort(); | ^~~~
s126062307
p04044
C++
#include <bits/stc++.h> using namespace std; int main(){ int a, b; cin >> a >> b; vector<string> str(a); for (int i = 0; i < a; i++) { cin >> str[i]; } str.sort(); for (int i = 0; i < a; i++) { cout << str[i]; } }
a.cc:1:10: fatal error: bits/stc++.h: No such file or directory 1 | #include <bits/stc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s588861821
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int S ; cin S; for ( char c = 'a';c <= 'z' ; c++){ bool found = false; for (int i=0; i < S.size();i++){ if(s[i]==c){ found true; } } if (! found){ cout << c << endl; return 0; } } cout << "None" << e...
a.cc: In function 'int main()': a.cc:6:6: error: expected ';' before 'S' 6 | cin S; | ^~ | ; a.cc:11:25: error: request for member 'size' in 'S', which is of non-class type 'int' 11 | for (int i=0; i < S.size();i++){ | ^~~~ a.cc:12:10: error: 's' was not ...
s706042366
p04044
C
#include <stdio.h> #include <stdstr.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<n;i++)for(int j=0;j<n;j++){ if(0>strcmp(s[j],s[j+1])){ strcpy(temp,s[j]); strcpy(s[j],s[j+1]); strcpy(s[j+1],temp); ...
main.c:2:10: fatal error: stdstr.h: No such file or directory 2 | #include <stdstr.h> | ^~~~~~~~~~ compilation terminated.
s462105130
p04044
C
#include <stdio.h> #include <stdstr.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<n;i++)for(int j=0;j<n;j++){ if(0>strcmp(s[j],s[k])){ strcpy(temp,s[j]); strcpy(s[j],s[k]); strcpy(s[k],temp); } } ...
main.c:2:10: fatal error: stdstr.h: No such file or directory 2 | #include <stdstr.h> | ^~~~~~~~~~ compilation terminated.
s795909211
p04044
C
#include <stdio.h> #include <stdstr.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ strcpy(temp,s[j]); strcpy(s[j],s[k]); s...
main.c:2:10: fatal error: stdstr.h: No such file or directory 2 | #include <stdstr.h> | ^~~~~~~~~~ compilation terminated.
s673757765
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ temp=s[j]; s[j]=s[k]; s[k]=temp; } } for(int i=0;i<...
main.c: In function 'main': main.c:10:11: error: assignment to expression with array type 10 | temp=s[j]; | ^ main.c:11:11: error: assignment to expression with array type 11 | s[j]=s[k]; | ^ main.c:12:11: error: assignment to expression with array type 12 | s[...
s762093805
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; char temp[l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp=s[j]; s[j]=s[k]; s[k]=temp; } } for(int i...
main.c: In function 'main': main.c:10:17: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 10 | char temp=s[j]; | ^ main.c:11:11: error: assignment to expression with array type 11 | s[j]=s[k]; | ^ main.c:1...
s330973152
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp[l+1]=s[j]; s[j]=s[k]; s[k]=temp; } } for(int i=0;i<n;i++)pr...
main.c: In function 'main': main.c:9:22: error: variable-sized object may not be initialized except with an empty initializer 9 | char temp[l+1]=s[j]; | ^ main.c:10:11: error: assignment to expression with array type 10 | s[j]=s[k]; | ^ main.c:11:11: error: ...
s890166418
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp=s[j]; s[j]=s[k]; s[k]=temp; } } for(int i=0;i<n;i++)printf(...
main.c: In function 'main': main.c:9:17: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 9 | char temp=s[j]; | ^ main.c:10:11: error: assignment to expression with array type 10 | s[j]=s[k]; | ^ main.c:11...
s880109289
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(int k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp=s[j]; s[j]=s[k]; s[k]=temp; } } for(int i=0;i<n;i++)printf(...
main.c: In function 'main': main.c:9:17: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion] 9 | char temp=s[j]; | ^ main.c:10:11: error: assignment to expression with array type 10 | s[j]=s[k]; | ^ main.c:11...
s363527338
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; for(int i=0;i<n;i++)scanf("%s",&s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(inr k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp=s[j][i]; s[j][i]=s[k][i]; s[k][i]=temp; } } for(int i=0;i<n...
main.c: In function 'main': main.c:7:47: error: unknown type name 'inr'; did you mean 'int'? 7 | for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(inr k=j+1;k<n;k++){ | ^~~ | int
s454079182
p04044
C
#include <stdio.h> int main(){ int n,l; scanf("%d%d",&n,&l); char s[n][l+1]; for(int i=0;i<n;i++)scanf("%s",s[i]); for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(inr k=j+1;k<n;k++){ if((int)s[j][i]>(int)s[k][i]){ char temp=s[j][i]; s[j][i]=s[k][i]; s[k][i]=temp; } } for(int i=0;i<n;...
main.c: In function 'main': main.c:7:47: error: unknown type name 'inr'; did you mean 'int'? 7 | for(int i=0;i<l;i++)for(int j=0;j<n;j++)for(inr k=j+1;k<n;k++){ | ^~~ | int
s479417334
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { string L; cin >> L; vector<int> Si for (int i = 0; i < N; i++) { cin >> Si; } vector<int> vec = {for(int i=0; i <N; i++)}; sort(vec.begin(), vec.end()); for (int i = 0; i < N; i++) { cout << Si << endl; } }
a.cc: In function 'int main()': a.cc:8:6: error: expected initializer before 'for' 8 | for (int i = 0; i < N; i++) { | ^~~ a.cc:8:22: error: 'i' was not declared in this scope 8 | for (int i = 0; i < N; i++) { | ^ a.cc:8:26: error: 'N' was not declared in this sco...
s620491479
p04044
C++
#include<iostream> #include <algorithm> #include <string> #include<vector> #include <array> #include<tuple> #include<queue> #include<stack> #include<iomanip> //AtCoderC++.cpp using namespace std; vector<string> split(string& content, char delim) { auto ss = vector<string>(); string s = ""; for (size_t i = 0; i < c...
a.cc: In function 'int main()': a.cc:39:22: error: expected '}' at end of input 39 | cout << endl; | ^ a.cc:29:12: note: to match this '{' 29 | int main() { | ^
s922169347
p04044
C
#include <iostream> #include <vector> using namespace std; int main() { int n, l; cin >> n >> l; vector<string> s; string result; for (int i = 0; i < n; i++) { string str; cin >> str; s.push_back(str); } for (int i = 0; i < n; i++) { for (int j = 0; j < l; j++) { if (result[0] < s...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s019439174
p04044
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int main(){ int N, L; scanf("%d %d", &N, &L); string str[100]; for(int i=0; i<N; i++){ char tmp[L]; scanf("%s", tmp); str[i] = tmp; } sort(str, str+N); for(int i = 0; i < N; i++){ string s; s += str[i...
a.cc: In function 'int main()': a.cc:23:16: error: 's' was not declared in this scope 23 | printf("%s", s.c_str()); | ^
s517533291
p04044
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int main(){ int N, L; scanf("%d %d", &N, &L); string str[100]; for(int i=0; i<N; i++){ char tmp[L]; scanf("%s", tmp); str[i] = tmp; } sort(str, str+N); for(int i = 0; i < N; i++){ char s; s = str[i]; ...
a.cc: In function 'int main()': a.cc:21:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment 21 | s = str[i]; | ~~~~~^ | | | std::string {aka std::__cxx11::basic_string<char>}
s149038777
p04044
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int main(){ int N, L; scanf("%d %d", &N, &L); string str[100]; for(int i=0; i<N; i++){ char tmp[L]; scanf("%s", tmp); str[i] = tmp; } sort(str, str+N); printf("%s", str.c_str()); return 0; }
a.cc: In function 'int main()': a.cc:19:20: error: request for member 'c_str' in 'str', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'} 19 | printf("%s", str.c_str()); | ^~~~~
s777417121
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S; 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); } endl; }
a.cc: In function 'int main()': a.cc:15:7: error: statement cannot resolve address of overloaded function 15 | endl; | ^
s719286491
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S; 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); endl; }
a.cc: In function 'int main()': a.cc:13:7: error: statement cannot resolve address of overloaded function 13 | endl; | ^
s033000715
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string> S; 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) << endl; }
a.cc: In function 'int main()': a.cc:9:45: error: expected ';' before 'sort' 9 | for (int i = 0; i < N; i++) cin >> S.at(i) | ^ | ; 10 | 11 | sort(S.begin(), S.end()); | ~~~~ ...
s361528977
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ stirng str[104]; int y; cin>>y; for(int i=0;i<y;i++){ cin>>str[i]; } sort(str,str+y); for(int i=0;i<y;i++){ cout<<str[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:4:9: error: 'stirng' was not declared in this scope 4 | stirng str[104]; | ^~~~~~ a.cc:8:14: error: 'str' was not declared in this scope; did you mean 'std'? 8 | cin>>str[i]; | ^~~ | std a.cc:10:10: error: '...
s216273091
p04044
C++
#include <bits/stdc++.h> 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.begin(), S.end()); string answer; for(int i = 0; i < N; i++) { answer += S[i]; } cout << answer << endl; }
a.cc: In function 'int main()': a.cc:13:10: error: request for member 'begin' in 'S', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'} 13 | sort(S.begin(), S.end()); | ^~~~~ a.cc:13:21: error: request for member 'end' in 'S', which is of non-class type 'std::...
s409387628
p04044
Java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String[] NLarr = scan.nextLine().split(" "); //N개의 string을 입력받는다 int N = Integer.parseInt(NLarr[0]); //각 string은 L의 길이를 갖는다 int L = Integer.parseInt(...
Main.java:32: error: illegal start of type }*/ ^ Main.java:34: error: <identifier> expected Arrays.sort(strArr); ^ Main.java:34: error: <identifier> expected Arrays.sort(strArr); ^ Main.java:39: error: illegal start of type for(String _print : strArr){ ^ Main.java:39: error...
s704596972
p04044
Java
import java.util.*; import java.lang.StringBuilder; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String[] line = sc.nextLine().split(" "); int num = Integer.parseInt(line[0]); int length = Integer.parseInt(line[1]); ...
Main.java:26: error: variable result is already defined in method main(String[]) StringBuilder result = new StringBuilder(); ^ 1 error
s155073142
p04044
C++
#include <iostream> #include <vector> std::string f(std::vector<std::string> s) { std::sort(s.begin(), s.end()); std::string result = ""; for (int i = 0; i < s.size(); i++) { result.append(s[i]); } return result; } int main() { int n, l; std::cin >> n >> l; std::vector<std::s...
a.cc: In function 'std::string f(std::vector<std::__cxx11::basic_string<char> >)': a.cc:5:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 5 | std::sort(s.begin(), s.end()); | ^~~~ | qsort
s392981197
p04044
C++
#include <iostream> #include <algorithm> #include <vector<> using namespace std; int main(){ int n,l; vector<string> s[110]; 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] } }
a.cc:3:10: fatal error: vector<: No such file or directory 3 | #include <vector<> | ^~~~~~~~~ compilation terminated.
s433165488
p04044
C++
#include <iostream> #include <algorithm> using namespace std; int n,t; string a[101]; int main() { cin>>n>>t; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); for(int i=0;i<n;i++) cout<<b[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:13:15: error: 'b' was not declared in this scope 13 | cout<<b[i]; | ^
s542043610
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(void) { int n,l; cin>>n>>l; vector<string>v(n) for(int i=0;i<n;i++) cin>>v.at(i); sort(v.begin(),v.end()); for(int j=0;j<n;j++) cout<<v.at(j) cout<<endl; }
a.cc: In function 'int main()': a.cc:9:3: error: expected ',' or ';' before 'for' 9 | for(int i=0;i<n;i++) | ^~~ a.cc:9:15: error: 'i' was not declared in this scope 9 | for(int i=0;i<n;i++) | ^ a.cc:13:18: error: expected ';' before 'cout' 13 | cout<<v.at(j) | ...
s130019906
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(void) { int n,l; cin>>n>>l; vectro<string>v(n) for(int i=0;i<n;i++) cin>>v.at(i); sort(v.begin(),v.end()); for(int j=0;j<n;j++) cout<<v.at(j) cout<<endl; }
a.cc: In function 'int main()': a.cc:8:3: error: 'vectro' was not declared in this scope 8 | vectro<string>v(n) | ^~~~~~ a.cc:8:16: error: expected primary-expression before '>' token 8 | vectro<string>v(n) | ^ a.cc:8:17: error: 'v' was not declared in this scope 8 | vectr...
s473856728
p04044
C++
#include <list> // ヘッダファイルインクルード #include <vector> #include <iostream> using namespace std; // 名前空間指定 int comp_str(string first_str, string second_str, int length){ int res = 1; int count_length = 0; while(count_length != 3){ char first_c = first_string[count_length]; char second_c = secon...
a.cc: In function 'int comp_str(std::string, std::string, int)': a.cc:10:20: error: 'first_string' was not declared in this scope; did you mean 'first_str'? 10 | char first_c = first_string[count_length]; | ^~~~~~~~~~~~ | first_str a.cc:11:21: error: 'second_stri...
s856986343
p04044
C++
#include <list> // ヘッダファイルインクルード #include <vector> #include <iostream.h> using namespace std; // 名前空間指定 int comp_str(string first_str, string second_str, int length){ int res = 1; int count_length = 0; while(count_length != 3){ char first_c = first_string[count_length]; char second_c = sec...
a.cc:3:10: fatal error: iostream.h: No such file or directory 3 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s241008208
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,L; cin >> N >> L; string str[N]; for (int i=0;i<N;i++){ for (int j=0;j<i;j++){ if(str[i]>str[j]){ str[i]=str[j]+str[i]; str[j]=""; } } } for (int i=0;i<N;i++){ cout << str[i] << endl; } ;
a.cc: In function 'int main()': a.cc:19:4: error: expected '}' at end of input 19 | ; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s064111124
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,L; cin >> N >> L; string str[N]; for (i=0;i<N;i++){ for (j=0;j<i;j++){ if(str[i]>str[j]){ str[i]=str[j]+str[i]; str[j]=""; } } } for (i=o;i<N;i++){ cout << str[i] << endl; } ;
a.cc: In function 'int main()': a.cc:8:8: error: 'i' was not declared in this scope 8 | for (i=0;i<N;i++){ | ^ a.cc:9:10: error: 'j' was not declared in this scope 9 | for (j=0;j<i;j++){ | ^ a.cc:16:8: error: 'i' was not declared in this scope 16 | for (i=o;i<N;i++){ ...
s876988632
p04044
C++
#include<bits/stdc++.h> using namespace std; string a[101]; int n; int main(){ scanf("%d",&n); for(register i=0;i<n;++i) cin>>a[i]; sort(a,a+n); for(register i=0;i<n;++i) cout<<a[i]; return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: 'i' does not name a type 7 | for(register i=0;i<n;++i) | ^ a.cc:7:22: error: expected ';' before 'i' 7 | for(register i=0;i<n;++i) | ^ | ; a.cc:7:22: error: 'i' was not declared...
s690733350
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { 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 (const string s : a) { cout << s; } cout << endl; }
a.cc: In function 'int main()': a.cc:12:29: error: expected ';' before 'for' 12 | sort(a.begin(), a.end()) | ^ | ; 13 | 14 | for (const string s : a) { | ~~~
s557919939
p04044
C++
#include <iostream> #include <algorithm> #include <string> #include <math.h> #include <stdio.h> #include <set> using namespace std; int main(){ int n, l; cin>>n>>l; char k[n][l+1]; int i; for(i=0; i<n; i++){ cin>>k[i]; } sort(k, k+n); for(i=0; i<n; i++){ cout<<char[i]; ...
a.cc: In function 'int main()': a.cc:18:9: error: no matching function for call to 'sort(char [n][(l + 1)], char (*)[(l + 1)])' 18 | sort(k, k+n); | ~~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candi...
s783431473
p04044
C++
#include <iostream> #include <algorithm> #include <string> #include <math.h> #include <stdio.h> #include <set> using namespace std; int main(){ int n, l; cin>>n>>l; char [n][l+1]; int i; for(i=0; i<n; i++){ cin>>char[i]; } sort(char, char+n); for(i=0; i<n; i++){ cout<<c...
a.cc: In function 'int main()': a.cc:12:10: error: structured binding declaration cannot have type 'char' 12 | char [n][l+1]; | ^~~ a.cc:12:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:12:11: error: conflicting declaration 'auto n' 12 | char [n][l+1]; ...
s637479202
p04044
C++
#include<bits/stc++.h> using namespace std; int main() { int n,k; cin >> n >> k; string temp; vector<string>v; while(n--){ cin >> temp; v.push_back(temp); } sort(v.begin(),v.end()); for(auto X: v) cout << X; }
a.cc:1:9: fatal error: bits/stc++.h: No such file or directory 1 | #include<bits/stc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s605551427
p04044
C++
#include <iostream> #include <string> #include <algorithm> #include <string> 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++) { cout << S[i]; } ...
a.cc: In function 'int main()': a.cc:10:5: error: 'vector' was not declared in this scope 10 | vector<string> S(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> 4...
s592696373
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()); string T; for (int j = o; j < N; j++) { T += s[i]; } cout << T << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:16: error: 'o' was not declared in this scope 17 | for (int j = o; j < N; j++) { | ^ a.cc:18:12: error: 'i' was not declared in this scope 18 | T += s[i]; | ^
s599661910
p04044
C++
#include<bits/stdio.h> using namespace std; int main () { int n, l; cin >> n >> l; vector<string> v; for (int i = 0;i < n; i++) { string s; cin >> s; v.push_back(s); } sort(v.begin(), v.end()); string ans; for (int i = 0; i < n;i++) { ans = ans + v[i]; } cout << ans << "\n"; }
In file included from a.cc:1: /usr/include/x86_64-linux-gnu/bits/stdio.h:23:3: error: #error "Never include <bits/stdio.h> directly; use <stdio.h> instead." 23 | # error "Never include <bits/stdio.h> directly; use <stdio.h> instead." | ^~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not decl...
s878998285
p04044
C++
#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; }
a.cc: In function 'int main()': a.cc:10:30: error: expected ';' before 'for' 10 | sort(vec.begin(),vec.end()) | ^ | ; 11 | for (int i = 0;i < N;++i) | ~~~ a.cc:11:18: error: 'i' was not declared in this scop...
s048393392
p04044
C++
#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; }
a.cc: In function 'int main()': a.cc:10:30: error: expected ';' before 'for' 10 | sort(vec.begin(),vec.end()) | ^ | ; 11 | for (int i = 0; i < N; ++i) | ~~~ a.cc:11:19: error: 'i' was not declared in this sc...
s817496385
p04044
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int N, L; cin >> N >> L; int 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; }
a.cc: In function 'int main()': a.cc:14:22: error: 'n' was not declared in this scope 14 | for(int i = 0; i < n; i++){ | ^
s135427307
p04044
Java
#include<iostream> #include <algorithm> #include <string> #include<math.h> #include<stdio.h> #include<vector> #define rep(i,n)for(int i=0;i<n;i++) //printf("%.yf\n",x); xを小数点以下y桁で using namespace std; int main() { int a, b; cin >> a >> b; vector<string>data(a); rep(i, a) { cin >> data[i]; } ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include <algorithm> ^ Main.java:3: error: illegal character: '#' #include <string> ^ Main.java:4: error: illegal character: '#' #include<math.h> ^ Main.java:5: error: illegal character: '#' #include<stdio.h> ^ Ma...
s212803167
p04044
C++
#include<iostream> #include<string> #include<vector> using namespace std; int main() { // 整数の入力 uint64_t N, L; cin >> N >> L; vector<string> s; for (uint64_t i = 0; i < L; ++i) { cin >> s[i]; } sort(s.begin(), s.end()); for (uint64_t i = 0; i < L; ++i) { cout << s[i]; } cout << endl; retur...
a.cc: In function 'int main()': a.cc:8:3: error: 'uint64_t' was not declared in this scope 8 | uint64_t N, L; | ^~~~~~~~ a.cc:4:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 3 | #include<vector> +++ |+#include <cstdint> 4 | using na...
s620163812
p04044
C++
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <cmath> using namespace std; typedef long long unsigned int ll; int main() { int a,b,c,d,i,j,k; cin >> a; vector<string> s(a); for(i=0;i<a;i++){ cin >>s[i]; } sort(s.begin(),s.end()); for(auto it=s.begin()...
a.cc: In function 'int main()': a.cc:22:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >') 22 | cout << it ; | ~~~~ ^~ ~~ ...
s070963474
p04044
C++
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <cmath> using namespace std; typedef long long unsigned int ll; int main() { int a,b,c,d,i,j,k; cin >> a; vector<string> s(a); for(i=0;i<a;i++){ cin >>s[i]; } sort(s.begin(),s.end()); for(auto it=s.begin()...
a.cc: In function 'int main()': a.cc:22:18: error: no match for 'operator[]' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >') 22 | cout << s[it] ; | ...
s453912797
p04044
C++
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <cmath> using namespace std; typedef long long unsigned int ll; int main() { int a,b,c,d,i,j,k; cin >> a; vector<string> s(a); for(i=0;i<n;i++){ cin >>s[i]; } sort(s.begin(),s.end()); for(auto it=s.begin()...
a.cc: In function 'int main()': a.cc:16:13: error: 'n' was not declared in this scope 16 | for(i=0;i<n;i++){ | ^
s369092751
p04044
Java
#include<iostream> #include<cstdio> #include<cstring> #include <algorithm> using namespace std; int main() { string arr[102]; int n,m; while(scanf("%d%d",&n,&m) != EOF ) { for(int i = 0;i < n;i++) { cin>>arr[i]; } // for(int i = 0;i < n;i++) { // for(int j = ...
Main.java:1: error: illegal character: '#' #include<iostream> ^ Main.java:2: error: illegal character: '#' #include<cstdio> ^ Main.java:3: error: illegal character: '#' #include<cstring> ^ Main.java:4: error: illegal character: '#' #include <algorithm> ^ Main.java:13: error: not a statement cin>>arr[i]; ...
s705656601
p04044
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct { int num; const char *S[110]; } str; int compare_string(const void *a, const void *b) { /*struct str *A = (struct str *)a; struct str *B = (struct str *)b;*/ return strcmp(*(const str.S **)a, *(const str.S **)b); } /*int main() { stru...
main.c: In function 'compare_string': main.c:16:34: error: expected ')' before '.' token 16 | return strcmp(*(const str.S **)a, *(const str.S **)b); | ~ ^ | ) main.c:16:9: error: conversion to non-scalar type requested 16 | ...
s562643587
p04044
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct { int num; const char *S[110]; } str; int compare_string(const void *a, const void *b) { struct str *A = (struct str *)a; struct str *B = (struct str *)b; return strcmp(*(struct char S **)a, *(struct char S **)b); } /*int main() { stru...
main.c: In function 'compare_string': main.c:16:32: error: expected '{' before 'char' 16 | return strcmp(*(struct char S **)a, *(struct char S **)b); | ^~~~ main.c:16:32: error: two or more data types in declaration specifiers main.c:16:54: error: expected '{' before 'cha...
s300679797
p04044
C++
#pragma warning(disable: 4786) #include <iostream> #include <vector> 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++) cout << s[i]; cout << "" << endl; }
a.cc: In function 'int main()': a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s, s + N); | ^~~~ | short
s308108290
p04044
C++
#pragma warning(disable: 4786) #include <iostream> #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.at(i); sort(str.begin(), str.end() ); for (int i = 0; i < N; i++) cout << str.at(i); cout << "" << endl; }
a.cc: In function 'int main()': a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(str.begin(), str.end() ); | ^~~~ | short
s327046068
p04044
C++
#include <iostream> #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.at(i); sort(str.begin(), str.end()); for (int i = 0; i < N; i++) cout << str.at(i); cout << "" << endl; }
a.cc: In function 'int main()': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(str.begin(), str.end()); | ^~~~ | short
s866072716
p04044
C++
#include<iostream> #include<algorithm> #include<string> #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[i]; } sort(s.begin(),s.end()); for(int i=0;i<N;i++){ cout<<s[i]; } return 0; }
a.cc: In function 'int main()': a.cc:9:20: error: 'n' was not declared in this scope 9 | vector<string> s(n); | ^
s715597965
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N, L; cin >> N >> L; vector<string> ss(N); for (int i = 0; i < N ; i++) cin >> ss.at(i); sort(ss.begin(), ss.end()); for (int i = 0; i < N ; i++) cout << s.at(i); cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:40: error: 's' was not declared in this scope 12 | for (int i = 0; i < N ; i++) cout << s.at(i); | ^
s721392907
p04044
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <stack> #include <queue> using namespace std; int main() { int n, l; cin >> n >> l; string ans; vector<string> a(n);a for(int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()...
a.cc: In function 'int main()': a.cc:15:24: error: expected ';' before 'for' 15 | vector<string> a(n);a | ^ | ; 16 | for(int i = 0; i < n; i++) { | ~~~ a.cc:16:18: error: 'i' was not declared in this scope 16 | for(int i...
s884342378
p04044
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <stack> #include <queue> using namespace std; int main() { int n, l; cin >> n >> l; string ans; vector<string> a(n);a for(int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()...
a.cc: In function 'int main()': a.cc:15:24: error: expected ';' before 'for' 15 | vector<string> a(n);a | ^ | ; 16 | for(int i = 0; i < n; i++) { | ~~~ a.cc:16:18: error: 'i' was not declared in this scope 16 | for(int i...
s559009154
p04044
C++
#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)(x).size()) #define F first #...
a.cc: In function 'int main()': a.cc:66:11: error: no match for 'operator+' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'int') 66 | sort(s,s+n); | ~^~ | | | | | int | std::vector<std::__cxx11::basic_string<char> > In file inclu...
s008178353
p04044
C++
#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)(x).size()) #define F first #...
a.cc: In function 'int main()': a.cc:68:9: error: 'k' was not declared in this scope 68 | REP(i,k) | ^ a.cc:5:39: note: in definition of macro 'REP' 5 | #define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i) | ^
s270685967
p04044
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); int length = scanner.nextInt(); List<String> strings = new ArrayList<>(); for (int ix = 0; ix < count; ix++) { strings.add(scanner.n...
Main.java:14: error: method sort in interface List<E> cannot be applied to given types; strings.sort(); ^ required: Comparator<? super String> found: no arguments reason: actual and formal argument lists differ in length where E is a type-variable: E extends Object declared in interface Li...
s681234454
p04044
Java
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class B { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int L = sc.nextInt(); List<String> inputs = new ArrayList<String>(); for(int ...
Main.java:7: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s578525020
p04044
C++
#include <bits/stdc++.h> #include <math.h> using namespace std; #define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i]; int main(){ int N,L ; cin >> N >> L ; vector<string> S(n) ; cinf(N,S) ; sort(S.begin() , S.end()) ; for(int i=0;i<N;i++) cout << S[i] ; cout << endl; }
a.cc: In function 'int main()': a.cc:9:20: error: 'n' was not declared in this scope 9 | vector<string> S(n) ; | ^
s585900762
p04044
C++
#include <iostream> #include <cstring> using namespace std; int main() { int StringNum, StringLength, i, j, cmp; char s[100][100]; cin >> StringNum >> StringLength; for(i=0; i < StringNum; i++) { cin >> s[i]; } for(i=0; i < StringNum-1; i++) { fo...
a.cc:32:2: error: expected class-name at end of input 32 | ~ | ^
s803996801
p04044
C++
include <iostream> #include <cstring> using namespace std; int main() { int StringNum, StringLength, i, j, cmp; char s[100][100]; cin >> StringNum >> StringLength; for(i=0; i < StringNum; i++) { cin >> s[i]; } for(i=0; i < StringNum-1; i++) { for...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: 'cin' was not declared in this scope 11 | cin >> StringNum >> StringLength; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is pr...
s913787685
p04044
C++
include <iostream> #include <cstring> using namespace std; int main() { int StringNum, StringLength, i, j, cmp; char s[100][100]; cin >> StringNum >> StringLength; for(i=0; i < StringNum; i++) { cin >> s[i]; } for(i=0; i < StringNum-1; i++) { for...
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:11:9: error: 'cin' was not declared in this scope 11 | cin >> StringNum >> StringLength; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is pr...
s624170035
p04044
C++
#include <iostream> using namespace std; int main(){ string s[100]; 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:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(s, s+n); | ^~~~ | short
s171785390
p04044
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,N) for(int i=0;i<int(N);++i) #define rep1(i,N) for(int i=1;i<int(N);++i) int main() { int N,L; cin>>N>>L; vector<string> S(N); rep(i,N)cin>>S[i]; sort(all(S)); rep(i,N)cout<<S[i]; cout<<endl; }
a.cc: In function 'int main()': a.cc:11:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'? 11 | sort(all(S)); | ^~~ | std::filesystem::perms::all In file included from /usr/include/c++/14/filesystem:51, from /usr...
s720632520
p04044
C++
#include<iostream> 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) { cout << s[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(s, s + n); | ^~~~ | short
s966966663
p04044
C
#include <iostream> using namespace std; int main(){ int n, l; cin >> n; cin >> l; string str[n]; string temp; for(int i = 0; i < n; i++) cin >> str[i]; for(int i = 0; i < n; i++){ for(int j = i + 1; j < n; j++){ if(str[i].compare(str[j]) > 0){ temp = str[i]; str[i] = str[j]; str[j] = temp; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s421623902
p04044
C++
#include <iostream> 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){ cout<<s[i]<<endl; } }
a.cc: In function 'int main()': a.cc:9:6: error: 'vector' was not declared in this scope 9 | vector<string>s(n); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include <iostream> +++ |+#include <vector> 2 ...
s804908572
p04044
C
#include <string> #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { vector<string> str; int N, L; cin >> N >> L; for (int i = 0; i < N; i++){ string str1; cin >> str1; str.push_back(str1); } sort(str.begin(), str.end()); for (int i = 0; i < N; i++) cout <<...
main.c:1:10: fatal error: string: No such file or directory 1 | #include <string> | ^~~~~~~~ compilation terminated.
s421558206
p04044
C
#include "pch.h" #include <string> #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { vector<string> str; int N, L; cin >> N >> L; for (int i = 0; i < N; i++){ string str1; cin >> str1; str.push_back(str1); } sort(str.begin(), str.end()); for (int i = 0; i < ...
main.c:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s146469505
p04044
C++
// // ABC042B.cpp // programing // // Created by 毛利源 on 2019/01/29. // #include<iostream> using namespace std; int main(){ int N,L; std::cin >> N>>L; string S[N]; for (int i = 0; i < N; i++) { std::cin >> S[i]; } sort(S,S+N); for(int i=0;i<N;i++){ std::cout << S[i]; } ...
a.cc: In function 'int main()': a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'? 19 | sort(S,S+N); | ^~~~ | short
s503338979
p04044
C++
#include <iostream> #include <string> #include <algorithm> 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, shoter<int>()); for (int i = 0; i < N; ++i) cout << S[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:12:20: error: 'shoter' was not declared in this scope 12 | sort(S, S + N, shoter<int>()); | ^~~~~~ a.cc:12:27: error: expected primary-expression before 'int' 12 | sort(S, S + N, shoter<int>()); | ^~~
s747021982
p04044
C++
#include <iostream> #include <vector> #include <cstdlib> #include <cmath> using namespace std; int main (int argc, char const *argv[]) { int N,L; cin>>N>>L; //vector<型の種類> 名前(個数) vector<string> S(N); for(int i = 0; i < N; i++) { cin>>S[i]; } //並び変え sort(S.begin(), S.en...
a.cc: In function 'int main(int, const char**)': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 20 | sort(S.begin(), S.end()); | ^~~~ | sqrt