submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s977364478
p04044
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) int main(){ int l,n; cin>>l>>n; vector<string>s(n); rep(i,n)cin>>s[i]; sort(s.begin(),s.end()); string min; rep(i,n) min+=s[i] cout<<min<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:14: error: expected ';' before 'cout' 13 | min+=s[i] | ^ | ; 14 | cout<<min<<endl; | ~~~~
s868471512
p04044
C++
#include<iostream> #include<string> using namespace std; int main() { int a,b,i; cin>>a>>b; string s[n]; for(i=0;i<n;i++) { cin>>s[i]; } sort(s,s+n); for(i=0;i<n;i++) { cout<<s[i]; } }
a.cc: In function 'int main()': a.cc:8:12: error: 'n' was not declared in this scope 8 | string s[n]; | ^ a.cc:11:12: error: 's' was not declared in this scope 11 | cin>>s[i]; | ^ a.cc:13:8: error: 's' was not declared in this scope 13 | sort(s,s+n); | ...
s279685017
p04044
C++
#include<iostream> #include<string> using namespace std; int main() { int a,b,i; cin>>n>>l; string s[n]; for(i=0;i<n;i++) { cin>>s[i]; } sort(s,s+n); for(i=0;i<n;i++) { cout<<s[i]; } }
a.cc: In function 'int main()': a.cc:8:8: error: 'n' was not declared in this scope 8 | cin>>n>>l; | ^ a.cc:8:11: error: 'l' was not declared in this scope 8 | cin>>n>>l; | ^ a.cc:12:12: error: 's' was not declared in this scope 12 | cin>>s[i]; | ^ a.cc...
s175543059
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]; List<String> list = new ArrayList<>(); for(int i = 0; i < n; i++){ ...
Main.java:17: error: incompatible types: String cannot be converted to StringBuilder sb = s[0]; ^ 1 error
s269723208
p04044
C++
#include<iostream> #include<string.h> #include<algorithm> using namespace std; int main() { int N,L,i,; cin>>N>>L; string S[N]; for(i=0;i<N;i++) { cin>>S[i]; } sort(S,S+N); for(i=0;i<N;i++) { cout<<S[i]; } cout<<endl; }
a.cc: In function 'int main()': a.cc:7:15: error: expected unqualified-id before ';' token 7 | int N,L,i,; | ^
s112651061
p04044
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class IrohaLovesStrings { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] s = br.readLine().split("\\s+"); int n = Int...
Main.java:5: error: class IrohaLovesStrings is public, should be declared in a file named IrohaLovesStrings.java public class IrohaLovesStrings { ^ 1 error
s855670555
p04044
C
#include<bits/stdc++.h> using namespace std; int main() { long long int n,l,i; cin>>n>>l; vector<string>str(n); for(i=0;i<n;i++) { cin>>str[i]; } sort(str.begin(),str.end()); for(i=0;i<n;i++) { cout<<str[i]; } cout<<endl; return 0; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s619397013
p04044
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; int main() { int N, L; cin >> N >> L; vector<int> s(N); rep (i,N) { cin >> s.at(i); } sort(l.begin(), l.end()); for (int i = 0; i < N; ++i) ...
a.cc: In function 'int main()': a.cc:16:10: error: 'l' was not declared in this scope 16 | sort(l.begin(), l.end()); | ^
s615585273
p04044
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(void){ int l,n; scanf("%d %d",&l,&n); char s[100][101]; char tmp[101]; //**s=malloc(n*sizeof(char*)); /*for(int i=0;i<n;i++){ s[i]=malloc((l+1)*sizeof(char)); } char *tmp; tmp=malloc((l+1)*sizeof(char));*/ for(int i=0;i<n;i++){ scanf("%s...
main.c: In function 'main': main.c:19:31: error: expected expression before '<' token 19 | for(int i=0;i=<n-j-1;i++){ | ^
s155114071
p04044
C++
#include<bits/stdc++.h> using namespace std; int main() { long long n,l; cin>>n>>l; stirng s,s1; for(long long i=0;i<n;i++) { cin>>s; s1+=s; } cout<<s1<<endl; }
a.cc: In function 'int main()': a.cc:7:3: error: 'stirng' was not declared in this scope 7 | stirng s,s1; | ^~~~~~ a.cc:10:10: error: 's' was not declared in this scope 10 | cin>>s; | ^ a.cc:11:5: error: 's1' was not declared in this scope; did you mean 'y1'? 11 | s1+=s; ...
s913541747
p04044
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string a; int h, j; cin >> h >> j; vector<string> v; for (int i = 0; i < h; i++) { string b; cin >> b; v.push_back(b); } sort(v.begin(), v.end()); for (int i = 0; i < v.size(); i++)...
a.cc: In function 'int main()': a.cc:19:14: error: 'b' was not declared in this scope 19 | a += b; | ^
s454283115
p04044
C++
#include<bits/stc++.h> using namespace std; int main() { int t,l; cin>>t>>l; vector<string> v; for(int i=0;i<n;i++) { string s; cin>>s; v.push_back(s); } 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.
s832078453
p04044
C
#include<stdio.h> #include<string.h> int main(){ int N,L; scanf("%d %d",&N,&L); char temp[L+1]; char str[N][L+1]={"dxx","axx","cxx"}; int i,j; for(i=0;i<2;i++){ for(j=2;j>i;j--){ if(strcmp(str[j-1],str[j])>0){ strcpy(temp,str[j-1]); strcpy(str[j-1],str[j]); strcpy(str[j...
main.c: In function 'main': main.c:9:20: error: variable-sized object may not be initialized except with an empty initializer 9 | char str[N][L+1]={"dxx","axx","cxx"}; | ^
s117179127
p04044
C
#include<stdio.h> #iclude<string.h> int main(){ int N,L; scanf("%d %d",&N,&L); char temp[N]; char str[N]; int i,j; for(i=0;i<N;i++){ scanf("%s",&str[i]); } for(i=0;i<N-1;i++){ for(j=N-1;j>i;j--){ if(strcmp(str[j-1],str[j])>0){ strcpy(temp,str[j-1]); strcpy(str[j-1],s...
main.c:2:2: error: invalid preprocessing directive #iclude; did you mean #include? 2 | #iclude<string.h> | ^~~~~~ | include main.c: In function 'main': main.c:17:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] 17 | if(strcmp(str[j-1],str[j])>0){ | ...
s926034348
p04044
C++
#include<iostream> #include<vector> #include<string> #include<math.h> #include<stdio.h> #include<queue> using namespace std; int main() { int a, b; cin >> a >> b; vector<string>name(a); for (int i = 0; i < a; i++) { cin >> name[i]; } sort(name.begin(), name.end()); string x = ""; for (int i = 0; i < a; ...
a.cc: In function 'int main()': a.cc:20:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 20 | sort(name.begin(), name.end()); | ^~~~ | sqrt
s617390266
p04044
C
#include<stdio.h> #include<string.h> int n,l; void swap(char (*str1)[l],char (*str2)[l]){ char temp[l]; strcpy(temp,*str1); strcpy(*str1,*str2); strcpy(*str2,*str1); return ; } int main(){ scanf("%d %d\n",&n,&l); char array[n][l+1]; int i,j; for(i=0;i<n;i++){ scanf("%s\n",*(array+i)); } for(i=...
main.c: In function 'main': main.c:30:25: error: variable-sized object may not be initialized except with an empty initializer 30 | char final_string[g]= ""; | ^~ main.c:32:32: error: invalid operands to binary + (have 'char *' and 'char *') 32 | final_string = final_string+*(a...
s565221457
p04044
C
#include<stdio.h> #include<string.h> void swap(char *string1,char *string2, int (l+1)){ char temp[l+1]; strcpy(temp,*string1); strcpy(*string1,*string2); strcpy(*string2,temp); } int main(){ int n,l; scanf("%d %d\n",&n,&l); int char string[n][l+1]; int i; for(i=0;i<n;i++){ scanf("%s\n",(string+i))...
main.c:3:46: error: expected ')' before '+' token 3 | void swap(char *string1,char *string2, int (l+1)){ | ^ | ) main.c: In function 'main': main.c:12:7: error: two or more data types in declaration specifiers 1...
s416595724
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.at(i); vec.sort(vec.begin(), vec.end()); string ans; for (string x : vec) ans += x; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:11:7: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'sort' 11 | vec.sort(vec.begin(), vec.end()); | ^~~~
s552299106
p04044
C++
/* author : nishi5451 created: 12.08.2020 15:43:34 */ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) typedef long long ll; int main(){ int n,l; cin >> n >> l; vector<string> s(n); rep(i,n) cin >> s[i]; sort(s.begin(),s.end(),greater<int>() ); ...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:6: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s491557273
p04044
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { int N, L; cin >> N >> L; string C; vector<string> vec; rep(i, N) { cin >> C; vec.at(i) = C; } sort(vec.b...
a.cc: In function 'int main()': a.cc:19:7: error: statement cannot resolve address of overloaded function 19 | endl; | ^
s205875105
p04044
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { int N, L; cin >> N >> L; string C vector<string> vec; rep(i, N) { cin >> C; vec.at(i) = C; } sort(vec.be...
a.cc: In function 'int main()': a.cc:10:3: error: expected initializer before 'vector' 10 | vector<string> vec; | ^~~~~~ a.cc:12:12: error: 'C' was not declared in this scope 12 | cin >> C; | ^ a.cc:13:5: error: 'vec' was not declared in this scope 13 | vec.at(i) = C; |...
s064849457
p04044
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { int N, L; string C vector<string> vec; rep(i, N) { cin >> C; vec.at(i) = C; } sort(vec.begin(), vec.end())...
a.cc: In function 'int main()': a.cc:9:3: error: expected initializer before 'vector' 9 | vector<string> vec; | ^~~~~~ a.cc:11:12: error: 'C' was not declared in this scope 11 | cin >> C; | ^ a.cc:12:5: error: 'vec' was not declared in this scope 12 | vec.at(i) = C; | ...
s627039074
p04044
C++
#include<bits/stdc++.h> using namespace std; #define debug(n) cerr << #n << ':' << n << endl; #define dline cerr << __LINE__ << endl; using ll = long long; using ull = unsigned long long; template<class T, class U> using P = pair<T,U>; template<class T> using Heap = priority_queue<T>; template<class T> using heaP...
a.cc: In function 'int main()': a.cc:47:20: error: no match for 'operator<' (operand types are 'int' and 'std::vector<std::__cxx11::basic_string<char> >') 47 | for(int i = 0; i < v; ++i)cout << v[i]; | ~ ^ ~ | | | | int std::vector<std::__cxx11...
s318858481
p04044
C
#include<iostream> #include<string> #include<list> using namespace std; int main(){ int N, L; string input; list<string> ls; list<string>::iterator itr; cin >> N >> L; for (int i=0; i<N; i++){ cin >> input; ls.push_back(input); } ls.sort(); for (itr=ls.begin(); ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s218469635
p04044
C
#include<iostream> #include<string> #include<list> using namespace std; int main(){ int N, L; string input; list<string> L; list<string>::iterator itr; cin >> N >> L; for (int i=0; i<N; i++){ cin >> input; L.push_back(input); } L.sort(); for (itr=L.begin(); itr!...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s113959280
p04044
C
#include<iostream> #include<string> #include<list> using namespace std; int main(){ int N, L; string input; list<string> L; list<string>::iterator itr; cin >> N >> L; for (int i=0; i<N; i++){ cin >> input; L.push_back(input); } L.sort(); for (itr=s.begin(); itr!...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s044012075
p04044
Java
import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class test1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); ArrayList<String> list = new ArrayList<String>(); int l = sc.nextInt(); int n = sc.nextInt(); String[] B = new String[n]; S...
Main.java:5: error: class test1 is public, should be declared in a file named test1.java public class test1 { ^ 1 error
s842525885
p04044
C
#include <stdio.h> #include <string.h> int main(void) { int n,l,i,j; char s[100][200],tmp[200]; scanf("%d %d",&n,&l); for(i=0;i<n;i++){ scanf("%s",s[i]); for(i=1;i<n;i++){ for(j=1;j<n;j++){ if(strcmp(s[j-1],s[j])>0){ strcpy(tmp,s[j-1]); strcpy(s[j-1],s[j]); strcpy(s[j],tmp); } } } for(i=...
main.c: In function 'main': main.c:22:1: error: expected declaration or statement at end of input 22 | } | ^
s247658254
p04044
C
#include <stdio.h> #include <string.h> int main(void) { int n,l,i,j; char s[100][200],tmp[200]; scanf("%d %d",&n,&l); for(i=0;i<n;i++){ scanf("%s",s[i]); for(i=1;i<n;i++){ for(j=1;j<n;j++){ if(strcmp(s[j-1],s[j])>0){ strcpy(tmp,s[j-1]); strcpy(s[j-1],s[j]); strcpy(s[j],tmp); } } } for(i=...
main.c: In function 'main': main.c:20:15: error: 'moji' undeclared (first use in this function) 20 | printf("%s",moji[i]); | ^~~~ main.c:20:15: note: each undeclared identifier is reported only once for each function it appears in main.c:22:1: error: expected declaration or statement at end of ...
s529407942
p04044
C
#include <stdio.h> #include <string.h> int main(void) { int n,l,i,j; char s[100][200],tmp[200]; scanf("%d %d",&n,&l); for(i=0;i<n;i++){ scanf("%s",s[i]); for(i=1;i<n;i++){ for(j=1;j<n;j++){ if(strcmp(moji[j-1],moji[j])>0){ strcpy(tmp,moji[j-1]); strcpy(moji[j-1],moji[j]); strcpy(moji[j],tmp); ...
main.c: In function 'main': main.c:12:15: error: 'moji' undeclared (first use in this function) 12 | if(strcmp(moji[j-1],moji[j])>0){ | ^~~~ main.c:12:15: note: each undeclared identifier is reported only once for each function it appears in main.c:19:11: error: 'num' undeclared (first use in...
s311282018
p04044
C
#include <stdio.h> #include <string.h> int main(void) { int n,l,i,j; char s[100][200],tmp[200]; scanf("%d %d",&n,&l); for(i=0;i<n;i++){ scanf("%s",&s[i]); for(i=1;i<n;i++){ for(j=1;j<n;j++){ if(strcmp(moji[j-1],moji[j])>0){ strcpy(tmp,moji[j-1]); strcpy(moji[j-1],moji[j]); strcpy(moji[j],tmp);...
main.c: In function 'main': main.c:12:15: error: 'moji' undeclared (first use in this function) 12 | if(strcmp(moji[j-1],moji[j])>0){ | ^~~~ main.c:12:15: note: each undeclared identifier is reported only once for each function it appears in main.c:19:11: error: 'num' undeclared (first use in...
s738369049
p04044
C++
#include <iostream> #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()); string ans; for(int i=0;i<N;i++) ans+=s[i]; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(s.begin(), s.end()); | ^~~~ | short
s712722604
p04044
C
#include <stdio.h> #include <stdlib.h> void swap(char *data1, char *data2, char *temp) { strcpy(temp, data1); strcpy(data1, data2); strcpy(data2, temp); } int main(void) { int i, j; int size, length; char *temp; char **data; scanf("%d %d", &size, &length); temp = malloc(sizeof(char) * length); ...
main.c: In function 'swap': main.c:5:3: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] 5 | strcpy(temp, data1); | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcpy' 2 | #include <stdlib.h> +++ |+#include <string.h> 3 | main.c:5...
s276524836
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() {
a.cc: In function 'int main()': a.cc:3:13: error: expected '}' at end of input 3 | int main() { | ~^
s940847891
p04044
Java
public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int l = in.nextInt(); List<String> strings = new ArrayList<>(); for (int i = 0; i < n; i++) { strings.add(in.next()); } Collecti...
Main.java:3: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:6: erro...
s188614615
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(); int[] S = new int[N]; for(int i = 0; i < N; i ++){ S[i] = sc.nextLine(); } Arrays.sort(S); for(int i = 0; i < N; i ++){ System.out.p...
Main.java:10: error: incompatible types: String cannot be converted to int S[i] = sc.nextLine(); ^ 1 error
s963277358
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(); int[] S = new int[N]; for(int i = 0; i < N; i ++){ S[i] = sc.next(); } Arrays.sort(S); for(int i = 0; i < N; i ++){ System.out.print...
Main.java:10: error: incompatible types: String cannot be converted to int S[i] = sc.next(); ^ 1 error
s733802215
p04044
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int n,l; scanf("%d%d",&n,&l); char string[n+1][l+1]; for(int i=0; i<n; i++){ scanf("%s",string[i]); } for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j++){ if(strcmp(string[j],string[j+1]) > 0){ char temp[l+1] =...
main.c: In function 'main': main.c:14:26: error: variable-sized object may not be initialized except with an empty initializer 14 | char temp[l+1] = { "" }; | ^
s733780540
p04044
C
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int n,l; scanf("%d%d",&n,&l); char string[n+1][l+1]; for(int i=0; i<n; i++){ scanf("%s",string[i]); } for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j++){ if(strcmp(string[j],string[j+1]) > 0){ char temp[l+1] =...
main.c: In function 'main': main.c:14:26: error: variable-sized object may not be initialized except with an empty initializer 14 | char temp[l+1] = { "" }; | ^ main.c:22:25: error: expected expression before '[' token 22 | printf("%s",string[[i]); | ...
s640621106
p04044
C
#icnlude<stdio.h> #include<string.h> #include<stdlib.h> int main(){ int n,l; scanf("%d%d",&n,&l); char string[n+1][l+1]; for(int i=0; i<n; i++){ scanf("%s",string[i]); } for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j++){ if(strcmp(string[j],string[j+1]) > 0){ char temp[l+1] =...
main.c:1:2: error: invalid preprocessing directive #icnlude; did you mean #include? 1 | #icnlude<stdio.h> | ^~~~~~~ | include main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d%d",&n,&l); | ^...
s544656109
p04044
C
#icnlude<stdio.h> #include<string.h> #icnlude<stdlib.h> int main(){ int n,l; scanf("%d%d",&n,&l); char string[n+1][l+1]; for(int i=0; i<n; i++){ scanf("%s",string[i]); } for(int i=0; i<n; i++){ for(int j=0; j<n-1-i; j+){ if(strcmp(string[i],string[i+1]) > 0){ char temp[l+1] = ...
main.c:1:2: error: invalid preprocessing directive #icnlude; did you mean #include? 1 | #icnlude<stdio.h> | ^~~~~~~ | include main.c:3:2: error: invalid preprocessing directive #icnlude; did you mean #include? 3 | #icnlude<stdlib.h> | ^~~~~~~ | include main.c: In function 'main': mai...
s647448624
p04044
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ int n,l; cin>>n>>l; string s; vector<string> vec; for(int i=0;i<n;i++){ cin>>s; vec.push_back(s); } sort(vec.begin(),vec.end()); cout<<vec; return 0; }
a.cc: In function 'int main()': a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(vec.begin(),vec.end()); | ^~~~ | short a.cc:17:7: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::vector<std::__cxx1...
s014241619
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++) { string s; cin >> s; S.push_back(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:13:19: error: expected ';' before '}' token 13 | S.push_back(s) | ^ | ; 14 | } | ~
s374672516
p04044
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int l = scanner.nextInt(); ArrayList<String> word = new ArrayList<>(); // n回データを取得し格納する for(in...
Main.java:19: error: cannot find symbol word.sort(Comparator.naturalOrder()); ^ symbol: variable Comparator location: class Main 1 error
s785705307
p04044
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int l = scanner.nextInt(); ArrayList<String> word = new ArrayList<>(); // n回データを取得し格納する for(in...
Main.java:18: error: method sort in class ArrayList<E> cannot be applied to given types; word.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 class ArrayList 1...
s736976911
p04044
Java
import java.util.Scanner; import java.util.ArrayList; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int l = scanner.nextInt(); ArrayList<String> word = new ArrayList<>(); // n回データを取得し格納する for(in...
Main.java:18: error: method sort in class ArrayList<E> cannot be applied to given types; ArrayList<String> sortedWord = word.sort(); ^ required: Comparator<? super String> found: no arguments reason: actual and formal argument lists differ in length where E is a typ...
s598925407
p04044
Java
N, L = list(map(int, input().split())) arr_input=[] for i in range(N): input_ = input() if(len(input_)!=L): print("Input length is wrong") exit() arr_input.append(input_) arr_input.sort() print("".join(arr_input))
Main.java:1: error: class, interface, enum, or record expected N, L = list(map(int, input().split())) ^ 1 error
s041739292
p04044
Java
import java.util.*; import java.io.*; public class KindergartenCountingGame { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(),m = in.nextInt();; ArrayList<String> a = new ArrayList<>(n); for (int i = 0; i < n; i++) { String y = in.next(); a.add(y); } Coll...
Main.java:4: error: class KindergartenCountingGame is public, should be declared in a file named KindergartenCountingGame.java public class KindergartenCountingGame { ^ 1 error
s895717533
p04044
Java
import java.util.*; public class Main_IrohaLovesStrings { public static void main (String[]args){ Scanner input = new Scanner (System.in); int n = input.nextInt(); int l = input.nextInt(); String [] arr = new String [n]; for (int i = 0; i < arr.length; i++) { arr[i]=input.next(); } Arra...
Main.java:2: error: class Main_IrohaLovesStrings is public, should be declared in a file named Main_IrohaLovesStrings.java public class Main_IrohaLovesStrings { ^ 1 error
s560982371
p04044
C++
#include<bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using p = pair<int, int>; typedef vector<int> vi; int main() { int l, n; cin >> l >> n; vector<string> s; rep(i, n) rep(j, l) { cin >> s.at(i).at(j); } sort(s.begin(), s.end(), grea...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_...
s337334067
p04044
C++
#include<iostream> #include<cstdio> #include<cstring> using namespace std; int N, L; string str[N]; int main(){ scanf("%d %d", &N, &L); for(int i = 1; i < N; i++){ cin >> str[i]; } for(int i = 0; i < N; i++){ string tmp = str[i]; int j = i - 1; while(j >= 0 && str[j] > tmp){ str[j + 1] =...
a.cc:6:12: error: size of array 'str' is not an integral constant-expression 6 | string str[N]; | ^
s375582264
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin >> n >> m; vector<string> a(n); for ( int i=0; i<n; i++ ) cin >> a[i]; sort(a.begin(),a.end()); string ans=""; for ( int i=0; i<N; i++ ) ans+=a[i]; cout << ans; return 0; }
a.cc: In function 'int main()': a.cc:11:20: error: 'N' was not declared in this scope 11 | for ( int i=0; i<N; i++ ) ans+=a[i]; | ^
s651869859
p04044
C++
#include <bits/stdc++.h> #include <math.h> #define _GLIBCXX_DEBUG 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:8:12: error: expected ';' before 'vector' 8 | cin>>N>>L | ^ | ; 9 | 10 | vector<string> S(N); | ~~~~~~ a.cc:12:10: error: 'S' was not declared in this scope 12 | cin>>S[i]; | ^ a.cc:16:8: error: 'S' ...
s360197086
p04044
C++
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 ans; for(int i = 0; i < N; i++) { ans += S[i]; }
a.cc:2:5: error: 'cin' does not name a type 2 | cin >> N >> L; | ^~~ a.cc:3:5: error: 'vector' does not name a type 3 | vector<string>S(N); | ^~~~~~ a.cc:4:5: error: expected unqualified-id before 'for' 4 | for(int i = 0; i < N; i++) { | ^~~ a.cc:4:20: error: 'i' do...
s343732753
p04044
C++
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 ans; for(int i = 0; i < N; i++) { ans += S[i]; }
a.cc:2:5: error: 'cin' does not name a type 2 | cin >> N >> L; | ^~~ a.cc:3:5: error: 'vector' does not name a type 3 | vector<string>S(N); | ^~~~~~ a.cc:4:5: error: expected unqualified-id before 'for' 4 | for(int i = 0; i < N; i++) { | ^~~ a.cc:4:20: error: 'i' do...
s500993699
p04044
C++
#define tst(a, b) for (int i = 1; i <= (b); i++) {cout << (a)[i] << " ";} cout << endl; #define ll long long #define lf long double #define ch char #define F(a) for (int i = 1; i <= (a); i++) #define For(a, b) for (int (a) = 1; (a) <= (b); (a)++) #define Rep(a, b, c) for (int (a) = (b); (a) <= (c); (a)++) #define FD(a)...
In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:24: /usr/include/c++/14/complex:2631:11: error: unexpected keyword; remove space between quotes and suffix identifier 2631 | operator""il(long double __num) ...
s503454002
p04044
C++
#define tst(a, b) for (int i = 1; i <= (b); i++) {cout << (a)[i] << " ";} cout << endl; #define ll long long #define lf long double #define ch char #define F(a) for (int i = 1; i <= (a); i++) #define For(a, b) for (int (a) = 1; (a) <= (b); (a)++) #define Rep(a, b, c) for (int (a) = (b); (a) <= (c); (a)++) #define FD(a)...
In file included from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:24: /usr/include/c++/14/complex:2631:11: error: unexpected keyword; remove space between quotes and suffix identifier 2631 | operator""il(long double __num) ...
s659107963
p04044
C++
#include<bits/stdc++.h> using namespace std; int main() { int n,l,i; String s[1000]; i=0; cin>> n >> l; for(i=0;i<n;i++) { cin>>s[i]; } sort(s+0,s+l); for(i=0;i<n;i++) { cout<<s[i]; } return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'String' was not declared in this scope 6 | String s[1000]; | ^~~~~~ a.cc:11:10: error: 's' was not declared in this scope 11 | cin>>s[i]; | ^ a.cc:14:8: error: 's' was not declared in this scope 14 | sort(s+0,s+l); | ...
s739310595
p04044
C++
#include<bits/stdc++.h> using namespace std; int main() { int n,l,i,s[100]; i=0; cin>> n >> l; for(i=0;i<n;i++) { cin>>s[i]; } sort(a,a+l); for(i=0;i<n;i++) { cout<<s[i]; } return 0; }
a.cc: In function 'int main()': a.cc:13:8: error: 'a' was not declared in this scope 13 | sort(a,a+l); | ^
s203421109
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<L;i++){ cin >> s[i]; } sort(s.begin(),s.end()); for(int i=0;i<L;i++) {cout<<s[i];} return 0;
a.cc: In function 'int main()': a.cc:18:10: error: expected '}' at end of input 18 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s191845395
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[i].begin(), S[i].end()); } sort(S.begin(), S.end()); for (int i = 0; i < N; i++) { cout << S[i] << flush; } cout << endl; return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s545940915
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s468258014
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> data(n) for(int i=0;i<n;i++){ cin >> data.at(i); } sort(data.begin(),data.end()); string sum; for(int i=0;i<n;i++){ sum += data(i); } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected ',' or ';' before 'for' 8 | for(int i=0;i<n;i++){ | ^~~ a.cc:8:21: error: 'i' was not declared in this scope 8 | for(int i=0;i<n;i++){ | ^ a.cc:14:20: error: no match for call to '(std::vector<std::...
s489364500
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> data(n,'') for(int i=0;i<n;i++){ cin >> data.at(i); } sort(data.begin(),data.end()); string sum; for(int i=0;i<n;i++){ sum += data(i); } cout << sum << endl; return 0; }
a.cc:7:31: error: empty character constant 7 | vector<string> data(n,'') | ^~ a.cc: In function 'int main()': a.cc:7:33: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::vector(int&, char)' 7 | vector<string> data(n,'') ...
s933856039
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){ cin >> S[i]; } sort(S.begin(),S.end()); cout << S[0]+S[1]+S[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: expected ';' before ')' token 8 | for(int i=0;i<n){ | ^ | ; a.cc:11:16: error: request for member 'begin' in 'S', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n...
s950070196
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ string S[100]={}; int n,l; cin >> n >> l; for(int i=0;i<n){ cin >> S[i]; } sort(S.begin(),S.end()); cout << S[0]+S[1]+S[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: expected ';' before ')' token 8 | for(int i=0;i<n){ | ^ | ; a.cc:11:16: error: request for member 'begin' in 'S', which is of non-class type 'std::string [100]' {aka 'std::__cxx11::basic_string<char> ...
s165134865
p04044
C++
#include <iostream> using namespace std; int main() { ll N, L; cin >> N >> L; map<string, int> mp; for (int i = 0; i < L; i++) { string s; cin >> s; mp[s] += 1; } string ans = ""; for (auto &e : mp) { for (int i = 0; i < e.second; i++) { ans += e.fir...
a.cc: In function 'int main()': a.cc:6:5: error: 'll' was not declared in this scope 6 | ll N, L; | ^~ a.cc:7:12: error: 'N' was not declared in this scope 7 | cin >> N >> L; | ^ a.cc:7:17: error: 'L' was not declared in this scope 7 | cin >> N >> L; | ...
s267977876
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,l,i; cin >> n >> l; vector<string> s(n); for(i=0;i<n;i++) cin >> s.st(i); sort(s.begin(),s.end()); for(i=0;i<n;i++) cout << s.at(i) << endl; }
a.cc: In function 'int main()': a.cc:9:29: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'st'; did you mean 'at'? 9 | for(i=0;i<n;i++) cin >> s.st(i); | ^~ | at
s181544827
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,l,i; vector<string> s(n); cin >> n >> l; for(i=0;i<n;i++) cin >> s.st(i); sort(s.begin(),s.end()); for(i=0;i<n;i++) cout << s.at(i) << endl; }
a.cc: In function 'int main()': a.cc:9:29: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'st'; did you mean 'at'? 9 | for(i=0;i<n;i++) cin >> s.st(i); | ^~ | at
s284955271
p04044
C++
#include <bits/stdc++.h> int main(){ int n,l,i; vector<string> s(n); cin >> n >> l; for(i=0;i<n;i++) cin >> s.st(i); sort(s.begin(),s.end()); for(i=0;i<n;i++) cout << s.at(i) << endl; }
a.cc: In function 'int main()': a.cc:6:7: error: 'vector' was not declared in this scope 6 | vector<string> s(n); | ^~~~~~ a.cc:6:7: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /us...
s853248970
p04044
C++
#include <bits/stdc++.h> int main(){ int n,l,i; vector<string> s(); cin >> n >> l; for(i=0;i<n;i++) cin >> s.st(i); sort(s.begin(),s.end()); for(i=0;i<n;i++) cout << s.at(i) << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: 'vector' was not declared in this scope 6 | vector<string> s(); | ^~~~~~ a.cc:6:3: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include...
s466849642
p04044
C++
#include <iostream> #include <string> #include <vector> #include <algorythm> using namespace std; 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++) cout << S[i]; cout << "\n"; }
a.cc:4:10: fatal error: algorythm: No such file or directory 4 | #include <algorythm> | ^~~~~~~~~~~ compilation terminated.
s624834260
p04044
C++
#include <iostream> #include <string> #include <vector> using namespace std; 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++) cout << S[i]; cout << "n"; }
a.cc: In function 'int main()': a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort((S).begin(), (S).end()); | ^~~~ | short
s072234506
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.being(),a.end()); for(int i=0;i<n;i++){ cout << a[i]; } }
a.cc: In function 'int main()': a.cc:11:10: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'being' 11 | sort(a.being(),a.end()); | ^~~~~
s765287041
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,a+n); for(int i=0;i<n;i++){ cout << a[i]; } }
a.cc: In function 'int main()': a.cc:11:11: error: no match for 'operator+' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'int') 11 | sort(a,a+n); | ~^~ | | | | | int | std::vector<std::__cxx11::basic_string<char> > In file inclu...
s907050254
p04044
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> a(i); 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: In function 'int main()': a.cc:6:20: error: 'i' was not declared in this scope 6 | vector<string> a(i); | ^ a.cc:11:11: error: no match for 'operator+' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'int') 11 | sort(a,a+n); | ~^~ | ...
s577791437
p04044
C++
#include<bits/stdc++.h. using namespace std; int main(){ int n,l; cin >> n >> l; int a[n]={}; 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:1:24: error: missing terminating > character 1 | #include<bits/stdc++.h. | ^ a.cc:1:9: fatal error: bits/stdc++.h.: No such file or directory 1 | #include<bits/stdc++.h. | ^ compilation terminated.
s972624779
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int t,l; cin>>t>>l; char a[t][l]; for(int i=0;i<t;i++){ cin>>a[i]; } sort(a,a+t); for(int i=0;i<t;i++){ cout<<a[i]; } }
a.cc: In function 'int main()': a.cc:12:13: error: no matching function for call to 'sort(char [t][l], char (*)[l])' 12 | sort(a,a+t); | ~~~~^~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s440392647
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,N,L; cin >> N >> L; string S[101]; for(i=0;i<N;i++) { cin >> S[i]; } sort(S, S+n); for(i=0; i<N; i++) { cout << S[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:13:13: error: 'n' was not declared in this scope 13 | sort(S, S+n); | ^
s395045508
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,N,L; cin >> N >> L; vector<string> S[101]; for(i=0;i<N;i++) { cin >> S[i]; } sort(S, S+n); for(i=0; i<N; i++) { cout << S[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:11:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 11 | cin >> S[i]; | ~~~ ^~ ~~~~ | | | | | std::vector<std::__cxx11::ba...
s034645119
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,N,L; cin >> N >> L; vector<string> S; for(i=0;i<N;i++) { S.push_back(i); } sort(S.begin(), S.end()); for(i=0; i<N; i++) { cout << S[i]; } cout << endl; }
a.cc: In function 'int main()': a.cc:11:16: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(int&)' 11 | S.push_back(i); | ~~~~~~~~~~~^~~ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, ...
s628649350
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,N,L; cin >> N >> L; vector<string> S[101]; for(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:8:24: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 8 | for(i=0;i<N;i++) cin >> S[i]; | ~~~ ^~ ~~~~ | | | ...
s458917665
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,N,L; vector<string> S[N]; cin >> N >> L; for(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:8:24: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 8 | for(i=0;i<N;i++) cin >> S[i]; | ~~~ ^~ ~~~~ | | | ...
s138041487
p04044
C++
#include<iostream> #include<algorithm> using namespace std; int main () { int N, L; int arr[L]; cin >> N >> L; for (int i = 0; i < N; i ++){ string s; cin >> s; arr[i] = s; } for (int i = 0; i < L; i ++){ cout << i << " " << arr[i] << '\n'; } sort (arr, arr + L); int sum = ""; for ...
a.cc: In function 'int main()': a.cc:12:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in assignment 12 | arr[i] = s; | ^ | | | std::string {aka std::__cxx11::basic_string<char>} a.cc:18:13: error: invalid convers...
s214330949
p04044
C++
#include<iostream> #include<algorithm> using namespace std; int main () { int N, L; string arr[L]; cin >> N >> L; for (int i = 0; i < N; i ++){ string s; cin >> s; arr[i] = s; } for (int i = 0; i < L; i ++){ cout << i << " " << arr[i] << '\n'; } sort (arr, arr + N); for (int i = 0; i...
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:5:13: note: to match this '{' 5 | int main () { | ^
s672519691
p04044
C++
#include<iostream> #include<algorithm> using namespace std; int main () { int N, L; string arr[L]; cin >> N >> L; for (int i = 0; i < N; i ++){ string s; cin >> s; arr[i] = s; } for (int i = 0; i < L; i ++){ cout << i << " " << arr[i] << '\n'; } sor (arr, arr + N); for (int i = 0; i ...
a.cc: In function 'int main()': a.cc:17:3: error: 'sor' was not declared in this scope 17 | sor (arr, arr + N); | ^~~ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:5:13: note: to match this '{' 5 | int main () { | ^
s415500053
p04044
C++
#include<bits/stdc++.h> using namespace std; int main() { int n,l; cin>>n>>l; string s; for(int i=0;i<n;i++) { cin>>s; v.push_back(s); } sort(v.begin(),v.end()); for(int i=0;i<v.size();i++) { cout<<v[i]; } }
a.cc: In function 'int main()': a.cc:12:5: error: 'v' was not declared in this scope 12 | v.push_back(s); | ^ a.cc:14:8: error: 'v' was not declared in this scope 14 | sort(v.begin(),v.end()); | ^
s433524023
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,l; cin>>n>>l; string p; vector<string> s(t); 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<<p<<endl; retu...
a.cc: In function 'int main()': a.cc:9:22: error: 't' was not declared in this scope 9 | vector<string> s(t); | ^
s537772035
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, L; cin >> N >> L; vector<string>data(N); for(int i=0;i<N;i++){ cin >> data.at(i); } sort(data.begin(),data.end()); string s=""; for(int i=0;i<N;i++){ s+=data.at(i) } cout << s << endl; }
a.cc: In function 'int main()': a.cc:14:18: error: expected ';' before '}' token 14 | s+=data.at(i) | ^ | ; 15 | } | ~
s272900057
p04044
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main(){ int N,L; cin >> N >> L; vector<string>s(L); rep(i,L){ cin >> s.at(i); } sort(s.begin(),s.end()); rep(i,L){ cout >> s.at(i); } }
a.cc: In function 'int main()': a.cc:19:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'}) 1...
s600880123
p04044
C++
#include<iostream> #include<algorithm> #include<cmath> #include<vector> #include<map> #include<set> #include<string> #include<queue> #include<stack> #include<iomanip> #define fast_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); using namespace std; #define debug(x) cout<<(#x)<<"="<<(x)<<", "; #de...
a.cc: In function 'int main()': a.cc:50:9: error: 'd' was not declared in this scope 50 | d=""; | ^
s595618134
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()); string ss; for(int i=0;i<n;i++) ss+=a.at(i); cout << ss << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:13: error: 'a' was not declared in this scope 17 | ss+=a.at(i); | ^
s778462529
p04044
C++
#include<bis/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()); string ss; for(int i=0;i<n;i++) ss+=a.at(i); cout << ss << endl; return 0; }
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s802492878
p04044
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int findSumOfDigits(int n) { int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } return sum; } int main() { int n, l; vector<string> s(n); cin >> n >> l; rep(i, n) cin >> s.at(i); sort(s.begin(), s...
a.cc: In function 'int main()': a.cc:20:22: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)' 20 | rep(i, n) cout << s(i); | ~^~~
s650263388
p04044
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int findSumOfDigits(int n) { int sum = 0; while (n > 0) { sum += n % 10; n /= 10; } return sum; } int main() { int n, l; vector<string> s[n]; cin >> n >> l; rep(i, n) cin >> s[i]; sort(s.begin(), s.en...
a.cc: In function 'int main()': a.cc:18:17: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 18 | rep(i, n) cin >> s[i]; | ~~~ ^~ ~~~~ | | | | | ...
s068051178
p04044
C++
//インクルード(アルファベット順) #include<algorithm>//sort,二分探索,など #include<bitset>//固定長bit集合 #include<cmath>//pow,logなど #include<complex>//複素数 #include<deque>//両端アクセスのキュー #include<functional>//sortのgreater #include<iomanip>//setprecision(浮動小数点の出力の誤差) #include<iostream>//入出力 #include<iterator>//集合演算(積集合,和集合,差集合など) #include<map>//map...
a.cc: In function 'int main()': a.cc:62:2: error: expected '}' at end of input 62 | } | ^ a.cc:52:15: note: to match this '{' 52 | signed main() { | ^
s852433710
p04044
C++
//インクルード(アルファベット順) #include<algorithm>//sort,二分探索,など #include<bitset>//固定長bit集合 #include<cmath>//pow,logなど #include<complex>//複素数 #include<deque>//両端アクセスのキュー #include<functional>//sortのgreater #include<iomanip>//setprecision(浮動小数点の出力の誤差) #include<iostream>//入出力 #include<iterator>//集合演算(積集合,和集合,差集合など) #include<map>//map...
a.cc: In function 'int main()': a.cc:57:15: error: expected ']' before ';' token 57 | cin >> S[i;] | ^ | ] a.cc:57:16: error: expected primary-expression before ']' token 57 | cin >> S[i;] | ^
s282078692
p04044
C++
#include <stdio.h> struct word { char str[L+1]; }; int N,L; struct word words[N+1]; int main() { scanf("%d %d",&N,&L); for (int i=1;i<=N;i++) { scanf("%s",words[i].str); } for (int i=1;i<=N-1;i++) { for (int j=1;j<=N-i;j++) { if (strcmp(words[j].str,words[j+1].str)) swap(j,j+1); } } } void ...
a.cc:5:18: error: 'L' was not declared in this scope 5 | char str[L+1]; | ^ a.cc:9:20: error: size of array 'words' is not an integral constant-expression 9 | struct word words[N+1]; | ~^~ a.cc: In function 'int main()': a.cc:17:37: error: 'struct word' has...
s934961076
p04044
C++
//B - Iroha Loves Strings (ABC Edition) #include <stdio.h> int N,L; char str[N+1][L+1]; int main() { int i,j; scanf("%d %d",&N,&L); for (i=1;i<=N;i++) { gets(char[i][]); } for (i=1;i<=N-1;i++) { for (j=1;j<=N-i;j++) { if (strcmp(char[j][],char[j+1][])) swap(j,j+1); } } } void swap(int idx1,...
a.cc:5:16: error: size of array 'str' is not an integral constant-expression 5 | char str[N+1][L+1]; | ~^~ a.cc:5:11: error: size of array 'str' is not an integral constant-expression 5 | char str[N+1][L+1]; | ~^~ a.cc: In function 'int main()': a.cc:14:22: error: expected pri...
s053967949
p04044
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status