submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s285696329
p00109
C++
#include <iostream> #include <string> using namespace std; string str; int p; int exp(); int factor(); int term(); int factor() { int num=0; while('0' <= str[p] && str[p] <= '9') { num*=10; num += str[p] - '0'; p++; } else if (str[p] == '('){ p++; num = exp(); } if(str[p] == ')') p++...
a.cc: In function 'int factor()': a.cc:19:3: error: 'else' without a previous 'if' 19 | else if (str[p] == '('){ | ^~~~
s021349635
p00109
C++
#include <string> #include <cctype> #include <iostream> typedef std::string::const_iterator State; class ParseError {}; int number(State &begin){ int ret = 0; while(isdigit(*begin)){ ret *= 10; ret += *begin - '0'; begin++; } return ret; } int factor(State &begin){ if(*begin == '('){ begin++; int ret...
a.cc: In function 'int factor(State&)': a.cc:22:27: error: 'expression' was not declared in this scope 22 | int ret = expression(begin); | ^~~~~~~~~~ a.cc:27:1: warning: control reaches end of non-void function [-Wreturn-type] 27 | } | ^
s857084012
p00109
C++
//https://gist.github.com/draftcode/1357281 #include <string> #include <cctype> #include <iostream> typedef std::string::iterator State; class ParseError {}; int number(State &begin); int factor(State &begin); int term(State &begin); int expression(State &begin); void consume(State &begin, char expected){ if(*begin =...
a.cc: In function 'int factor(State&)': a.cc:64:16: error: 'ret' was not declared in this scope 64 | return ret; | ^~~
s822692131
p00109
C++
#include <string> #include <cctype> #include <iostream> typedef std::string::iterator State; using namespace std; int number(State &begin); int factor(State &begin); int term(State &begin); int expression(State &begin); int main(void){ int N; std::cin >> N; while(N--){ std::string s; std::cin>>s; ...
/usr/bin/ld: /tmp/ccIYM2x6.o: in function `expression(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&)': a.cc:(.text+0x1c7): undefined reference to `term(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, st...
s204166457
p00109
C++
#include <iostream> using namespace std; int hyoka(string); int isNum(int); int main(){ int n,i; string s; cin>>n; for(i=0;i<n;i++){ cin>>s; cout<<hyoka(s)<<endl; } return 0; } int hyoka(string s){ long int total=0,work=0; long int tmp1,tmp2; int oi=0; char oc; int n; string cs; if(isNum(s[o...
a.cc: In function 'int hyoka(std::string)': a.cc:43:16: error: expected '(' before '{' token 43 | while{ | ^ | ( a.cc:43:16: error: expected primary-expression before '{' token a.cc:43:16: error: expected ')' before '{' token 43 | while{ | ...
s322881778
p00109
C++
#include <iostream> using namespace std; int hyoka(string); int isNum(int); int main(){ int n,i; string s; cin>>n; for(i=0;i<n;i++){ cin>>s; cout<<hyoka(s)<<endl; } return 0; } long int hyoka(string s){ long int total=0,work=0; long int tmp1,tmp2; int oi=0; char oc; int n; string cs; if(isNu...
a.cc:21:10: error: ambiguating new declaration of 'long int hyoka(std::string)' 21 | long int hyoka(string s){ | ^~~~~ a.cc:4:5: note: old declaration 'int hyoka(std::string)' 4 | int hyoka(string); | ^~~~~
s985319249
p00109
C++
#include <iostream> #include <string> using namespace std; // const string S = "(1+1)*2"; string S; int cur = 0; int digit(); int number(); int factor(); int term(); int _term(int m); int exp(); int _exp(int m); int parse(); bool isdigit(char); bool is_plu_min(char); bool is_tim_div(char); int main() { int N; cin >...
a.cc: In function 'int parse()': a.cc:106:16: error: expected '}' at end of input 106 | return exp(); | ^ a.cc:105:13: note: to match this '{' 105 | int parse() { | ^
s090767415
p00109
C++
#include <string> #include <vector> #include <iostream> using namespace std; string S; int n, junjo[4] = { 0, 0, 1, 1 }; long long calc(int L,int R){ int K=0; vector<int>junjo2[4]; for(int i=0;i<4;i++){ junjo2[junjo[i]].push_back(i); } for(int i=0;i<4;i++){ if(junjo2[i].size()>=1){ ...
a.cc: In function 'int main()': a.cc:47:43: error: 's' was not declared in this scope 47 | for(int i = 0; i < n; i++) cin >> s, printf("%d\n", calc(0, s.size() - 1)); | ^
s308864975
p00109
C++
#include <bits/stdc++.h> using namespace std ; #define pb(n) push_back(n) #define fi first #define se second #define all(r) (r).begin(),(r).end() #define gsort(st,en) sort((st),(en),greater<int>()) #define vmax(ary) *max_element(all(ary)) #define vmin(ary) *min_element(all(ary)) #define debug(x) cout<<#x<<": "<<x<<end...
a.cc: In function 'int Str(const char*, const char*, const char*)': a.cc:87:20: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 87 | if((temp = strstr(str,tar)) == NULL){ | ~~~~~~^~~~~~~~~ | | | const char*
s571554980
p00109
C++
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> #include<string.h> #include<math.h> #include<time.h> const char symbollist[] = "+-*/()$;" ;//?????????????????? char SymbolJudge(char c, const char* str)//?????????????????¢??° { for(size_t i = 0; str[i] != '\0'; ++i ) { if( c == str[i]) { retur...
a.cc: In function 'int Str(const char*, const char*, const char*)': a.cc:37:20: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] 37 | if((temp = strstr(str,tar)) == NULL){ | ~~~~~~^~~~~~~~~ | | | const char*
s709427072
p00109
C++
#include <iostream> #include <cmath> #include <stack> #include <algorithm> #include <sstream> using namespace std; int hoge(string a) { if(a=="(")return -1; if(a=="*"||a=="/")return 1; return 0; } long long calc(long long a,long long b,string str) { if(str=="+")return a+b; if(str=="-")return a-b; if(str=="/")ret...
a.cc: In function 'int main()': a.cc:36:17: error: 'vector' was not declared in this scope 36 | vector<string> v; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <sstream> +++ |+#in...
s245811190
p00109
C++
#include <iostream> #include <cmath> #include <stack> #include <algorithm> #include <sstream> using namespace std; int hoge(string a) { if(a=="(")return -1; if(a=="*"||a=="/")return 1; return 0; } long long calc(long long a,long long b,string str) { if(str=="+")return a+b; if(str=="-")return a-b; if(str=="/")ret...
a.cc: In function 'int main()': a.cc:38:17: error: 'vector' was not declared in this scope 38 | vector<string> v; | ^~~~~~ a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 5 | #include <sstream> +++ |+#in...
s706093696
p00109
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstdlib> #include <cmath> #include <vector> #include <ctime> #include <string> #include <map> #include <stack> #include <queue> #include <complex> #include <cctype> #include <cassert> using namespace std; int n; string str; int cur; int digit(){ ...
a.cc:64:24: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 64 | if (S[cur] != ???(???) return number(); a.cc:64:28: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] In file included from /usr/include/c++/14/cassert:44, from a.cc:15: a.cc: In functi...
s910171402
p00109
C++
#include <iostream> #include <string> #include <cctype> using namespace std; int cur; string s; int digit() { return ( s[cur++] - '0' ); } int number() { int n = digit(); while ( isdigit( s[cur] ) ) n = n * 10 + digit(); return n; } int factor() { int n; if ( s[cur] == '(' ) { cur++; n = expression(); ...
a.cc: In function 'int factor()': a.cc:24:21: error: 'expression' was not declared in this scope 24 | n = expression(); | ^~~~~~~~~~
s004840331
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 100 | cout << expressin(str.begin()) << endl; ...
s478572204
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 100 | cout << expressin(str.begin()) << endl; ...
s250581815
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 100 | cout << expressin(str.begin()) << endl; ...
s113251590
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 100 | cout << expressin(str.begin()) << endl; ...
s902029658
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(const State &begin); int number(const State &begin); int term(const State &begin); int expressin(const State &begin); int factor(const S...
a.cc: In function 'int factor(const State&)': a.cc:22:22: error: passing 'const State' {aka 'const std::__cxx11::basic_string<char>::const_iterator'} as 'this' argument discards qualifiers [-fpermissive] 22 | begin++; | ^~ In file included from /usr/include/c++/14/string:48...
s234691665
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::const_iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 100 | cout << expressin(str.begin()) << endl; ...
s401709693
p00109
C++
#include <iostream> #include <string> #include <map> #include <algorithm> #include <cctype> using namespace std; typedef string::iterator State; int n; string str; int factor(State &begin); int number(State &begin); int term(State &begin); int expressin(State &begin); int factor(State &begin) { int ret; if (*begin...
a.cc: In function 'int main()': a.cc:100:44: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::iterator&'} to an rvalue of type 'std::__cxx11::basic_string<char>::iterator' 100 | cout << expressin(str.begin()) << endl; | ...
s614563773
p00109
C++
n=int(input()) for i in range(n): a=input() b="" for i in a: b+=i if i=='/':b+='/' print(int(eval(b[:len(b)-1])))
a.cc:1:1: error: 'n' does not name a type 1 | n=int(input()) | ^
s052421474
p00109
C++
import re class c: def __str__(self): return str(self.x) def __init__(self,value): self.x=value def __add__(self,value): return c(self.x+value.x) def __sub__(self,value): return c(self.x-value.x) def __mul__(self,value): return c(self.x*value.x) def __truediv__(self,value): return c(int(self.x/value.x...
a.cc:18:19: warning: unknown escape sequence: '\d' 18 | s=re.sub(r'(\d+)',r'c(\1)',s) | ^~~~~~~ a.cc:18:19: warning: multi-character character constant [-Wmultichar] a.cc:18:28: warning: multi-character character constant [-Wmultichar] 18 | s=re.sub(r'(\d+)',r'c(\1)',s) ...
s223041670
p00109
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <numeric> #include <list> #include <assert.h> #include <math.h> #include <valarray> #include <stdio.h> #incl...
a.cc:33:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 33 | int ???(string& s, int& i); a.cc:34:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs] 34 | int ???(string& s, int& i); a.cc:35:10: error: extended character ° is not valid in an identifier 35 | int ????...
s110555274
p00109
C++
# -*- coding: utf-8 -*- num = int(raw_input()) for i in range(num): input_line = raw_input() eval_line = input_line[0:-1] result = eval(eval_line) print result
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:3:1: error: 'num' does not name a type; did you mean 'enum'? 3 | num = int(raw_input()) | ^~~ | enum
s842918732
p00109
C++
#include <iostream> int main() { cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 5 | cout << endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to ...
s474756150
p00109
C++
#include <iostream> int main() { std::cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 5 | std::cout << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/ostream:744:5: n...
s339105678
p00109
C++
#include <iostream> #include <string> #include <string.h> #include <queue> #include <vector> #include <cctype> using namespace std; typedef string::const_iterator State; int expression(State &begin); int number(State &begin) { int ret = 0; for (; isdigit(*begin);) { ret *= 10; ret += *begin - '0'; begin++; ...
a.cc: In function 'int main()': a.cc:70:45: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 70 | cout << expression(str.begin()) << endl; ...
s162274023
p00109
C++
#include <iostream> #include <string> #include <string.h> #include <queue> #include <vector> #include <cctype> using namespace std; typedef string::const_iterator State; int expression(State &begin); int number(State &begin) { int ret = 0; for (; isdigit(*begin);) { ret *= 10; ret += *begin - '0'; begin++; ...
a.cc: In function 'int main()': a.cc:70:45: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 70 | cout << expression(str.begin()) << endl; ...
s865205484
p00109
C++
#include <iostream> #include <string> #include <queue> #include <vector> #include <cctype> using namespace std; typedef string::const_iterator State; int expression(State &begin); int number(State &begin) { int ret = 0; for (; isdigit(*begin);) { ret *= 10; ret += *begin - '0'; begin++; } return ret; } int...
a.cc: In function 'int main()': a.cc:69:45: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 69 | cout << expression(str.begin()) << endl; ...
s457940970
p00109
C++
#include <iostream> #include <string> #include <queue> #include <vector> #include <cctype> using namespace std; typedef string::const_iterator State; int expression(State &begin); int number(State &begin) { int ret = 0; for (; isdigit(*begin);) { ret *= 10; ret += *begin - '0'; begin++; } return ret; } int...
a.cc: In function 'int main()': a.cc:70:45: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 70 | cout << expression(str.begin()) << endl; ...
s516028903
p00109
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'long long int factor(State&)': a.cc:67:19: error: 'expression' was not declared in this scope 67 | int ret = expression(begin); | ^~~~~~~~~~
s860184053
p00109
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'long long int factor(State&)': a.cc:67:19: error: 'expression' was not declared in this scope 67 | int ret = expression(begin); | ^~~~~~~~~~
s410191503
p00109
C++
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> #include <cfloat>...
a.cc: In function 'long long int factor(State&)': a.cc:67:19: error: 'expression' was not declared in this scope 67 | int ret = expression(begin); | ^~~~~~~~~~
s881206622
p00109
C++
#include <iostream> #include <string> #include <stack> #include <map> #include <cstdlib> #include <cctype> #include <cstdio> #include <cstring> using namespace std; int str2arr(char s[], string A[]) { bool flag = true; string t; int l = strlen(s); int i, n = 0; for (i = 0; i < l; i++) { if...
a.cc: In function 'int main()': a.cc:119:10: error: 'i' was not declared in this scope 119 | for (i = 0; i < n; i++) { | ^
s913078719
p00109
C++
#include <iostream> #include <string> #include <stack> #include <map> #include <cstdlib> #include <cctype> #include <cstdio> #include <cstring> using namespace std; int str2arr(char s[], string A[]) { bool flag = true; string t; int l = strlen(s); int n = 0; for (i = 0; i < l; i++) { if (i...
a.cc: In function 'int str2arr(char*, std::string*)': a.cc:17:10: error: 'i' was not declared in this scope 17 | for (i = 0; i < l; i++) { | ^
s775474959
p00109
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<typeinfo> #define loop(i,a,b) for(int i=a;i<b;i++) #...
a.cc: In function 'int main()': a.cc:101:37: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout<<expr(s,s.begin())<<endl; | ...
s872518123
p00109
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<typeinfo> #define loop(i,a,b) for(int i=a;i<b;i++) #...
a.cc: In function 'int main()': a.cc:101:37: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout<<expr(s,s.begin())<<endl; | ...
s957316791
p00109
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<typeinfo> #define loop(i,a,b) for(int i=a;i<b;i++) #...
a.cc: In function 'int main()': a.cc:101:37: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout<<expr(s,s.begin())<<endl; | ...
s807550558
p00109
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<typeinfo> #define loop(i,a,b) for(int i=a;i<b;i++) #...
a.cc: In function 'int main()': a.cc:101:37: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout<<expr(s,s.begin())<<endl; | ...
s168273842
p00109
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<typeinfo> #define loop(i,a,b) for(int i=a;i<b;i++) #...
a.cc: In function 'int main()': a.cc:101:35: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 101 | cout<<expr(s.begin())<<endl; | ...
s912329738
p00109
C++
#include "bits/stdc++.h" #define int long long #define range(i, a, b) for(int i = a; i < b; i++) #define rep(i, a) range(i, 0, a) #define all(a) (a).begin(),(a).end() using namespace std; const int MOD = 1e9 + 7, INF = 1e17; using vi = vector <int>; using vvi = vector <vi>; //g++ -std==c++14 int expr(const char **); ...
cc1plus: error: '::main' must return 'int'
s355777551
p00109
C++
#include <bits/stdc++.h> #define int long long #define range(i, a, b) for(int i = a; i < b; i++) #define rep(i, a) range(i, 0, a) #define all(a) (a).begin(),(a).end() using namespace std; const int MOD = 1e9 + 7, INF = 1e17; using vi = vector <int>; using vvi = vector <vi>; //g++ -std==c++14 int expr(const char **); ...
cc1plus: error: '::main' must return 'int'
s117906524
p00109
C++
package practice; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Queue; public class Main { private static final int BIG_NUM = 2000000000; private static final int MOD = 1000000007; private static char[] line; public ...
a.cc:1:1: error: 'package' does not name a type 1 | package practice; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.io.BufferedReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import j...
s274916005
p00109
C++
package practice; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Queue; public class Main { private static final int BIG_NUM = 2000000000; private static final int MOD = 1000000007; private static char[] line; public ...
a.cc:1:1: error: 'package' does not name a type 1 | package practice; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.io.BufferedReader; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import j...
s164869446
p00109
C++
#include<string> #include<cctype> typedef string::const_iterator State; class Parse Error{}; int main(void){ int N; cin >>N; cin.ignore() for(int i =0; i<N;i++){ string s; getline(cin,s); State begibn =s.begin(); int ans = expression(begin); cout << ans << endl; } return 0; } int numb...
a.cc:3:9: error: 'string' does not name a type; did you mean 'stdin'? 3 | typedef string::const_iterator State; | ^~~~~~ | stdin a.cc:4:13: error: variable 'Parse Error' has initializer but incomplete type 4 | class Parse Error{}; | ^~~~~ a.cc: In function 'int main...
s505937090
p00109
C++
import java.io.*; import java.util.*; public class Main{ public static void main(String args[]){ try{ new Main(); }catch(IOException err){ err.printStackTrace(); } } public Main() throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); List<Integer> ans = new A...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: ...
s596972161
p00109
C++
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <complex> #include <string> #include <vector> #include <list> #include <deque> #include <stack> #include <queue> #include <set> #include <map> #include <bitset> #include <functional> #include <utility> #include <algorithm> #include <n...
a.cc: In function 'int main()': a.cc:107:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 107 | gets(s); | ^~~~ | getw
s671769430
p00109
C++
#include<iostream> #include<string> #include<vector> #include<cstdio> using namespace std; char siki[200]; int cur; int digit(){ int n=siki[cur]-'0'; ++cur; return n; } int number(){ int n=digit(); while(cur<strlen(siki) && isdigit(siki[cur])) n=n*10+digit(); return n; } int factor(); int term()...
a.cc: In function 'int number()': a.cc:20:13: error: 'strlen' was not declared in this scope 20 | while(cur<strlen(siki) && isdigit(siki[cur])) | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<cstdio> ++...
s892032642
p00109
C++
#include <stdio.h> char formula[101]; int p; int additive() { int result = multitive(); while (formula[p] == '+' || formula[p] == '-') if (formula[p++] == '+') result += multitive(); else result -= multitive(); return result; } int multitive() { int result = term(); while (formula[p] ==...
a.cc: In function 'int additive()': a.cc:7:16: error: 'multitive' was not declared in this scope 7 | int result = multitive(); | ^~~~~~~~~ a.cc: In function 'int multitive()': a.cc:17:16: error: 'term' was not declared in this scope 17 | int result = term(); | ^~~~
s510372706
p00109
C++
#include <iostream> #include <string> #include <algorithm> #include <stack> #include <vector> using namespace std; vector<string> toReversePorland(string str){ vector<string> hand; vector<string> side; // ЇŒÊ“àƒtƒ‰ƒO bool isInside = false; for(int i = 0; i < str.size(); i++){ // cout << str[i...
a.cc:149:2: warning: null character(s) ignored 149 | }<U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000>...
s794262752
p00109
C++
#include <iostream> #include <string> #include <algorithm> #include <stack> #include <vector> using namespace std; vector<string> toReversePorland(string str){ vector<string> hand; vector<string> side; for(int i = 0; i < str.size(); i++){ if(str[i] == ' ') continue; else if(str[i] == '=') ...
a.cc:152:2: warning: null character(s) ignored 152 | }<U+0000><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D>...
s983289274
p00109
C++
#include <iostream> #include <string> #include <algorithm> #include <stack> #include <vector> using namespace std; vector<string> toReversePorland(string str){ vector<string> hand; vector<string> side; for(int i = 0; i < str.size(); i++){ if(str[i] == ' ') continue; else if(str[i] == '=') ...
a.cc:152:2: warning: null character(s) ignored 152 | }<U+0000><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D>...
s659200758
p00109
C++
#include <algorithm> #include <stack> #include <vector> using namespace std; vector<string> toReversePorland(string str){ vector<string> hand; vector<string> side; for(int i = 0; i < str.size(); i++){ if(str[i] == ' ') continue; else if(str[i] == '=') break; if(str[i] >= '0' && str[i...
a.cc:150:2: warning: null character(s) ignored 150 | }<U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000><U+0000><U+001D><U+0000><U+0000>...
s302150745
p00109
C++
using namespace std; string its(int n){ stringstream s; s<<n; return s.str(); } stack<string> mep(stack<string> me,string s){ int a,b; b=atoi(me.top().c_str()); me.pop(); a=atoi(me.top().c_str()); me.pop(); if(s=="+") me.push(its(a+b)); else if(s=="-") me.push(its(a-b)); else if(s=="*") ...
a.cc:2:1: error: 'string' does not name a type 2 | string its(int n){ | ^~~~~~ a.cc:7:1: error: 'stack' does not name a type 7 | stack<string> mep(stack<string> me,string s){ | ^~~~~ a.cc: In function 'int main()': a.cc:26:3: error: 'string' was not declared in this scope 26 | string s; |...
s707370972
p00109
C++
#include<iostream> #include<cstdlib> using namespace std; typedef pair<int,const char*>parsed; parsed expr(const char *p); parsed term(const char *p); parsed fact(const char *p); parsed expr(const char *p){ parsed r=term(p); while(*r.second=='+'||*r.second=='-'){ char op =*r.second; int tmp=r.first; r=te...
a.cc:43:5: error: expected constructor, destructor, or type conversion before '(' token 43 | main(n){ | ^
s995407977
p00109
C++
#include<iostream> #include<cctype> typedef string::const_iterator State; class ParseError{}; int expression(State &begin); int term(State &begin); int factor(State &begin); int number(State &begin); int main(void){ int N; cin >> N; cin.ignore(); for(int i=0;i<N;i++){ string s; getline(cin,s); ...
a.cc:3:9: error: 'string' does not name a type; did you mean 'stdin'? 3 | typedef string::const_iterator State; | ^~~~~~ | stdin a.cc:6:16: error: 'State' was not declared in this scope 6 | int expression(State &begin); | ^~~~~ a.cc:6:23: error: 'begin' was not d...
s426396859
p00109
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <cassert> #include <iostream> #include <cctype> #include <sstream> #include <string> #include <list> #include <vector> #include <queue> #include <set> #include <stack> #include <map> #include <utility> #include <numeric> ...
a.cc: In function 'int main()': a.cc:136:55: error: cannot bind non-const lvalue reference of type 'CalcExpression::State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'CalcExpression::State' {aka 'std::__cxx11::basic_string<char>::const_iterator'} 136 | cout << ce.e...
s017650765
p00109
C++
#include <iostream> using namespace std; char str[120]; int calc2(char *eq){ int c=0,num[100]={0}, sign[100]={0}; char *p = eq; while(*p){ if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0'; else{ if(*p=='+') sign[c]=1; else if(*p=='-') sign[c]=2; else if(*p=='*') sign[c]=3; else if(*p=='/') sign[c]=4; ...
a.cc: In function 'int calc(char*)': a.cc:53:9: error: 'strcpy' was not declared in this scope 53 | strcpy(cp, eq); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s705952352
p00109
C++
#include <iostream> using namespace std; char str[120]; int calc2(char *eq){ int c=0,num[100]={0}, sign[100]={0}; char *p = eq; while(*p){ if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0'; else{ if(*p=='+') sign[c]=1; else if(*p=='-') sign[c]=2; else if(*p=='*') sign[c]=3; else if(*p=='/') sign[c]=4; ...
a.cc: In function 'int calc(char*)': a.cc:52:9: error: 'strcpy' was not declared in this scope 52 | strcpy(cp, eq); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s674376319
p00109
C++
#include <iostream> using namespace std; int calc2(char *eq){ int c=0,num[100]={0}, sign[100]={0}; char *p = eq; while(*p){ if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0'; else{ if(*p=='+') sign[c]=1; else if(*p=='-') sign[c]=2; else if(*p=='*') sign[c]=3; else if(*p=='/') sign[c]=4; else if(*p==...
a.cc: In function 'int calc(char*)': a.cc:51:9: error: 'strcpy' was not declared in this scope 51 | strcpy(cp, eq); | ^~~~~~ a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> ...
s274687164
p00109
C++
#include <iostream> #include <string.h> using namespace std; long calc2(char *eq){ long c=0,num[100]={0}, sign[100]={0}; char *p = eq; while(*p){ if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0'; else{ if(*p=='+') sign[c]=1; else if(*p=='-') sign[c]=2; else if(*p=='*') sign[c]=3; else if(*p=='/') sign...
cc1plus: error: '::main' must return 'int'
s508866812
p00109
C++
#include <iostream> #include <string.h> using namespace std; double calc2(char *eq){ long c=0, sign[100]={0}; double num[100]={0}; char *p = eq; while(*p){ if('0'<=*p && *p<='9') num[c]=num[c]*10+*p-'0'; else{ if(*p=='+') sign[c]=1; else if(*p=='-') sign[c]=2; else if(*p=='*') sign[c]=3; else if(*p...
a.cc:50:1: error: '__int64' does not name a type; did you mean '__int64_t'? 50 | __int64 calc(char *eq){ | ^~~~~~~ | __int64_t a.cc: In function 'int main()': a.cc:76:25: error: 'calc' was not declared in this scope; did you mean 'calc2'? 76 | cout << calc(buf) <<endl; | ...
s579860077
p00109
C++
#include<isotream> #include<string> #include<sstream> using namespace std; ll stol(string s){ stringstream ss(s); ll n; ss >> n; return n; } ll parse(int l, int r){ int n = 0,i; for(i=r-1;i>=l;i--){ if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; if(!n){ if(s[i] == ‘+’)return parse(l,i)+parse(i+1,...
a.cc:1:9: fatal error: isotream: No such file or directory 1 | #include<isotream> | ^~~~~~~~~~ compilation terminated.
s986475348
p00109
C++
#include<iostream> #include<string> #include<sstream> using namespace std; ll stol(string s){ stringstream ss(s); ll n; ss >> n; return n; } ll parse(int l, int r){ int n = 0,i; for(i=r-1;i>=l;i--){ if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; if(!n){ if(s[i] == ‘+’)return parse(l,i)+parse(i+1,r...
a.cc:16:16: error: extended character ‘ is not valid in an identifier 16 | if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; | ^ a.cc:16:18: error: extended character ‘ is not valid in an identifier 16 | if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; | ^ a.cc:16:37: error: ext...
s953865704
p00109
C++
#include<iostream> #include<string> #include<sstream> using namespace std; typedef long long ll; ll stol(string s){ stringstream ss(s); ll n; ss >> n; return n; } ll parse(int l, int r){ int n = 0,i; for(i=r-1;i>=l;i--){ if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; if(!n){ if(s[i] == ‘+’)return...
a.cc:18:16: error: extended character ‘ is not valid in an identifier 18 | if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; | ^ a.cc:18:18: error: extended character ‘ is not valid in an identifier 18 | if(s[i] == ‘)‘)n++; if(s[i] == ‘(’)n--; | ^ a.cc:18:37: error: ext...
s785502016
p00109
C++
#include<iostream> #include<string> #include<sstream> using namespace std; typedef long long ll; string s; ll stol(string str){ stringstream ss(str); ll n; ss >> n; return n; } ll parse(int l, int r){ int num = 0, i; for(int i=r-1;i>=l;i--){ if(s[i] == ')')n++; if(s[i] == '(')n--; if(!n){ ...
a.cc: In function 'll parse(int, int)': a.cc:20:20: error: 'n' was not declared in this scope 20 | if(s[i] == ')')n++; | ^ a.cc:21:20: error: 'n' was not declared in this scope 21 | if(s[i] == '(')n--; | ^ a.cc:22:9: error: 'n' was not declared in this sco...
s897167227
p00109
C++
n=gets.to_i;n.times{puts eval gets[0..-3]}
a.cc:1:36: error: too many decimal points in number 1 | n=gets.to_i;n.times{puts eval gets[0..-3]} | ^~~ a.cc:1:1: error: 'n' does not name a type 1 | n=gets.to_i;n.times{puts eval gets[0..-3]} | ^ a.cc:1:13: error: 'n' does not name a type 1 | n=gets.to_i;n.ti...
s662591959
p00109
C++
n=gets.to_i;n.times{puts eval gets.strip[0..-2]}
a.cc:1:42: error: too many decimal points in number 1 | n=gets.to_i;n.times{puts eval gets.strip[0..-2]} | ^~~ a.cc:1:1: error: 'n' does not name a type 1 | n=gets.to_i;n.times{puts eval gets.strip[0..-2]} | ^ a.cc:1:13: error: 'n' does not name a type 1 ...
s936235041
p00109
C++
#include <iostream> #include <stack> using namespace std; int pri(char ch) { if (ch == '*' || ch == '/') return 2; if (ch == '+' || ch == '-') return 1; else return 0; } int main() { int n; cin >> n; while (n--) { string exp, cha; stack<char> pol; ...
a.cc: In function 'int main()': a.cc:103:6: error: expected '}' at end of input 103 | } | ^ a.cc:17:1: note: to match this '{' 17 | { | ^
s379622777
p00109
C++
#include <string> #include <cstring> #include <cctype> #include <iostream> using namespace std; class ParseError {}; int exp(char* & p); int num(char* & p) { int ret = 0; while (isdigit(*p)) { ret *= 10; ret += *p - '0'; p++; } return ret; } int fac(char* & p) { int ret = ...
a.cc: In function 'int main()': a.cc:76:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 76 | while(gets(str)) | ^~~~ | getw
s716163478
p00109
C++
#include <string> #include <cstring> #include <cctype> #include <iostream> using namespace std; int exp(char* & p); int num(char* & p) { int ret = 0; while (isdigit(*p)) { ret *= 10; ret += *p - '0'; p++; } return ret; } int fac(char* & p) { int ret = 0; if (*p == '(')...
a.cc: In function 'int main()': a.cc:75:11: error: 'gets' was not declared in this scope; did you mean 'getw'? 75 | while(gets(str)) | ^~~~ | getw
s946702227
p00109
C++
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <cmath> using namespace std; typedef string::const_iterator iter; int expr(iter &p); int term(iter& p); int factor(iter& p); int number(iter& p); int expr(iter& p) { int r = term(p); while(true) { if(*p == '+') { ...
a.cc:85:1: error: 's' does not name a type 85 | s | ^
s419462607
p00109
C++
for t in xrange(input()): print eval(raw_input()[:-1])
a.cc:1:1: error: expected unqualified-id before 'for' 1 | for t in xrange(input()): | ^~~
s077994781
p00109
C++
#include<iostream> #include<vector> #include<string> #include<sstream> #include<algorithm> std::string find(std::vector<std::string>&v, long long a, bool b){ std::string res; if (b){ for (long long i = a - 1; i >= 0; i--){ if (v[i] != "T"){ res = v[i]; v[i] = "T"; break; } } } if (!b){ f...
a.cc:34:18: error: expected initializer before 'long' 34 | long long tolong long(std::string str){ | ^~~~ a.cc: In function 'std::string keisan(std::string, std::string, long long int)': a.cc:62:13: error: 'tolong' was not declared in this scope; did you mean 'ulong'? 62 | a = tolon...
s695202675
p00110
Java
import java.util.*; import java.math.*; public class M0110 { public static void main(String[] args) { new M0110().run(); } void run() { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { String line = sc.nextLine(); int plusPos = line.indexOf('+'); ...
Main.java:4: error: class M0110 is public, should be declared in a file named M0110.java public class M0110 { ^ 1 error
s855258964
p00110
Java
while True: try: string = raw_input() except EOFError: break for i in range(10): translated = string.replace("X", str(i)) left,right = translated.split("=") right = int(right) first,second = map(int,left.split("+")) if first + second == right: ...
Main.java:1: error: class, interface, enum, or record expected while True: ^ 1 error
s630986880
p00110
Java
import java.math.BigInteger; import java.util.Scanner; public class Main{ //????????????X?????????????????°?????????????????? static String assignX(String str, int attempt){ char[] chars = new char[str.length()]; //????????????ASC?????§????????????X?????????????????°???????????´?????? for(int iChar = 0...
Main.java:70: error: variable answerX might not have been initialized int answerX = alphametic.searchRightX(str, answerX); ^ 1 error
s440733109
p00110
Java
import java.util.*;class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){int n=10;l:for(String b=s.next();n-->0;){for(String p:(a=b.replaceAll("X",""+n).split("[\\+=]")))if(p.startsWith("0"))continue l;if(new Long(a[0])+new Long(a[1])==new Long(a[2]))break;}System.out.println(...
Main.java:1: error: class, interface, enum, or record expected import java.util.*;class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){int n=10;l:for(String b=s.next();n-->0;){for(String p:(a=b.replaceAll("X",""+n).split("[\\+=]")))if(p.startsWith("0"))continue l;if(new Long(...
s263400531
p00110
Java
import java.util.Scanner; //Alphametic public class AOJ0110 { static char[] s; static int id; static boolean exp(){ int a = fact(); if(a==-1)return false; while(true){ char c = s[id++]; if(c=='=')break; int x = fact(); if(x==-1)return false; a+=x; } int b = fact(); if(b==-1)return fals...
Main.java:4: error: class AOJ0110 is public, should be declared in a file named AOJ0110.java public class AOJ0110 { ^ 1 error
s800135268
p00110
Java
import java.util.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class P0110 { int INF = 1 << 28; void run() { Scanner sc = new Scanner(System.in); for(;sc.hasNext();) { String formula = sc.next(); String[] str = formula.split("[ + = ]"); boolean f = true; for(String s:...
Main.java:6: error: class P0110 is public, should be declared in a file named P0110.java public class P0110 { ^ 1 error
s306094024
p00110
Java
import java.util.*; class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); String out = ""; char[] cs = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; while (scanner.hasNext()) { String line = scanner.nextLine(); out += "NA\n"; continue; Stri...
Main.java:12: error: unreachable statement String[] works1 = line.split("="); ^ 1 error
s697348416
p00110
C
#define _CRT_SECURE_NO_WARNINGS //#define _USE_MATH_DEFINES #include<stdio.h> #include<stdlib.h> //#include<math.h> #include<string.h> //#include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) void Xtoi (char*, int); int cnt; int main() { char f[127], s[127], sum[127]; char tf[127],ts[127],tsum[127]; int i...
main.c: In function 'main': main.c:16:88: warning: comparison between pointer and integer 16 | while (~fscanf(stdin, "%[0123456789X]+%[0123456789X]=%[0123456789X]", f,s,sum) != NULL) { | ^~ /usr/bin/ld: /tmp/ccLT0FOT...
s091396493
p00110
C
char*p,E0[128],E1[128],da[128],db[128],dc[128],X; C(){ int ia,ib,ic,v; for(v=ia=ib=ic=0;dc[ic];){ if(da[ia]) v+=da[ia++]-'0'; if(db[ib]) v+=db[ib++]-'0'; if(v%10+'0'!=dc[ic++]) return 0; v/=10; } if(v||da[ia]||db[ib]) return 0; return 1; } main(){ for(;~scanf("%[^\n]\n",E0);){ for(X='0';X<='9...
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int] 2 | C(){ | ^ main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int] 17 | main(){ | ^~~~ main.c: In function 'main': main.c:18:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 18 | ...
s888586955
p00110
C
#include<stdio.h> #include<string.h> char*p,E0[128],E1[128],da[128],db[128],dc[128],X; C(){ int ia,ib,ic,v; for(v=ia=ib=ic=0;dc[ic];){ if(da[ia]) v+=da[ia++]-'0'; if(db[ib]) v+=db[ib++]-'0'; if(v%10+'0'!=dc[ic++]) return 0; v/=10; } if(v||da[ia]||db[ib]) return 0; return 1; } main(){ for(;~scan...
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int] 4 | C(){ | ^ main.c:19:1: error: return type defaults to 'int' [-Wimplicit-int] 19 | main(){ | ^~~~ main.c: In function 'main': main.c:28:25: error: implicit declaration of function 'strrev'; did you mean 'strsep'? [-Wimplicit-function...
s254162342
p00110
C
#include<iostream> #include<algorithm> #include<string> #define all(c) c.begin(),c.end() using namespace std; string sum(string a,string b){ int n=max(a.size(),b.size()); for(;a.size()!=b.size();){ if(a.size()<b.size()) a+='0'; else b+='0'; } string s=""; int flag=0; for(int i=0;i<n;i++){ int x=(a[i]-'0...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s470356496
p00110
C++
#include <stdio.h> #include <vector> #include <iostream> #include <math.h> #include <algorithm> #include <cstring> #include <string> using namespace std; typedef long long ll; using vi = vector<int>; string str; string stra; int id = 0; vi number(){ vi res; for (; isdigit(stra[id]); id++) { res.push_back(stra...
a.cc: In function 'int solve()': a.cc:60:21: error: 'c' was not declared in this scope 60 | if (a.size() != c.size()) { | ^
s292947803
p00110
C++
#include<iostream> #include<string> #include<cstring> #include<vector> #include<set> #include<cmath> using namespace std; typedef vector<int> vi; string plus_string(string a,string b) { string c; reverse(a.begin(),a.end()); reverse(b.begin(),b.end()); while(a.size()!=b.size()) { if(a.size()<b.size())...
a.cc: In function 'std::string plus_string(std::string, std::string)': a.cc:13:3: error: 'reverse' was not declared in this scope 13 | reverse(a.begin(),a.end()); | ^~~~~~~
s304985573
p00110
C++
#include <stdio.h> #include <iostream> #include <vector> #include <string> #include <math.h> #include <algorithm> namespace mp = boost::multiprecision; using namespace std; #define INF 0x7FFFFFFF int main(){ string s; cin >> s; mp::cpp_int f=0; while(s.size()){ f=0; for(int i=0;i<10;i++){ strin...
a.cc:7:16: error: 'boost' has not been declared 7 | namespace mp = boost::multiprecision; | ^~~~~ a.cc:7:23: error: 'multiprecision' is not a namespace-name 7 | namespace mp = boost::multiprecision; | ^~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:16:3: erro...
s451036051
p00110
C++
#include <stdio.h> #include <vector> #include <iostream> #include <math.h> #include <algorithm> #include <cstring> #include <string> using namespace std; typedef long long ll; using vi = vector<int>; string str; string stra; int id = 0; vi number(){ vi res; for (;id<(int)str.size() && isdigit(stra[id]); id++) { ...
a.cc: In function 'int solve()': a.cc:80:19: error: 'i' was not declared in this scope 80 | stra[j] = i + '0'; | ^ a.cc:118:14: error: 'i' was not declared in this scope 118 | return i; | ^
s640302404
p00110
C++
#include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <vector> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; vector<string> split(const string &str, char delim) { vector<string> res; size_t current = 0, found; while((found = str.find_first_of(delim, current)) != stri...
a.cc: In function 'std::vector<char> splus(std::string, std::string)': a.cc:27:9: error: 'reverse' was not declared in this scope 27 | reverse(s.begin(),s.end()); | ^~~~~~~
s274791462
p00110
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef tuple<int, int> duo; const int dx[] = {0, 0, 1, -1, 1, 1, -1, -1}; const int dy[] = {1, -1, 0, 0, 1, -1, 1, -1}; const int Mod = 1000000000 + 0; //{{{ templates #define TT_ template<typename T>inline #define TTF_ templ...
a.cc: In function 'int main()': a.cc:55:17: error: 'c' was not declared in this scope; did you mean 'sc'? 55 | if (valid(c)){ | ^ | sc
s252597834
p00110
C++
#include <bits/stdc++.h> using namespace std; long long toLong(string str, int n) { long long res = 0; for (int i = 0; i < str.size(); i++){ if (str[i] != 'X'){ res = res * 10 + str[i] - '0'; } else { if (i == 0) return -1; res = res * 10 + n; } } return res; } int main() { //char A[128], B[128]...
a.cc: In function 'int main()': a.cc:38:92: error: expected primary-expression before ')' token 38 | if (toLong(str[0], i) + toLong(str[1], i) - toLong(str[2], i) == 0)){ | ^
s937274106
p00110
C++
#include <bits/stdc++.h> using namespace std; long long toLong(string str, int n) { long long res = 0; for (int i = 0; i < str.size(); i++){ if (str[i] != 'X'){ res = res * 10 + str[i] - '0'; } else { if (i == 0 && n == 0) return -1; res = res * 10 + n; } } return res; } int main() { //char A[12...
a.cc: In function 'int main()': a.cc:38:92: error: expected primary-expression before ')' token 38 | if (toLong(str[0], i) + toLong(str[1], i) - toLong(str[2], i) == 0)){ | ^
s049932977
p00110
C++
#include <bits/stdc++.h> using namespace std; long long toLong(string str, int n) { long long res = 0; for (int i = 0; i < str.size(); i++){ if (str[i] != 'X'){ res = res * 10 + str[i] - '0'; } else { if (i == 0 && n == 0) return 100; res = res * 10 + n; } } return res; } int main() { //char A[1...
a.cc: In function 'int main()': a.cc:38:92: error: expected primary-expression before ')' token 38 | if (toLong(str[0], i) + toLong(str[1], i) - toLong(str[2], i) == 0)){ | ^
s706128908
p00110
C++
#include <bits/stdc++.h> using namespace std; long long toLong(string str, int n) { long long res = 0; for (int i = 0; i < str.size(); i++){ if (str[i] != 'X'){ res = res * 10 + str[i] - '0'; } else { //if (i == 0 && n == 0) return 0; res = res * 10 + n; } } return res; } int main() { //char A[1...
a.cc: In function 'int main()': a.cc:38:92: error: expected primary-expression before ')' token 38 | if (toLong(str[0], i) + toLong(str[1], i) - toLong(str[2], i) == 0)){ | ^
s644193643
p00110
C++
#include <bits/stdc++.h> using namespace std; long long toLong(string str, int n) { long long res = 0; for (int i = 0; i < str.size(); i++){ if (str[i] != 'X'){ res = res * 10 + str[i] - '0'; } else { //if (i == 0 && n == 0) return 0; res = res * 10 + n; } } return res; } int main() { //char A[1...
a.cc: In function 'int main()': a.cc:38:94: error: expected primary-expression before ')' token 38 | if (toLong(str[0], i) + toLong(str[1], i) - toLong(str[2], i) == 0LL)){ | ^
s896171388
p00110
C++
/* AOJ_0110: Alphametic */ #include <iostream> #include <string> #include <cstdlib> #include <vector> using namespace std; int Alp_calc(string); string convert_Xtoi(string, int); string calc_AddofNumString(string, string); int main(void) { string str; int result; while (1) { cin >> str; if (cin.eof()) { bre...
a.cc: In function 'int Alp_calc(std::string)': a.cc:54:21: error: 'strcmp' was not declared in this scope 54 | if (strcmp(_buff.c_str(), _bfs.c_str()) == 0) { return i; } | ^~~~~~ a.cc:8:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '...
s434589341
p00110
C++
/* AOJ_0110: Alphametic */ #include <iostream> #include <string> #include <cstdlib> #include <vector> using namespace std; int Alp_calc(string); string convert_Xtoi(string, int); string calc_AddofNumString(string, string); int main(void) { string str; int result; while (1) { cin >> str; if (cin.eof()) { bre...
a.cc: In function 'int Alp_calc(std::string)': a.cc:54:21: error: 'strcmp' was not declared in this scope 54 | if (strcmp(_buff.c_str(), _bfs.c_str()) == 0) { return i; } | ^~~~~~ a.cc:8:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '...
s792658162
p00110
C++
/* AOJ_0110: Alphametic */ #include <iostream> #include <string> #include <cstdlib> #include <vector> using namespace std; int Alp_calc(string); string convert_Xtoi(string, int); string calc_AddofNumString(string, string); int main(void) { string str; int result; while (1) { cin >> str; if (cin.eof()) { bre...
a.cc: In function 'std::string calc_AddofNumString(std::string, std::string)': a.cc:76:9: error: 'reverse' was not declared in this scope 76 | reverse(str1.begin(), str1.end()); | ^~~~~~~