submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s471254229
p04044
C++
#include<vector> #include<iostream> #include<cmath> #include<map> using namespace std; int main(){ int N; int L; cin >> N >> L; vector<string> vec(N); for(int i = 0;i < N;i++){ cin >> vec.at(i); } sort(vec.begin(),vec.end()); for(int i = 0;i < N;i++){ cout << vec.at(i); } re...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 21 | sort(vec.begin(),vec.end()); | ^~~~ | sqrt
s327549437
p04044
C++
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int ter(char *a,char *b) { return strcmp(a,b); } int main() { int n,l; char a[110][110]; char s[110][110]; cin>>n>>l; getchar(); char b[110]; for(int i=0;i<n;i++) { gets(a[i]); } for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) { ...
a.cc: In function 'int main()': a.cc:19:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | gets(a[i]); | ^~~~ | getw
s109827228
p04044
C++
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int ter(char *a,char *b) { return strcmp(a,b); } int main() { int n,l; char a[110][110]; char s[110][110]; cin>>n>>l; getchar(); char b[110]; for(int i=0;i<n;i++) { gets(a[i]); } for(int i=0;i<n;i++) for(int j=i+1;j<n;j++) { ...
a.cc: In function 'int main()': a.cc:19:17: error: 'gets' was not declared in this scope; did you mean 'getw'? 19 | gets(a[i]); | ^~~~ | getw
s688568578
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s593414563
p04044
C
#include <stdio.h> #include <string.h> int main() { int n,l; int i,j = 0; char input[100][101]; char temp[100]; scanf("%d %d", &n, &l); for(i = 0; i < n; i++){ scanf("%s", input[i]); // printf("%s", input[i]); } for(j = 0;j < n; j++){ for(i = 0; i < n-1; i++){ // if(input[i] > inpu...
main.c: In function 'main': main.c:21:9: error: 'flag' undeclared (first use in this function) 21 | flag = 1; | ^~~~ main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
s314796652
p04044
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { int n, l; cin >> n >> l; string s[n]; for (int i = 0;i < n;i++)cin >> s; sort(s, s + n); for (int i = 0;i < n;i++)cout << s[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:10:38: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}) 10 | for (int i = 0;i < n;i++)cin >> s; | ~~~ ^~ ~ |...
s006459468
p04044
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main() { int n, l; cin >> n >> l; string s[n]; for (int i = 0;i < n;i++)cin >> s; sort(s, s + l); for (int i = 0;i < n;i++)cout << s[i]; cout << endl; }
a.cc: In function 'int main()': a.cc:10:38: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}) 10 | for (int i = 0;i < n;i++)cin >> s; | ~~~ ^~ ~ |...
s331401301
p04044
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int n,k; cin>>n>>l; string s[100]; string ans; for(int i=0;i<n;i++){ cin>>s[i]; } sort(s,s+n); for(int i=0;i<n;i++){ ans=ans+s[i]; ...
a.cc: In function 'int main()': a.cc:7:17: error: 'l' was not declared in this scope 7 | cin>>n>>l; | ^
s248323300
p04044
C++
#include<iostream> #include<algorithm> #include<string> using namespace std; int main(){ int n,k; cin>>n>>l; string s[100]; string ans; for(int i=0;i<n;i++){ cin>>s[i]; } sort(s,s+n); for(int i=0;i<n;i++){ ans=ans+s[i]; ...
a.cc: In function 'int main()': a.cc:7:17: error: 'l' was not declared in this scope 7 | cin>>n>>l; | ^
s481590045
p04044
Java
import java.util.Scanner; import java.util.Arrays; import java.util.Comparator; public class IrohaLovStr{ public static void main(String[] args) { Scanner sc =new Scanner(System.in); int n=sc.nextInt(); int l=sc.nextInt(); String str[]=new String[l]; String all; for(int i=0;i<n;i++) { //文字列読み取り ...
Main.java:6: error: class IrohaLovStr is public, should be declared in a file named IrohaLovStr.java public class IrohaLovStr{ ^ 1 error
s176460493
p04044
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; string s[200]; int ans; int main() { int n, l; cin >> n >> l; for (int i = 0; i < n; i++) { cin >> s[i]; } sort(s, s + n); for (int i = 0; i < n; i++)ans += s[i]; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:16:40: error: no match for 'operator+=' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 16 | for (int i = 0; i < n; i++)ans += s[i]; | ~~~~^~~~~~~
s177569829
p04044
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<vector> #include<string> #include<sstream> #include<iomanip> #include<utility> #include<cmath> #include<set> #include<list> #include<string> #include<queue> #include<stack> #include<deque> #include<map> #include<set> #include<cstring> #i...
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 63 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:60:20: error: request for member 'begin' in 's', which is of non-class type 'std::string [114]' {aka 'std::__cxx11::basic_string<char> [114]'} 60 | #define ALL(x) (...
s527838223
p04044
Java
import java.io.*; import java.util.*; public class Beg42ProbB { static int MOD = 1000000007; static double EPS = 1e-9; public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(in.readLin...
Main.java:4: error: class Beg42ProbB is public, should be declared in a file named Beg42ProbB.java public class Beg42ProbB { ^ 1 error
s872800548
p04044
C++
#include <cstdio> #include <algorithm> #include <vector> #include <string> using namespace std; vector<string> s; int main() { int n, l; scanf("%d %d", &n, &l); for(int i=0;i<n;i++) { string a; scanf("%s", a); s.push_back(a); } sort(s.begin, s.end()); for(int i=0;i<n;i++) { printf("%s", s...
a.cc: In function 'int main()': a.cc:17:7: error: no matching function for call to 'sort(<unresolved overloaded function type>, std::vector<std::__cxx11::basic_string<char> >::iterator)' 17 | sort(s.begin, s.end()); | ~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, ...
s504451617
p04044
C++
#include <cstdio> #include <algorithm> #include <vector> #include <string> std::vector<string> s; int main() { int n, l; scanf("%d %d", &n, &l); for(int i=0;i<n;i++) { std::string a; scanf("%s", a); s.std::push_back(a); } std::sort(s.std::begin, s.std::end()); for(int i=0;i<n;i++) { print...
a.cc:5:13: error: 'string' was not declared in this scope 5 | std::vector<string> s; | ^~~~~~ a.cc:5:13: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from a.cc:4: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | type...
s496872284
p04044
C++
#include <cstdio> #include <algorithm> #include <vector> #include <string> std::vector<string> s; int main() { int n, l; scanf("%d %d", &n, &l); for(int i=0;i<n;i++) { std::string a; scanf("%s", a); s.push_back(a); } sort(s.begin, s.end()); for(int i=0;i<n;i++) { printf("%s", s[i]); } }
a.cc:5:13: error: 'string' was not declared in this scope 5 | std::vector<string> s; | ^~~~~~ a.cc:5:13: note: suggested alternatives: In file included from /usr/include/c++/14/string:41, from a.cc:4: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | type...
s675196920
p04044
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n,l; cin>>n>>l; vector<string> s; for(int i=0;i<n;i++){ string str; cin>>str; s.push_back(str); } sort(s.begin(),s.end()); string ans(""); for(int i=0;i<n;i++){ ans+=s[i]; } ...
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s.begin(),s.end()); | ^~~~ | short
s405408324
p04044
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n,l; cin>>n>>l; vector<string> s; for(int i=0;i<n;i++){ string str; cin>>str; s.push_back(str); } sort(s.begin(),s.end()); string ans(""); for(int i=0;i<n;i++){ ans+=s[i]; } ...
a.cc: In function 'int main()': a.cc:14:5: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(s.begin(),s.end()); | ^~~~ | short
s400945960
p04044
C++
#include <iostream> #include <vector> using namespace std; int main() { int N, L; string tmp; vector<string> vector1; cin >> N >> L; for (int i = 0; i < N; ++i) { cin >> tmp; vector1.push_back(tmp); } sort(vector1.begin(), vector1.end()); for (int j = 0; j < vector1.siz...
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(vector1.begin(), vector1.end()); | ^~~~ | short
s524764983
p04044
C++
# main関数 if __name__ == '__main__': n, l = map(int,input().split()) a = [] for i in range(n) : a.append(input()) a.sort() for i in range(n) : print(a[i], end="") print()
a.cc:1:3: error: invalid preprocessing directive #main\U000095a2\U00006570 1 | # main関数 | ^~~~~~~~ a.cc:2:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 2 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:2:1: error: expected unqualified-id before ...
s919307014
p04044
C++
#include<iostream> using namespace std; int main(){ int n,l; cin >> n >> l; char s[n][l]; int t[n][l]; for(int i = 0;i < n;i++){ cin >> s[i]; for(int j = 0;j < l;j++){ if(s[i][j] == 'a'){ t[i][j] = 1; } if(s[i][j] == 'b'){ ...
a.cc: In function 'int main()': a.cc:107:27: error: incompatible types in assignment of 'int' to 'int [n][l]' 107 | t = t[x][m]; | ~~^~~~~~~~~
s020240402
p04044
C++
#include<iostream> #include<cstring> #include<string> using namespace std; int main(){ int n,l; string s[111]; 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]; if(i+1==n){ cout << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(s,s+n); | ^~~~ | short
s429860095
p04044
C++
#include<iostream> #include<cstring> using namespace std; int main(){ int n,l; string s[111]; 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]; if(i+1==n){ cout << endl; } } 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(s,s+n); | ^~~~ | short
s795540110
p04044
C++
#include<iostream> #include<vector> #include<string> using namespace std; vector<string> sort_s(vector<string> s, int begin, int end, int index); vector<string> sort_s(vector<string> s, int begin, int end, int index){ for(int i = begin; i < end; i++){ for(int j = i; j < end; j++){ if(s[i][inde...
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > sort_s(std::vector<std::__cxx11::basic_string<char> >, int, int, int)': a.cc:12:17: error: 'buf' was not declared in this scope 12 | buf = s[j]; | ^~~
s514280744
p04044
C++
#include<iostream> #include<vector> #include<string> using namespace std; vector<string> sort_s(vector<string> s, int begin, int end, int index); vector<string> sort_s(vector<string> s, int begin, int end, int index){ for(int i = begin; i < end; i++){ for(int j = i; j < end; j++){ if(s[i][inde...
a.cc: In function 'std::vector<std::__cxx11::basic_string<char> > sort_s(std::vector<std::__cxx11::basic_string<char> >, int, int, int)': a.cc:12:17: error: 'buf' was not declared in this scope 12 | buf = s[j]; | ^~~
s905430018
p04044
C++
#include <iostream> #include <cstdlib> #include <cstring> #include <stdio.h> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main()...
a.cc: In function 'int main()': a.cc:22:37: error: 'gets' was not declared in this scope; did you mean 'getw'? 22 | for (int i = 0; i < n; i++) gets(str[i].str); | ^~~~ | getw
s681746933
p04044
C++
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main() ...
a.cc: In function 'int main()': a.cc:22:37: error: 'gets' was not declared in this scope; did you mean 'getw'? 22 | for (int i = 0; i < n; i++) gets(str[i].str); | ^~~~ | getw
s908839321
p04044
C
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main() ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s155623359
p04044
C++
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main() ...
a.cc: In function 'int main()': a.cc:22:37: error: 'gets' was not declared in this scope; did you mean 'getw'? 22 | for (int i = 0; i < n; i++) gets(str[i].str); | ^~~~ | getw
s400600693
p04044
C++
#include <iostream> #include <cstdlib> #include <cstring> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main() { int n, l; cin ...
a.cc: In function 'int main()': a.cc:21:37: error: 'gets' was not declared in this scope; did you mean 'getw'? 21 | for (int i = 0; i < n; i++) gets(str[i].str); | ^~~~ | getw
s628223397
p04044
C++
#include <iostream> #include <cstdlib> #include <cstring> using namespace std; struct Str { char str[105]; }str[100]; int cmp(const void *a, const void *b) { const struct Str *p1 = (const struct Str*)a; const struct Str *p2 = (const struct Str*)b; return strcmp(p1->str, p2->str); } int main() { int n, l; cin ...
a.cc: In function 'int main()': a.cc:21:37: error: 'gets_s' was not declared in this scope 21 | for (int i = 0; i < n; i++) gets_s(str[i].str); | ^~~~~~
s721837357
p04044
C++
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb push_back #define eb emplace_back typedef long long ll; const ll mod = 1000000007; const double pi = 3.1415926535897932384626; ll powmod(ll a, ll b) {ll res = 1; ll rem = a % mod; for (; b; b >>= 1) {if...
a.cc: In function 'int main()': a.cc:33:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 33 | gets(hey); | ^~~~ | getw
s518329725
p04044
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,l,i; cin>>n>>l; vector<string > v(n); for(i=0;i<n;i++) cin>>v[i]; sort(v.begin(),v.end()); string s=''''; for(i=0;i<n;i++) s+=v[i]; cout<<s<<endl; return 0; }
a.cc:12:10: error: empty character constant 12 | string s=''''; | ^~ a.cc:12:12: error: empty character constant 12 | string s=''''; | ^~ a.cc: In function 'int main()': a.cc:12:10: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char...
s462744302
p04044
C++
#include<iostream> #include <string> #include <iomanip> #include <vector> #include <queue> #include <math.h> #include <algorithm> #include <functional> #include <set> #include <map> using namespace std; #define int long long #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for (int i=0;i<(n);i++) signed...
a.cc: In function 'int main()': a.cc:29:22: error: expected '}' at end of input 29 | cout << endl; | ^ a.cc:18:1: note: to match this '{' 18 | { | ^
s738276668
p04044
C++
#define _USE_MATH_DEFINES #include <iostream> #include <stdio.h> #include <string> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; int main() { int n, l; char s[100][100], tmp[100] = {}; cin >> n >> l; for (int i = 0; i < n; i++) cin >> s[i]; for (int i = 0; i < n - 1; i++) for (in...
a.cc: In function 'int main()': a.cc:19:41: error: 'strcpy' was not declared in this scope 19 | strcpy(tmp, s[j]); | ^~~~~~ a.cc:8:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cs...
s655153316
p04044
C++
#include<iostream> using namespace std; #include<vector> #include<set> int main(){ int n,l; cin>>n>>l; set<string> s; for(int i = 0;i<n;i++){ string a; cin>>a; s.insert(a); } for(auto x : s){ cout<< x <<; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:17:28: error: expected primary-expression before ';' token 17 | cout<< x <<; | ^
s203281783
p04044
C++
3 3 dxx axx cxx
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 3 3 | ^
s287110521
p04044
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; int main() { int n, k; cin>>n>>k; string names[121]; string temp; for(int i = 0; i<n; i++) { cin>>names[i]; } sort(names, names+n); for(int i=...
a.cc: In function 'int main()': a.cc:22:14: error: expected '}' at end of input 22 | return 0; | ^ a.cc:9:5: note: to match this '{' 9 | { | ^
s910401421
p04044
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main() { int n, k; cin>>n>>k; string names[121]; string temp; for(int i = 0; i<n; i++) { cin>>names[i]; } sort(names, names+n); for(int i=0; i<n; i++) cout<<n...
a.cc: In function 'int main()': a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'? 17 | sort(names, names+n); | ^~~~ | short
s948690604
p04044
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main() { int n, k; cin>>n>>k; string[121] names; string temp; for(int i = 0; i<n; i++) { cin>>names[i]; } sort(names, names+n); for(int i=0; i<n; i++) cout<<names[i]; cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:8: error: expected identifier before numeric constant 10 | string[121] names; | ^~~ a.cc:10:8: error: expected ']' before numeric constant 10 | string[121] names; | ^~~ | ] a.cc:10:7: error: structured binding declaration cannot have t...
s345250543
p04044
C++
#include <iostream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { int n, l; string s; vector<string> v; cin >> n >> l; 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++) { ...
a.cc: In function 'int main(int, const char**)': a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(v.begin(), v.end()); | ^~~~ | short
s977814589
p04044
C++
#include <iostream> #include <vector> #define eol '\n' using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int N,L; cin >> N >> L; vector<string> list(N); for (int i = 0; i < N; i++) { cin >> list[i]; } sort(list.begin(), list.end()); for (int i = 0; i < N; i++...
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(list.begin(), list.end()); | ^~~~ | short
s109559229
p04044
Java
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int L = sc.nextInt(); String [] S = new String [N]; for(int i=0; i<N; i++){ S[i] = sc.next(); } Arrays.sort...
Main.java:15: error: ';' expected ans=ans+S[i] ^ 1 error
s014401859
p04044
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Atcoder42bb { public static void main(String[] args) throws IOException { BufferedReader b = new BufferedReader(new InputStreamReader(System.in)); String[] line = b.readLine().split(...
Main.java:6: error: class Atcoder42bb is public, should be declared in a file named Atcoder42bb.java public class Atcoder42bb { ^ 1 error
s978780630
p04044
Java
import java.util.Arrays; import java.util.Comparator; import java.util.Scanner; public class Easy { static Cara c[]; public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int l = sc.nextInt(); c = new Cara[l]; for(int i = 0;i < n;i++){ c[i] = new Cara(sc.nex...
Main.java:5: error: class Easy is public, should be declared in a file named Easy.java public class Easy { ^ 1 error
s286540836
p04044
C++
#include <iostream> #include <cmath> #include <string> #include <vector> using namespace std; int main(){ int N,L; cin >> N >> L; vector<string> mozi(N); vector<string> sum(1); for(int i=0;i < N;i++){ cin >> mozi[i]; } qsort(mozi.begin(),mozi.end()); for(int i=0;i < N;i++){ sum[0] += mozi[i]; } cout <...
a.cc: In function 'int main()': a.cc:18:25: error: cannot convert 'std::vector<std::__cxx11::basic_string<char> >::iterator' to 'void*' 18 | qsort(mozi.begin(),mozi.end()); | ~~~~~~~~~~^~ | | | std::vector<std::__cxx11::basic_str...
s659138529
p04044
C++
#include <iostream> #include <math> #include <string> #include <vector> using namespace std; int main(){ int N,L; cin >> N >> L; vector<string> mozi(N); vector<string> sum(1); for(int i=0;i < N;i++){ cin >> mozi[i]; } qsort(mozi.begin(),mozi.end()); for(int i=0;i < N;i++){ sum[0] += mozi[i]; } cout <<...
a.cc:2:10: fatal error: math: No such file or directory 2 | #include <math> | ^~~~~~ compilation terminated.
s228798670
p04044
C++
#include <iostream> #include <math> #include <string> #include <vector> using namespace std; int main(){ int N,L; cin >> N >> L; //入力 vector<string> mozi(N); //比較する文字の数 vector<string> sum(1); //文字を足したやつ for(int i=0;i < N;i++){ //文字入力 cin >> mozi[i]; } qsort(mozi.begin(),mozi.end()); //文字列の最初から最後までをクイックソート...
a.cc:2:10: fatal error: math: No such file or directory 2 | #include <math> | ^~~~~~ compilation terminated.
s574566021
p04044
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static Scanner sc; public static void main(String[] args) { Main instance = new Main(); sc ...
Main.java:28: error: cannot find symbol Arrays.sort(array); ^ symbol: variable Arrays location: class Main Main.java:50: warning: [removal] finalize() in Object has been deprecated and marked for removal protected void finalize() throws Throwable { ^ Main.jav...
s347559240
p04044
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <cmath> int main() { int N, L; std::cin >> N >> L; std::vector<std::string> a; for (int i = 0; i < N; i++) { std::string tmp; std::cin >> tmp; a.push_back(tmp); } std::sort(a.begin(), a.end()); std::string r...
a.cc: In function 'int main()': a.cc:19:8: error: 'sort' is not a member of 'std'; did you mean 'sqrt'? 19 | std::sort(a.begin(), a.end()); | ^~~~ | sqrt
s992159741
p04044
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <cmath> int main() { int N, L; std::cin >> N >> L; std::vector<std::string> a; for (int i = 0; i < N; i++) { std::string tmp; std::cin >> tmp; a.push_back(tmp); } std::cout << "hoge" << std::endl; std::sort(a...
a.cc: In function 'int main()': a.cc:20:8: error: 'sort' is not a member of 'std'; did you mean 'sqrt'? 20 | std::sort(a.begin(), a.end()); | ^~~~ | sqrt
s375905837
p04044
C++
#include <iostream> #include <fstream> #include <cstdio> #include <cmath> #include <vector> #include <cstring> #include <string> #include <set> #include <map> #include <stack> #include <queue> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0; i<n; ++i) #define FOR(i,a,b) for(int i=a; i<=b; ++i) #...
a.cc: In function 'int main()': a.cc:32:17: error: invalid use of void expression 32 | sort(s.clear(),s.end()); | ~~~~~~~^~
s926929925
p04044
C++
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int n, l; vector<string> lines; cin >> n >> l; for(int i = 0; i < n; i++) { string line; cin >> line; lines.push_back(line); } sort(lines.begin(), lines.end()); for(int i = 0; i < n; i++) { cout << ...
a.cc: In function 'int main()': a.cc:16:3: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(lines.begin(), lines.end()); | ^~~~ | short
s874322021
p04044
C++
#include <stdio.h> #include <string.h> char a[100][101]; int n, l; void swap(int x, int y) { char t; for(int i=0; i<l; i++) { t=a[x][i]; a[x][i]=a[y][i]; a[y][i]=t; } } #include <stdio.h> #include <string.h> char a[100][101]; int n, l; void swap(int x, int y) { char t; f...
a.cc:19:6: error: redefinition of 'char a [100][101]' 19 | char a[100][101]; | ^ a.cc:4:6: note: 'char a [100][101]' previously declared here 4 | char a[100][101]; | ^ a.cc:20:5: error: redefinition of 'int n' 20 | int n, l; | ^ a.cc:5:5: note: 'int n' previously declared here ...
s480539876
p04044
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,l; cin >> n >> l; vector<string> v(n); for(int i=0;i<n;i++){ cin >> v[i]; } sort(v.begin(),v.end()); for(int unsigned i = 0;i<n;i++){ cout < v[i]; } cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:22: 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>'}) 14...
s292408229
p04044
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,l; char S[100][100]; cin >> n >> l; for(int i=0;i<n;i++){ for(int j=0;j<l;j++){ cin >> S[i][j]; } } for(int i=0;i<n;i++){ sort(S[i],S[i]+l); } for(int i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:27:5: error: 'cou\U0000ff54' was not declared in this scope 27 | cout<<endl; | ^~~~~
s351804097
p04044
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,l; char S[100][100]; cin >> n >> l; for(int i=0;i<n;i++){ for(int j=0;j<l;j++){ cin >> S[i][j]; } } for(int i=0;i<n;i++){ sort(S[i],S[i]+l); } for(int i=0;i<n;i++){ ...
a.cc: In function 'int main()': a.cc:27:5: error: 'cou' was not declared in this scope 27 | cou<<endl; | ^~~
s840214428
p04044
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner x = new Scanner(System.in); int num=x.nextInt(); int length=x.nextInt(); String[] arr = new String[num]; for(int i = 0;i<num;i++){ arr[i]=x.next(); } Arrays.sort(arr); String result=""; for(int i = 0;i<num;i++){ result +=...
Main.java:23: error: incompatible types: unexpected return value return result; ^ 1 error
s053760060
p04044
C++
#include<string> #include<iostream> #include<vector> #include<map> using namespace std; int main() { vector<int> in(3); map<int,int> mp; int N, L; cin >> N; cin >> L; vector<string> S; S.resize(N); for(auto &s: S) cin >> s; sort(S.begin(), S.end()); for(auto s: S) cout << s; cout << ...
a.cc: In function 'int main()': a.cc:22:3: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(S.begin(), S.end()); | ^~~~ | short
s643286861
p04044
C
include<stdio.h> #include<string.h> int main(void) { char str[100][100], temp[100]; int N, L, i; scanf("%d %d", &N, &L); gets(temp); for (L = 0;L < N;L++) gets(str[L]); for (L = 0;L < N-1;L++) { for (i = 0;i < N - 1;i++) { if (strcmp(str[i], str[i + 1]) > 0) { strcpy(temp, str[i]); strcpy(str[i], ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s629694071
p04044
C++
import java.util.*; public class Main { static int N, L; static String[] S; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); L = sc.nextInt(); S = new String[N]; for(int i = 0; i < N; i++) { S[i] = sc.next(); } Arrays.sort(S); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Main { | ^~~~~~
s062399204
p04044
C++
#include<stdio.h> //#include<cstdio> #include<iostream> #include<fstream> #include<string.h> #include<algorithm> #include<functional> using namespace std; int main(void){ int L, N; string S[101]; ifs >> L >> 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]; c...
a.cc: In function 'int main()': a.cc:15:9: error: 'ifs' was not declared in this scope; did you mean 'ffs'? 15 | ifs >> L >> N; | ^~~ | ffs
s129211136
p04044
C++
//gcc -std=gnu11 -O2 -o a.out Main.c -lm #include <stdio.h> #include <string.h> #include <stdlib.h> int sortFunc(const void *str1, const void *str2){ return strcmp(str1, str2); } int main(void) { int n, l, i; char str[100][101]; int ret; ret = scanf("%d %d", &n, &l); for(i = 0 ; i < n ; i++){ ret = scanf...
a.cc: In function 'int sortFunc(const void*, const void*)': a.cc:8:23: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 8 | return strcmp(str1, str2); | ^~~~ | | | const void* In file included fro...
s088060474
p04044
C++
#include <iostream> #include <string> using namespace std; string tab[101]; int main() { cin >> n >> l; for (int i = 0; i < n; i++) cin >> tab[i]; sort(tab, tab+n); for (int i = 0; i < n; i++) cout <<tab[i]; cout <<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: 'n' was not declared in this scope 7 | cin >> n >> l; | ^ a.cc:7:13: error: 'l' was not declared in this scope 7 | cin >> n >> l; | ^ a.cc:9:1: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(tab, ta...
s747249014
p04044
Java
/* Filename: ABC042B.java * Author: Mushiyo */ import java.util.Scanner; import java.util.Arrays; public class ABC042B { public static void main(String[] args) { Scanner input = new Scanner(System.in); while (input.hasNext()) { int N = input.nextInt(); int L = input.nextInt(); String[] S = new Strin...
Main.java:8: error: class ABC042B is public, should be declared in a file named ABC042B.java public class ABC042B { ^ 1 error
s858033709
p04044
C++
/* ID: marik_k1 PROG: LANG: C++ */ #include <bits/stdc++.h> using namespace std; //ifstream fin ("input.txt"); //ofstream fout ("output.txt"); #define forn(i,n) for(int i = 0; i < n; ++i) #define mp make_pair #define pb push_back #define all(t) t.begin(),t.end() #define gcd(x,y) __gcd(x,y) typedef unsigned long lon...
a.cc: In function 'int main()': a.cc:44:19: error: no match for 'operator+' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and 'int') 44 | sort(a, a + n); | ~ ^ ~ | | | | | int | std::vector<std::...
s506179957
p04044
C++
#include<iostream> #include<string> using namespace std; const int MAX=100; int main() { int N,L; string S[MAX]; cin >> N >> L ; for(int i=0; i<N ; i++) { cin >> S[i]; } sort(S,S+N); string res=""; for(int i=0; i<N ; i++) { res+=S[i]; ...
a.cc: In function 'int main()': a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'? 22 | sort(S,S+N); | ^~~~ | short
s793974624
p04044
C++
#include <iostream> #include <vector> using namespace std; int main (){ int N,L; string T,U; cin >> N >> L; vector<string> s; cin.ignore(); for(int i = 0; i < N; ++i) { cin >> T; s.push_back(T); } sort(s.begin(),s.end()); for(int i = 0; i < N; ++i) { U = U + s[i]; } cout << U << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(s.begin(),s.end()); | ^~~~ | short
s684780291
p04044
C++
#include "iostream" #include "vector" using namespace std; int main(int argc, char const *argv[]) { int N,L; cin >> N >> L; vector<string> S; cin.ignore(); string s; for (int i = 0; i < N; ++i) { cin >> s; S.push_back(s); } sort(S.begin(), S.end()); s = ""; for (int i = 0; i < N; ++i) { s += S[i]; ...
a.cc: In function 'int main(int, const char**)': a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(S.begin(), S.end()); | ^~~~ | short
s165837509
p04044
C++
#include <iostream> #include <vector> #include <string> #include <algorithm using namespace std; int main() { size_t n,t; cin>>n;cin>>t; vector<string> v(n); for(auto&& str : v) cin >> str; sort(v.begin(), v.end()); cout << v[0] << v[1] << endl; }
a.cc:4:20: error: missing terminating > character 4 | #include <algorithm | ^
s873022903
p04044
C++
#include <iostream> #include <vector> #include <string> using namespace std; int main() { size_t n,t; cin>>n;cin>>t; vector<string> v(n); for(auto&& str : v) cin >> str; sort(v.begin(), v.end()); cout << v[0] << v[1] << endl; }
a.cc: In function 'int main()': a.cc:12:5: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(v.begin(), v.end()); | ^~~~ | short
s338225914
p04044
Java
import java.util.Scanner; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int l = in.nextInt(); String[] s = new String[n]; for(int i=0; i<n; i++) { s[i] = in.nextInt(); ...
Main.java:11: error: incompatible types: int cannot be converted to String s[i] = in.nextInt(); ^ 1 error
s958053399
p04044
C++
#include <cstdio> #include <vector> #include <string> using namespace std; int main(){ int n, l; scanf("%d %d", &n, &l); vector<string> s; for(int i=0; i<n; i++){ char tmp[l+1]; scanf("%s", tmp); s.push_back(tmp); } sort(s.begin(), s.end()); for(int i=0; i<n; i++){ printf("%s", s[i].c_str()); } print...
a.cc: In function 'int main()': a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(s.begin(), s.end()); | ^~~~ | short
s095862731
p04044
Java
import java.util.Scanner; import java.util.Comparator; public class Main{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); int n=sc.nextInt(); String[] s=new String[n]; for(int i=0; i<n; i++){ s[i]=sc.next();} Arrays.sort(s); for(int i=0; i<n; i++){ System.out.println(s[i]);} }}
Main.java:12: error: cannot find symbol Arrays.sort(s); ^ symbol: variable Arrays location: class Main 1 error
s638993748
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<<endl; }
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.begin(),s.end()); | ^~~~ | short
s890430285
p04044
Java
import java.util.Scanner; import java.util.Comparator; public class Main{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); int n=sc.nextInt(); String[] s=new String[n]; for(int i=0; i<s.length; i++){ s[i]=sc.next();} for(int i=0; i<s.length-1; i++){ } Arrays.sort(s); for(int i=0; i<s.lengt...
Main.java:14: error: cannot find symbol Arrays.sort(s); ^ symbol: variable Arrays location: class Main 1 error
s022574551
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(); List<String> slist = new ArrayList<>(); // 文字列の入力 for(int i=0; i<N; i++){ slist.add(sc.next()); } List<String> ...
Main.java:15: error: cannot find symbol List<String> subList = slist.subList(1, teamsName.size()); ^ symbol: variable teamsName location: class Main 1 error
s946370204
p04044
C++
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { int a,b; cin >> a >> b; string c[100]; for(int i=0;i<a;i++){ cin >> c[i]; } sort(c,c+a); for(int j=0;j<a;j++){ cout << c[j]; }
a.cc: In function 'int main()': a.cc:19:10: error: expected '}' at end of input 19 | } | ^ a.cc:7:12: note: to match this '{' 7 | int main() { | ^
s764807479
p04044
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; int main() { int N, L; cin >> N >> L; vector <string> Sset; for (int i = 0; i < N; i++) { string s; cin >> s; Sset.push_back(s); s.clear(); } sort(Sset.begin(), Sset...
a.cc: In function 'int main()': a.cc:19:14: error: 'null' was not declared in this scope 19 | answer = null; | ^~~~
s438961670
p04044
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, L; cin >> N >> L; vector <string> Sset; for (int i = 0; i < N; i++) { string s; cin >> s; Sset.push_back(s); s.clear(); } sort(Sset.begin(), Sset.end()) strin...
a.cc: In function 'int main()': a.cc:17:35: error: expected ';' before 'string' 17 | sort(Sset.begin(), Sset.end()) | ^ | ; 18 | string answer; | ~~~~~~ a.cc:19:5: error: 'answer' was not dec...
s743117419
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(); List<String> slist = new ArrayList<>(); // 文字列の入力 for(int i=0; i<N; i++){ slist.add(sc.nextInt()); } Collection...
Main.java:13: error: incompatible types: int cannot be converted to String slist.add(sc.nextInt()); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error
s856926030
p04044
C++
#include <iostream> #include <cstring> #include <algorithm> #include <vector> using namespace std; char S[101][101]; char *ans[101]; int main (void) { int N, L; char *tmp; cin.tie(0); ios::sync_with_stdio(false); cin >> N >> L; for (int i = 0; i < N; i++) { cin >> S[i]; ans[i] = S[i]; } for (int i = 1; ...
a.cc:34:5: error: stray '@' in program 34 | yuta@yuta-HP-P | ^ a.cc:34:1: error: 'yuta' does not name a type 34 | yuta@yuta-HP-P | ^~~~
s128045119
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(); List<String> slist = new ArrayList<>; // 文字列の入力 for(int i=0; i<N; i++){ slist.add(sc.nextInt()); } Collections....
Main.java:9: error: '(' or '[' expected List<String> slist = new ArrayList<>; ^ 1 error
s173386780
p04044
Java
import java.util.ArrayList; import java.util.Collections; import java.io.*; import java.util.Scanner; class Main{ public static void main(String[] args)throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)\ ); ArrayList<String> list = new ArrayList<String>(); ...
Main.java:8: error: illegal character: '\' BufferedReader br = new BufferedReader(new InputStreamReader(System.in)\ ^ 1 error
s589300644
p04044
C++
typedef vector<VI> VVI; #define MAX(x,y) ( (x) > (y) ? (x) : (y) ) #define MIN(x, y) ( (x) < (y) ? (x) : (y) ) #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) FOR(i,0,n) #define IVFOR(p,a) for(vector<int>::iterator p = (a).begin(); p!=(a).end(); p++) #define ILFOR(p,a) for(list<int>::iterator p = (a).beg...
a.cc:1:9: error: 'vector' does not name a type 1 | typedef vector<VI> VVI; | ^~~~~~ a.cc: In function 'int main()': a.cc:18:3: error: 'cin' was not declared in this scope 18 | cin >> n >> l; | ^~~ a.cc:20:3: error: 'vector' was not declared in this scope 20 | vector<string> v(n); ...
s272724615
p04044
Java
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class B { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] a = strToIntArray(br...
Main.java:7: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s149970997
p04045
C++
#include <bits/stdc++.h> #include <atcoder/scc> using namespace atcoder; using namespace std; using lint = long long int; using ulint = unsigned long long int; using pint = pair<int, int>; using plint = pair<lint, lint>; struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecisio...
a.cc:2:10: fatal error: atcoder/scc: No such file or directory 2 | #include <atcoder/scc> | ^~~~~~~~~~~~~ compilation terminated.
s988643664
p04045
C++
#include<iostream> #include<stdio.h> //#include <bits/stdc++.h> #include<vector> #include<float.h> #include<iomanip> #include<algorithm> #include<string> #include<cstring> #include<math.h> #include<cmath> #include<sstream> #include<set> #include<map> #include<queue> #include<cassert> #include<cmath> #include<cstdint> ...
a.cc:51:15: error: empty character constant 51 | char mi = '', ma; | ^~ a.cc:59:18: error: empty character constant 59 | if(mi == '')mi = (char)(i + '0'); | ^~
s861338269
p04045
C++
#include <bits/stdc++.h> #define ll long long using namespace std; string to_string(int i){ string S; while(i){ int d = i%10; i /= 10; S += d+'0'; } reverse(S.begin(), S.end()); return S; } int main(){ ios_base::sync_with_stdio(false); cin.ti...
a.cc: In function 'int main()': a.cc:32:25: error: call of overloaded 'to_string(int&)' is ambiguous 32 | string S = to_string(i); | ~~~~~~~~~^~~ a.cc:4:8: note: candidate: 'std::string to_string(int)' 4 | string to_string(int i){ | ^~~~~~~~~ In file included from /usr/inclu...
s653443172
p04045
C++
class Solution{ public: int handMoney(int N, const vector<bool>& dislikes){ int smallestlike = 0; for(;dislikes[smallestlike];smallestlike ++); vector<int> num; while(N) num.push_back(N % 10), N /= 10; int carry = 0; for(int i = 0; i < num.size(); i ++){ ...
a.cc:4:32: error: 'vector' does not name a type 4 | int handMoney(int N, const vector<bool>& dislikes){ | ^~~~~~ a.cc:4:38: error: expected ',' or '...' before '<' token 4 | int handMoney(int N, const vector<bool>& dislikes){ | ...
s882670977
p04045
Java
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class MainC { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int cost = scanner.nextInt(); int numDigits = scanner.nextInt(); boolean[] ba...
Main.java:6: error: class MainC is public, should be declared in a file named MainC.java public class MainC { ^ 1 error
s702820029
p04045
C++
#include <iostream> using namespace std; int invalidDigit[10]; int res = 1 << 30; int n; void findMinNumber(int now) { if (now >= n) { res = fminl(now, res); return; } for (int i = 0; i < 10; i++) { if (!invalidDigit[i]) { if (now == 0 && i == 0) { continue; } findMinNumber(10 * now + ...
a.cc: In function 'void findMinNumber(int)': a.cc:13:23: error: 'fminl' was not declared in this scope 13 | res = fminl(now, res); | ^~~~~
s597335831
p04045
C++
#include <iostream> #include <vector> #include <math.h> using namespace std; vector<int > leftRange; vector<int > GetNumberInDigits(int n) { vector<int > res; while (n) { int d = n % 10; res.push_back(d); n /= 10; } reverse(res.begin(), res.end()); return res; } bool IsNumberPresentInArray(int n, vector...
a.cc: In function 'std::vector<int> GetNumberInDigits(int)': a.cc:18:9: error: 'reverse' was not declared in this scope 18 | reverse(res.begin(), res.end()); | ^~~~~~~ a.cc: In function 'int GetNextLargerNumber(std::vector<int>, std::vector<int>)': a.cc:123:19: error: 'INT_MAX' was not declared...
s944888637
p04045
C++
#include <iostream> #include <vector> #include <math.h> using namespace std; vector<int > leftRange; vector<int > GetNumberInDigits(int n) { vector<int > res; while (n) { int d = n % 10; res.push_back(d); n /= 10; } reverse(res.begin(), res.end()); return res; } bool IsNumberPresentInArray(int n, vector...
a.cc: In function 'std::vector<int> GetNumberInDigits(int)': a.cc:18:9: error: 'reverse' was not declared in this scope 18 | reverse(res.begin(), res.end()); | ^~~~~~~ a.cc: In function 'int GetNextLargerNumber(std::vector<int>, std::vector<int>)': a.cc:123:19: error: 'INT_MAX' was not declared...
s053565694
p04045
C++
#include <iostream> #include <vector> using namespace std; vector<int > leftRange; vector<int > GetNumberInDigits(int n) { vector<int > res; while (n) { int d = n % 10; res.push_back(d); n /= 10; } reverse(res.begin(), res.end()); return res; } bool IsNumberPresentInArray(int n, vector<int > digits) { ...
a.cc: In function 'std::vector<int> GetNumberInDigits(int)': a.cc:17:9: error: 'reverse' was not declared in this scope 17 | reverse(res.begin(), res.end()); | ^~~~~~~ a.cc: In function 'int GetNextLargerNumber(std::vector<int>, std::vector<int>)': a.cc:131:9: error: 'reverse' was not declared ...
s124744819
p04045
C++
#include<bits/stdc++.h> #define ll long long using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n,k; cin>>n>>k; int d[10]; memset(d,0,sizeof(d)); for(int i=0;i<k;i++) { int x; cin>>x; d[x]=1; } for(int i=n;i<=10000;i++) {...
a.cc: In function 'int main()': a.cc:31:16: error: 't' was not declared in this scope 31 | if(t[i]>0 && d[i]>0) | ^
s755357554
p04045
C
#include<stdio.h> int search(int d,int arr,int k){ int i,flag=0; for(i=0;i<k;i++){ if(d==arr[i]){ flag=1; break; } } return flag; } int main(){ int n,k; scanf("%d %d\n",&n,&k); int m=1,d,i; int arr[k]; for(i=0;i<k;i++){ scanf("%d ",&arr[i]); } while(m!=0){ while(n!=0){ ...
main.c: In function 'search': main.c:5:14: error: subscripted value is neither array nor pointer nor vector 5 | if(d==arr[i]){ | ^ main.c: In function 'main': main.c:23:19: error: passing argument 2 of 'search' makes integer from pointer without a cast [-Wint-conversion] 23 | m= sear...
s818912413
p04045
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin>>s; int k; cin>>k; bool n[10]; int index; for(int i=0;i<k;i++){ cin>>index; n[index]=true; } int min; for(index =0;index<10;index++){ if(n...
a.cc: In function 'int main()': a.cc:21:25: error: request for member 'length' in 'n', which is of non-class type 'bool [10]' 21 | for(int i=0;i<n.length();i++){ | ^~~~~~
s119544285
p04045
C++
#include<bits/stdc++.h> using namespace std; int main(){ string n; cin>>n; int k; cin>>k; bool n[10]; int index; for(int i=0;i<k;i++){ cin>>index; n[index]=true; } int min; for(index =0;index<10;index++){ if(n[index]==false){ min = index; break; ...
a.cc: In function 'int main()': a.cc:8:14: error: conflicting declaration 'bool n [10]' 8 | bool n[10]; | ^ a.cc:4:16: note: previous declaration as 'std::string n' 4 | string n; | ^ a.cc:22:14: error: 's' was not declared in this scope 22 | if(...
s018873948
p04045
C
#include <stdio.h> int main(void){ int N,K,i,k,l; int j=0,flag=0; scanf("%d %d",&N,&K); int A[K]; for(i=0;i<K;i++){ scanf("%d",&A[i]); } int D[5]; for(i=N;i<10000;i++){ num=i; while(num){ dig = num % 10; D[j]=dig; num = num / 10; j++; } ...
main.c: In function 'main': main.c:14:9: error: 'num' undeclared (first use in this function) 14 | num=i; | ^~~ main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in main.c:16:17: error: 'dig' undeclared (first use in this function) 16 | ...