submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s330589216
p03841
C++
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <algorithm> #include <utility> #include <functional> #include <cstring> #include <queue> #include <stack> #include <math.h> #include <iterator> #include <vector> #include <string> #include <set> #include <math.h> #include <iostream> #include <random> #include...
a.cc: In function 'int main()': a.cc:125:9: error: jump to label 'ok' 125 | ok:; | ^~ a.cc:53:38: note: from here 53 | goto ok; | ^~ a.cc:61:21: note: crosses initialization of 'int now_filled' 61 | ...
s381696101
p03841
C++
import sequtils,strutils,algorithm type binaryIndexTree[I:static[int]] = array[I + 1,int] #要素数 <= I 1始まりで BIT[0]は要素数 item = tuple[x, i : int] proc add(BIT :var binaryIndexTree,i : int, a : int)= var index = i while BIT[0] >= index: BIT[index] += a index += ((index xor (index - 1)) and ...
a.cc:4:55: error: stray '#' in program 4 | binaryIndexTree[I:static[int]] = array[I + 1,int] #要素数 <= I 1始まりで BIT[0]は要素数 | ^ a.cc:19:2: error: invalid preprocessing directive #[ 19 | #[ | ^ a.cc:24:13: error: stray '#' in program 24 | BIT[0...
s303365165
p03841
C++
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <complex> #include <stack> #includ...
a.cc: In function 'int main()': a.cc:40:35: error: cannot bind non-const lvalue reference of type '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >&' to an rvalue of type 'std::vector<std::pair<int, int> >::iterator' 40 | for (auto& itr = col.begin(); itr != col.end(); +...
s726440076
p03841
C++
#include<cstdio> #include<cmath> #include<iostream> #include<algorithm> #include<string> #include<iomanip> using namespace std; #define loop(i,a,b) for(int i = a; i < b; i++) #define rep(i,a) loop(i,0,a) #define shosu(x) fixed<<setprecision(x) typedef long long ll; int main(){ int n; cin>>n; int tmp; int m=1; int...
a.cc: In function 'int main()': a.cc:28:1: error: expected primary-expression before '%' token 28 | % cout<<tm<<' '<<m<<' '<<tM<<' '<<M<<endl; | ^
s722355050
p03841
C++
#include<iostream> #include<algorithm> #include<string> #include<cstring> #include<cmath> #include<vector> #include<queue> #include<stack> #include<utility> #include<iomanip> using namespace std; int main() { int n;cin>>n; int a[501]; for(int i=1;i<=n;i++)cin>>a[i]; int s[250010]; memset(s,-1,sizeof(s)); int l=0...
a.cc: In function 'int main()': a.cc:29:42: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 29 | cout<"No"<<endl; | ~~~~^~~~~~ a.cc:43:42: error: invalid operands of types '...
s598910513
p03841
C++
#include <iostream> #include <vector> #include <utility> #define DEB1(x) std::cout << (x) << std::endl; int n; std::pair<int, int> arr[501]; int cntl[501], cntr[501]; int main() { std::cin >> n; for(int i = 0; i < n; ++i) { cntl[i] = i; cntr[i] = n - i - 1; std::cin >> arr[i].first; ...
a.cc: In function 'int main()': a.cc:21:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 21 | std::sort(arr, arr + n); | ^~~~ | qsort
s452320190
p03841
C++
#include <iostream> #include <algorithm> #include <cmath> #include <cstdio> #include <set> #include <map> #include <unordered_map> #include <vector> #include <queue> #include <string> #include <iomanip> #include <stdio.h> #include <cstring> #include <random> #include <chrono> #include <bitset> #include <fstream> #inclu...
a.cc:42:7: error: class template argument deduction failed: 42 | queue Q2; | ^~ a.cc:42:7: error: no matching function for call to 'queue()' In file included from /usr/include/c++/14/queue:66, from a.cc:9: /usr/include/c++/14/bits/stl_queue.h:195:9: note: candidate: 'template<class _Tp, ...
s677483472
p03842
C++
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <queue> #include <stack> #include <set> #include <map> #include <iomanip> #include <utility> #include <tuple> #include <functional> #include <bitset> #include <cassert> #include <complex> #include <stdio.h> #include <...
cc1plus: error: '::main' must return 'int'
s640668585
p03842
C++
#pragma region Macros #pragma GCC optimize("O3") #include <bits/stdc++.h> #define ll long long #define ld long double #define rep2(i,a,b) for(ll i=a;i<=b;++i) #define rep(i,n) for(ll i=0;i<n;i++) #define rep3(i,a,b) for(ll i=a;i>=b;i--) #define pii pair<int,int> #define pll pair<ll,ll> #define pq priority_queue #define...
a.cc: In function 'int main()': a.cc:323:20: error: 'j' was not declared in this scope 323 | if(!v[(i+j)%v.size()])ans*=2; | ^
s746584521
p03842
C++
#include<bits/stdc++.h> using namespace std; #define LL long long #define ULL unsigned long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define pll pair<LL,LL> #define x first #define y second #define pi acos(-1) #define sqr(x) ((x)*(x)) #define pdd pair<double,double> #define MEMS(x) memse...
a.cc: In function 'int main()': a.cc:166:26: error: expected '}' at end of input 166 | printf("%lld\n",ans); | ^ a.cc:89:11: note: to match this '{' 89 | int main(){ | ^
s476480463
p03842
C++
#include <iostream> #include <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #define FOR(i, n, m) for(ll i = n; i < (int)m; i++) #define REP(i, n) FOR(i, 0, n) #define ALL(v) v.begin(), v.end() #define pb push_back using namespace std; using ll = std::int_fast64_t; using P ...
a.cc:13:17: error: 'int_fast64_t' in namespace 'std' does not name a type 13 | using ll = std::int_fast64_t; | ^~~~~~~~~~~~ a.cc:14:16: error: 'll' was not declared in this scope 14 | using P = pair<ll, ll>; | ^~ a.cc:14:20: error: 'll' was not declared in this scope ...
s954192426
p03842
C++
#include<iostream> #include<algorithm> #include<vector> #include<string> #include<set> #include<queue> #include<stack> #include<bitset> using namespace std; int p = 1000000007; #define int long long #define vel vector<long long> #define vvel vector<vel> #define rep(i,n) for(long long i=0;i<n;i++) #define sor(v) sort(v....
a.cc: In function 'int main()': a.cc:193:33: error: 'push' was not declared in this scope; did you mean 'pus'? 193 | push(count0); | ^~~~ | pus
s577044749
p03842
C++
#include <bits/stdc++.h> using namespace std; #define ll long long #define P 1000000007 int a[100005],in[100005],col[100005],cnt[100005],n,L[100005];bool cir[100005];long long f[100005],ans=1; int main() { scanf("%d",&n); for(int i=1;i<=n;++i) scanf("%d",&a[i]),++in[a[i]]; for(int i=1;i<=n;++i) { if(col[i]) conti...
a.cc: In function 'int main()': a.cc:20:34: error: expected ';' before ')' token 20 | for(cir[x];x=a[x]) | ^ | ;
s522369307
p03842
C++
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #define MOD 1000000007 using namespace std; typedef long long ll; ll dp(int n,int m) { ll s1=1,s2=0; for(int i=1;i<=m;i++) { ll f=(s1*(((n&1)&&n>1)?2LL:1LL)+s2*(i-1)%MOD*n)%MOD; s2=s1; s1=f; } return s1; } int a[100005],su...
a.cc:23:1: error: 'vector' does not name a type 23 | vector <int> son[100005]; | ^~~~~~ a.cc: In function 'int getlen(int)': a.cc:27:16: error: 'son' was not declared in this scope 27 | if (!cir[x]&&son[x].size()>=2) { | ^~~ a.cc:31:17: error: 'son' was not declared in this scope 3...
s947231910
p03842
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i = (a); i < (b); i++) #define RFOR(i,b,a) for(int i = (b) - 1; i >= (a); i--) #define ITER(it, a) for(typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a, value) memset(a, value, sizeof(a)) #define SZ(a) (int) a.size() #define...
a.cc: In function 'int main()': a.cc:316:40: error: expected primary-expression before '==' token 316 | if ((i-2) % 2) == 0) V[i] /= 2; | ^~
s219327717
p03842
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #include<cstdlib> #include<ctime> #include<queue> #include<set> #include<map> #include<stack> using namespace std; typedef long long LL; const int N=1e5+100; int gi() { int w=0;bool q=1;char c=getchar(); while (...
a.cc: In function 'int dfs(int)': a.cc:29:32: error: reference to 'next' is ambiguous 29 | for (int i=head[k];i;i=next[i]) | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from...
s933098121
p03842
C++
#include<bits/stdc++.h> #define sqr(x) ((x)*(x)) #define ll long long #define ull unsigned long long #define ui unsigned int #define ld long double #define vi vector<int> #define HEAP(...) priority_queue<__VA_ARGS__ > #define heap(...) priority_queue<__VA_ARGS__,vector<__VA_ARGS__ >,greater<__VA_ARGS__ > > #define pii...
a.cc: In function 'int main()': a.cc:171:22: error: 'mx' was not declared in this scope; did you mean 'mp'? 171 | gmax(mx,si[i]); | ^~ | mp
s365455669
p03842
C++
// #includes {{{ #include<bits/stdc++.h> using namespace std; // }}} // pre-written code {{{ #define REP(i,n) for(int i=0;i<(int)(n);++i) #define RREP(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i) #define FOR(i,c) for(__typeof((c).begin())i=(c).beg...
a.cc: In function 'IO& operator<<(IO&, const std::string&)': a.cc:60:1: warning: no return statement in function returning non-void [-Wreturn-type] 60 | } | ^ a.cc: At global scope: a.cc:94:9: error: ISO C++ forbids declaration of 'operator=' with no type [-fpermissive] 94 | operator =(int n){v=n;} ...
s246559392
p03842
C++
10 2 3 4 5 1 7 8 9 10 6
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 10 | ^~
s587326384
p03842
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using...
a.cc: In function 'int main()': a.cc:51:21: error: 'G' was not declared in this scope 51 | rep(i,N) if(G[i].size()>2){ | ^ a.cc:97:12: error: redeclaration of 'll ans' 97 | ll ans=1; | ^~~ a.cc:63:12: note: 'll ans' previously declared here 63 | ...
s144352535
p03842
C++
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; typedef long long ll; ll mod = 1000000007; int dat[200000]; int ind[200000]; bool flag[200000]; int vtype[200000];//1: circ1 2: circ2 3: edge vector<int>circ1[200000]; int circ2[200001]; int flen[200000]; #define SIZE 300000 ll inv[SIZE + 1]; l...
a.cc: In function 'int main()': a.cc:165:9: error: jump to label 'l01' 165 | l01:; | ^~~ a.cc:73:54: note: from here 73 | goto l01; | ^~~ a.cc:120:12: note: crosses initialization of...
s519108504
p03842
C++
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; typedef long long ll; ll mod = 1000000007; int dat[200000]; int ind[200000]; bool flag[200000]; int vtype[200000];//1: circ1 2: circ2 3: edge vector<int>circ1[200000]; int circ2[200001]; int flen[200000]; #define SIZE 300000 ll inv[SIZE + 1]; l...
a.cc: In function 'int main()': a.cc:156:9: error: jump to label 'l01' 156 | l01:; | ^~~ a.cc:68:71: note: from here 68 | else if (vtype[now] == 3)goto l01; | ^~~ a.cc:114:12:...
s381297928
p03843
C++
#include <bits/stdc++.h> #define Inf 0x3f3f3f3f #define rg register #define pii pair<int, int> #define mp(x, y) make_pair(x, y) using namespace std; typedef long long ll; const int Maxn = 2e5 + 5; typedef int arr[Maxn]; //ll Add(ll x, ll y) { return (x += y) >= Mod ? x - Mod : (x < 0 ? x + Mod : x); } ll min(ll x, ll y...
a.cc: In function 'll read()': a.cc:15:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | rg ll res = 0, sign = 1; | ^~~ a.cc:15:24: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 15 | rg ll res = 0, sig...
s458260535
p03843
C++
#include <bits/stdc++.h> #define MAXN 200005 #define INF 0x3f3f3f3f typedef long long lint; using namespace std; struct data { int next, to; data(int next = 0, int to = 0):next(next), to(to) {} }edge[MAXN << 1]; struct node { int maxd, state; node(int maxd = 0, int state = 0):maxd(maxd), state(state) {} bool...
a.cc: In function 'void connect(int, int)': a.cc:31:23: error: reference to 'data' is ambiguous 31 | edge[++cnt] = data(head[u], v); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/...
s298010934
p03843
C++
#include <iostream> #include <vector> #include <utility> #include <map> #include <set> #include <string> #include <algorithm> #define llint long long #define inf 1000000000 using namespace std; typedef pair<llint, llint> P; llint n; vector<llint> G[200005]; vector<P> E; string s; map<P, llint> mp, mp2; void dfs(int ...
a.cc: In function 'int main()': a.cc:126:43: error: request for member 'first' in 'vec.std::vector<long long int>::operator[](((std::vector<long long int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} 126 | ...
s614689994
p03843
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> #include <queue> using namespace std; #define N 200050 typedef long long ll; int head[N],to[N<<1],nxt[N<<1],cnt,n,siz[N]; int mx[N],se[N],d[N];ll ans; char w[N]; inline void add(int u,int v) { to[++cnt]=v; nxt[cnt]=head[u]; head[u]=cnt; } voi...
a.cc: In function 'void d2(int, int)': a.cc:29:19: error: 'inf' was not declared in this scope; did you mean 'int'? 29 | if(d[x]<=(inf))ans+=min(se[x]+1,mx[x]-1)-d[x]+1; | ^~~ | int
s810637888
p03843
C++
#include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> #include <queue> using namespace std; #define N 200050 typedef long long ll; int head[N],to[N<<1],nxt[N<<1],cnt,n,siz[N]; int mx[N],se[N];ll ans; char w[N]; inline void add(int u,int v) { to[++cnt]=v; nxt[cnt]=head[u]; head[u]=cnt; } void d1(...
a.cc: In function 'int main()': a.cc:43:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 43 | return ; | ^~~~~~
s361534021
p03843
C++
#include<iostream> #include<cstring> #include<algorithm> #include<cstdio> #include<cmath> #include<cassert> #define ll long long #define inf 1000000000 using namespace std; inline int read(){ int re=0,flag=1;char ch=getchar(); while(ch>'9'||ch<'0'){ if(ch=='-') flag=-1; ch=getchar(); } while(ch>='0'&&ch<='9') r...
a.cc:44:1: error: 'vector' does not name a type 44 | vector<int>tmp; | ^~~~~~ a.cc: In function 'void dfs2(int, int)': a.cc:47:22: error: 'tmp' was not declared in this scope; did you mean 'tm'? 47 | int i,v,maxn;tmp.clear(); | ^~~ | tm
s067363959
p03843
C++
#include<bits/stdc++.h> using namespace std; const int N=2e5+100; int head[N],next[N],to[N],fa[N]; int sum[N],all;bool is[N]; int ans; int one[N],two[N]; inline void dfs1(int k) { sum[k]=is[k]; for (int i=head[k];i;i=next[i]) if (to[i]!=fa[k]) { fa[to[i]]=k; dfs1(to[i]); if (one[to[i]]+1>one[k]) two[k]...
a.cc: In function 'void dfs1(int)': a.cc:10:32: error: reference to 'next' is ambiguous 10 | for (int i=head[k];i;i=next[i]) | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, f...
s210806208
p03843
C++
#include<stdio.h> #include<vector> #include<algorithm> #include<string> #include<iostream> using namespace std; typedef long long ll; int dp1[200000], dp2[200000]; int len1[200000], len2[200000]; string str; vector<int>pat[200000]; vector<int>ko[200000]; bool flag[200000]; #define ROOT (num-1) typedef pair<int, int>pii...
a.cc: In function 'void calc2(int)': a.cc:14:15: error: 'num' was not declared in this scope; did you mean 'enum'? 14 | #define ROOT (num-1) | ^~~ a.cc:62:21: note: in expansion of macro 'ROOT' 62 | if (node != ROOT) | ^~~~
s769385130
p03844
C++
#include<iostream> using namespace std; int main() { ll a, b; char op; cin >> a >> op >> b; if (op == '+')cout << a + b << endl; else cout << a - b << endl; return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'll' was not declared in this scope 4 | ll a, b; | ^~ a.cc:6:16: error: 'a' was not declared in this scope 6 | cin >> a >> op >> b; | ^ a.cc:6:27: error: 'b' was not declared in this scope 6 | cin >> ...
s163120147
p03844
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int A, B; string op; cin >> A >> op >> B; if (op = = "+") { cout << A + B << endl; } else { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:10:18: error: expected primary-expression before '=' token 10 | if (op = = "+") | ^
s079686040
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; getline(cin, s); if(s.at(2) == "+"){ cout << (int)s.at(0) + (int)s.at(4); }else{ cout << (int)s.at(0) - (int)s.at(4); } }
a.cc: In function 'int main()': a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(s.at(2) == "+"){ | ~~~~~~~~^~~~~~
s616697358
p03844
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner s= new Scanner(System.in); int a=s.nextInt(); String str=s.next().charAt(0); //System.out.println(str); int b=s.nextInt(); if(str=='+'){ System.out.println(a+b); }else{ Syst...
Main.java:6: error: incompatible types: char cannot be converted to String String str=s.next().charAt(0); ^ Main.java:10: error: bad operand types for binary operator '==' if(str=='+'){ ^ first type: String second type: char 2 errors
s003554201
p03844
Java
import java.util.*; class Main{ public static void main(String args[]){ Scanner s= new Scanner(System.in); String str=s.next(); System.out.println(str); int a=0; int b=0; int j=1; char sym=''; for(int i=0;i<str.length();i++){ if(str.charAt(i)=='+' || str...
Main.java:10: error: empty character literal char sym=''; ^ 1 error
s534716566
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; int result; result = 0; getline(cin, s); if(s.at(2) == "+"){ result = s.at(0) + s.at(4); } if(s.at(2) == "-"){ result = s.at(0) - s.at(4); } cout << result << endl; }
a.cc: In function 'int main()': a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(s.at(2) == "+"){ | ~~~~~~~~^~~~~~ a.cc:13:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if(s.at(2) == "-"){ | ~~~~~~~~^...
s267447413
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; int result; getline(cin, s); if(s.at(2) == '+'){ result = s.at(0) + s.at(4); } while{ result = s.at(0) - s.at(4); } cout << result << endl; }
a.cc: In function 'int main()': a.cc:11:8: error: expected '(' before '{' token 11 | while{ | ^ | ( a.cc:11:8: error: expected primary-expression before '{' token a.cc:11:8: error: expected ')' before '{' token 11 | while{ | ^ | )
s474310439
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; int result; getline(cin, s); if(s.at(2) == '+'){ result = s.at(0) + s.at(4) } while{ reslt = s.at(0) - s.at(4) } cout << result << endl; }
a.cc: In function 'int main()': a.cc:9:31: error: expected ';' before '}' token 9 | result = s.at(0) + s.at(4) | ^ | ; 10 | } | ~ a.cc:11:8: error: expected '(' before '{' token 11 | while{ ...
s326462246
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B; if (op == "+") { cout >> A + B >> endl; els if(op == "-") { cout >> A - B >> endl; } } }
a.cc: In function 'int main()': a.cc:10:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 10 | cout >> A + B >> endl; | ~~~~ ^~ ~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:10:8...
s697219042
p03844
C
#include<stdio.h> int main() { int a,b; int op; scanf("%d%c%d",&a,&op,&b); if(op==+) printf("%d",a+b); else printf("%d",a-b); return 0; }
main.c: In function 'main': main.c:7:11: error: expected expression before ')' token 7 | if(op==+) | ^
s974131599
p03844
C++
#include <bits.stdc++.h> using namespace std; int main(){ int A, B; string op; cin>>A>>op>>B; int ans; if(op=='+'){ ans = A+B; } else{ ans = A-B; } cout<<ans<<endl; }
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory 1 | #include <bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s933320605
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char c; cin<<a<<c<<b; if(c=='+') cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin<<a<<c<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:6: note: candidate: 'operator...
s420028400
p03844
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; string op; cin<<a<<op<<b; if(op=='+') cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 7 | cin<<a<<op<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:6: note: candidate: 'operato...
s122766728
p03844
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; string c; cin<<a<<c<<b; if(c=='+') cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 7 | cin<<a<<c<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:6: note: candidate: 'operator...
s349361547
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char c; cin<<a<<c<<b; if(c=='+') cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 6 | cin<<a<<c<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:6:6: note: candidate: 'operator...
s590781897
p03844
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; string c; cin<<a<<c<<b; if(c=="+") cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 7 | cin<<a<<c<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:6: note: candidate: 'operator...
s357737813
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char c; cout<<a<<c<<b; if(c=="+") cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(c=="+") | ~^~~~~
s596385382
p03844
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; string c; cout<<a<<c<<b; if(c=='+') cout<<a+b; else cout<<a-b; return 0; }
a.cc: In function 'int main()': a.cc:9:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if(c=='+') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file include...
s807292766
p03844
C++
#include<iostream> #include<string> using namespace std; int main() { int A,B; char C; cin>>A>>C>>B; if(C=='+'){ cout<<A+B; } else(C=='-'){ cout<<A-B; } }
a.cc: In function 'int main()': a.cc:12:15: error: expected ';' before '{' token 12 | else(C=='-'){ | ^ | ;
s066575102
p03844
C++
#include<iostream> #include<string> using namespace std; int main() { int A,B; char C; cin>>A>>C>>B; if(C=='+'){ cout<<A+B; } else(C=='-'){ cout<<A-B; } }
a.cc: In function 'int main()': a.cc:12:15: error: expected ';' before '{' token 12 | else(C=='-'){ | ^ | ;
s344373511
p03844
C++
#include<iostream> #include<string> using namespace std; int main() { int A,B; char C; cin<<A<<C<<B; if(C=='+'){ cout<<A+B; } else(C=='-'){ cout<<A-B; } }
a.cc: In function 'int main()': a.cc:8:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin<<A<<C<<B; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:6: note: candidate: 'operator...
s402117117
p03844
C++
#include<iostream> #include<string> using namespace std; int main() { int A,B; char C; cin<<A<<C<<B; if(C=="+"){ cout<<A+B; } else(C=="-"){ cout<<A-B; } }
a.cc: In function 'int main()': a.cc:8:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin<<A<<C<<B; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:6: note: candidate: 'operator...
s906057927
p03844
C++
#include <iostream> #include <string> using namespace std; int main () { int a, op, b; cin >> a >> op >> b; if (a == '+') cout << a + b; else if (a == "-") cout << a - b; }
a.cc: In function 'int main()': a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | else if (a == "-") | ~~^~~~~~
s965330309
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char op; cin >> a >> op >> b; if(op=='+') cout << a+b << endl; elase cout << a-b <<endl; }
a.cc: In function 'int main()': a.cc:9:3: error: 'elase' was not declared in this scope 9 | elase | ^~~~~
s874322245
p03844
C++
#include <bits/stdc++.h> usng namespace std; int main(){ int a,b; char op; cin >> a >> op >> b; if(op=='+') cout << a+b << endl; elase cout << a-b <<endl; }
a.cc:2:1: error: 'usng' does not name a type 2 | usng namespace std; | ^~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> op >> b; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14...
s201516297
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int a, b; string op; cin >> a >> op >> b; if (op == '+') { cout << a + b << endl; } if (op == '-') { cout << a - b << endl; } }
a.cc: In function 'int main()': a.cc:10:12: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 10 | if (op == '+') { | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basi...
s878000275
p03844
C++
k#include <bits/stdc++.h> using namespace std; int main() { int a, b; string op; cin >> a >> op >> b; if (op == '+') { cout << a + b << endl; } if (op == '-') { cout << a - b << endl; } }
a.cc:1:2: error: stray '#' in program 1 | k#include <bits/stdc++.h> | ^ a.cc:1:1: error: 'k' does not name a type 1 | k#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:6:5: error: 'string' was not declared in this scope 6 | string op; | ^~~~~~ a.cc:8:5: error: 'ci...
s877071231
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char k; cin>>a>>b>>'k'; if('k'==+){ cout<<a+b<<'\n'; } if('k'==-){ cout<<a-b<<'\n'; } return(0); }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'char') 6 | cin>>a>>b>>'k'; | ~~~~~~~~~^~~~~ | | | | | char | std::basic_istream<ch...
s306845225
p03844
C++
int main() { int A,B; char op; cin >> A >> op >> B; if(op=='+'){ cout << A + B << endl; } if(op=='-'){ cout << A - B << endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope 4 | cin >> A >> op >> B; | ^~~ a.cc:6:5: error: 'cout' was not declared in this scope 6 | cout << A + B << endl; | ^~~~ a.cc:6:22: error: 'endl' was not declared in this scope 6 | cout << A + B ...
s253614825
p03844
C
#include<stdio.h> int main(){ int a,b; char op; scanf("%d%c%d".&a,&op,&b); int sum; if(op=='+'){ sum=a+b; }else{ sum=a-b; } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:6:20: error: expected identifier before '&' token 6 | scanf("%d%c%d".&a,&op,&b); | ^
s126811921
p03844
C
#include<stdio.h> int main(){ int a,b; char op; scanf("%d%c%d".&a,&op,&b); if(op=='+'){ int sum=a+b; }else{ int sum=a-b; } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:6:20: error: expected identifier before '&' token 6 | scanf("%d%c%d".&a,&op,&b); | ^ main.c:13:19: error: 'sum' undeclared (first use in this function) 13 | printf("%d\n",sum); | ^~~ main.c:13:19: note: each undeclared id...
s940574820
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B; int answer; if (op == '+') { answer = A + B; } else if (op == '-') { answer = A - B; } cout << answer << endl; // ここにプログラムを追記 }
a.cc: In function 'int main()': a.cc:11:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 11 | if (op == '+') { | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<c...
s243087390
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; string op; cin >> A >> op >> B; int answer; if (op == '+') answer = A + B; else if (op == '-') answer = A - B; cout << answer << endl; // ここにプログラムを追記 }
a.cc: In function 'int main()': a.cc:11:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 11 | if (op == '+') | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<cha...
s064546895
p03844
C++
#include "pch.h" #include <iostream> #include <string> using namespace std; int main() { int A, B, ans; string x; cin >> A >> x >> B; if (x == "+") { ans = A + B; } else if (x == "-") { ans = A - B; } cout << ans; }
a.cc:1:10: fatal error: pch.h: No such file or directory 1 | #include "pch.h" | ^~~~~~~ compilation terminated.
s933663980
p03844
C++
a, op, b = input().split() if op = '+': ans = int(a)+int(b) else: ans = int(a) - int(b) print(ans)
a.cc:1:1: error: 'a' does not name a type 1 | a, op, b = input().split() | ^
s617166096
p03844
C++
#include <iostream> using namespace std; int A, B; char op; cin >> A >> op >> B; if ( op == '+' ){ cout << A + B << '\n'; } else if ( op == '-' ) { cout << A - B << '\n'; }
a.cc:6:1: error: 'cin' does not name a type 6 | cin >> A >> op >> B; | ^~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ( op == '+' ){ | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | } else if ( op == '-' ) { | ^~~~
s263979960
p03844
C++
#include <iostream> using namespace std; int A, B; string op; cin >> A >> op >> B; if ( op == "+" ){ cout << A + B << '\n'; } else if ( op == "-" ) { cout << A - B << '\n'; }
a.cc:6:1: error: 'cin' does not name a type 6 | cin >> A >> op >> B; | ^~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ( op == "+" ){ | ^~ a.cc:9:4: error: expected unqualified-id before 'else' 9 | } else if ( op == "-" ) { | ^~~~
s561234521
p03844
C++
#include <iostream> using namespace std; int A, B; string op; cin >> A >> B >> op; if ( op == "+" ){ cout << A + B << '\n'; } else if ( op == "-" ) { cout << A - B << '\n'; }
a.cc:6:1: error: 'cin' does not name a type 6 | cin >> A >> B >> op; | ^~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ( op == "+" ){ | ^~ a.cc:9:4: error: expected unqualified-id before 'else' 9 | } else if ( op == "-" ) { | ^~~~
s817875220
p03844
C++
#include <iostream> using namespace std; int A, B; char op; cin >> A >> B >> op; if ( op == '+' ){ cout << A + B << '\n'; } else if ( op == '-' ) { cout << A - B << '\n'; }
a.cc:6:1: error: 'cin' does not name a type 6 | cin >> A >> B >> op; | ^~~ a.cc:7:1: error: expected unqualified-id before 'if' 7 | if ( op == '+' ){ | ^~ a.cc:9:4: error: expected unqualified-id before 'else' 9 | } else if ( op == '-' ) { | ^~~~
s238321354
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; char op; int c = 0 cin >> a >> b; if(op == '+') c = (a + b); else if(op == '-') c = (a - b); cout << c << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'cin' 8 | cin >> a >> b; | ^~~
s362877624
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; char op; int c = 0 cin >> a >> op >> b; if(op == '+') c = (a + b); else if(op == '-') c = (a - b); cout << c << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'cin' 8 | cin >> a >> op >> b; | ^~~
s035554626
p03844
C++
#include <iostream> #include <vector> #include <set> #include <math.h> using namespace std; int main() { __int64 n,a,k,p,m = 1000000007; bool haveZero = false; vector<long> arr; cin >> n; while (n--) { cin >> a; if (a == 0 && haveZero) { cout << 0; return 0; } if (a == 0) hav...
a.cc: In function 'int main()': a.cc:7:3: error: '__int64' was not declared in this scope; did you mean '__ynf64'? 7 | __int64 n,a,k,p,m = 1000000007; | ^~~~~~~ | __ynf64 a.cc:10:10: error: 'n' was not declared in this scope; did you mean 'yn'? 10 | cin >> n; | ^ | ...
s837721813
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char x; cin>>a>>x>>b; cout<<axb; }
a.cc:1:1: error: '\U0000ff03include' does not name a type 1 | #include<iostream> | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin>>a>>x>>b; | ^~~ a.cc:8:9: error: 'cout' was not declared in this scope 8 | cout<<axb;...
s689582499
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; char op; cin>>a>>>>op>>b; if(op=='+') cout<<a+b; else cout<<a-b; }
a.cc: In function 'int main()': a.cc:6:11: error: expected primary-expression before '>>' token 6 | cin>>a>>>>op>>b; | ^~
s141757282
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A, B; char op; cin >> A >> op >> B; if (op == "+") { cout << A + B << endl; } else { cout << A - B << endl; } }
a.cc: In function 'int main()': a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if (op == "+") { | ~~~^~~~~~
s715033404
p03844
C++
#include <iosream> using namespace std; int main(){ int a, b; char op; cin>> a >> op >> b; if(op == '+') cout << a + b << endl; else cout << a-b << endl; return 0; }
a.cc:1:10: fatal error: iosream: No such file or directory 1 | #include <iosream> | ^~~~~~~~~ compilation terminated.
s579734595
p03844
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; #define rep(i,N) for(int i=0; i<N; i++){ ; int main() { int A; string op; int B; cin>>A>>op>>B; if(op=='+'){ cout<<A+B<<endl; } else { cout<<A-B<<endl; } }
a.cc: In function 'int main()': a.cc:10:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 10 | if(op=='+'){ | ~~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In f...
s877140610
p03844
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { long long int a,b,res; char c; cin>>a>>c>>b; if(c == '+'){ res = a + b; cout<<res<<endl; } else{ res = a-b; cout<<res<<endl; }
a.cc: In function 'int main()': a.cc:18:4: error: expected '}' at end of input 18 | } | ^ a.cc:6:1: note: to match this '{' 6 | { | ^
s776555059
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A , C ; char B; cin >> A >> B >> C; if ( B == '+' ){ cout << A+C << endl; }else if ( B == '-' ){ cout << A-C << endl; }
a.cc: In function 'int main()': a.cc:12:4: error: expected '}' at end of input 12 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s347694414
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int A , C ; char B; cin >> A >> B >> C; int sum ; if ( B == '+' ){ cout << A+C << endl; }else if ( B == '-' ){ cout << A-C << endl; }
a.cc: In function 'int main()': a.cc:13:4: error: expected '}' at end of input 13 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s510412100
p03844
C
#include<cstdio> using namespace std; int ans,a,b; char op,stp1,stp2; int main(){ scanf("%d",&a); scanf("%c",&stp1); scanf("%c",&op); scanf("%c",&stp2); scanf("%d",&b); if (op=='+'){ ans=a+b; }else if (op=='-'){ ans=a-b; } printf("%d",ans); return 0;}
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s665259280
p03844
C++
#include<bits/stdc++.h> using namespace std; int main(){ ll a,b; char c; cin>>a>>c>>b; if(c=='+'){ cout<<a+b<<'\n'; } else{ cout<<a-b<<'\n'; } }
a.cc: In function 'int main()': a.cc:4:9: error: 'll' was not declared in this scope 4 | ll a,b; | ^~ a.cc:6:14: error: 'a' was not declared in this scope 6 | cin>>a>>c>>b; | ^ a.cc:6:20: error: 'b' was not declared in this scope 6 | cin>>a>>c>>b; ...
s326755400
p03844
C
#include<bits/stdc++.h> using namespace std; int i,j;char c; int main(){ scanf("%d %c %d",&i,&c,&j); if (c=='+') printf("%d\n",i+j); else printf("%d\n",i-j); }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s512175415
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b; char op; cin >>a>>op>>b; if(op=='+') cout<<a+b<<endl; else cout<<a-b<<endl; }
a.cc: In function 'int main()': a.cc:12:12: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 12 | cout<<a-b<<endl; | ~^~ | | | | | basic_string<[......
s976766005
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; int ans; char op; cin>>a>>op>>b; if( op =="+") ans = a+b; else if( op =="-") ans = a-b; cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if( op =="+") ans = a+b; | ~~~^~~~~ a.cc:9:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | else if( op =="-") ans = a-b; ...
s596918211
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; int ans; char op; cin>>a>>op>>b; if(char op=="+") ans = a+b; else if(char op=="-") ans = a-b; cout<<ans: return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: expected initializer before '==' token 8 | if(char op=="+") ans = a+b; | ^~ a.cc:8:17: error: expected ')' before '==' token 8 | if(char op=="+") ans = a+b; | ~ ^~ | ) a.cc:9:23: error: ...
s337300769
p03844
C++
#include<iostream> using namespace std; int main(){ int a,b; int ans; char op; cin>>a>>op>>b; if(char=="+") ans = a+b; else if(char=="-") ans = a-b; cout<<ans: return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: expected unqualified-id before '==' token 8 | if(char=="+") ans = a+b; | ^~ a.cc:9:20: error: expected unqualified-id before '==' token 9 | else if(char=="-") ans = a-b; | ^~ a.cc:10:18: error: expected ';...
s375391005
p03844
C++
#include<bits\stdc++.h> using namespace std; int main(){ int a,b; int ans; char op; cin>>a>>op>>b; if(char=="+") ans = a+b; if(char=="-") ans = a-b; if(char=="*") ans = a*b; if(char=="/") ans = a/b; cout<<ans: return 0; }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s240046340
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { //初期宣言と型の設定 int A, B, C; string op; //入力部 cin >> A >> op >> B; if(op=="+"){ C=A+B; } else if(op=="-"){ C=A-B; } else{ cout <<"error"<< endl } cout << C << endl; }
a.cc:7:3: error: extended character   is not valid in an identifier 7 | int A, B, C; | ^ a.cc: In function 'int main()': a.cc:7:3: error: 'int\U00003000A' was not declared in this scope 7 | int A, B, C; | ^~~~~~ a.cc:7:11: error: 'B' was not declared in this scope 7 | int A, B, C; ...
s872765841
p03844
C++
eval(input().replace(" ", ""))
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token 1 | eval(input().replace(" ", "")) | ^
s271552999
p03844
C++
/********include********/ #include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> #include <unordered_set> #include <r...
a.cc: In function 'int main()': a.cc:259:13: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 259 | if(s=='+'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::b...
s395574376
p03844
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int a=sc.nextInt(); String b=sc.next(); int c=sc.nextInt(); if(b.equals("+")) System.out.println(a+c); else System.out.println(a-b); } }
Main.java:10: error: bad operand types for binary operator '-' else System.out.println(a-b); ^ first type: int second type: String 1 error
s457282630
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b,ans; string op; cin>>x>>op>>y; if(op=="+"){ ans=a+b; }else{ ans=a-b; } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:7:14: error: 'x' was not declared in this scope 7 | cin>>x>>op>>y; | ^ a.cc:7:21: error: 'y' was not declared in this scope 7 | cin>>x>>op>>y; | ^
s428233670
p03844
C++
#include <bits/stdc++.h> using namespace std; int main() { long long a , b ; char c ; scanf("%lld %c %lld", &a , &c , &b); if(c == '+'){ cout << a + b << endl; return; } cout << (a - b) << endl; }
a.cc: In function 'int main()': a.cc:11:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 11 | return; | ^~~~~~
s233120479
p03844
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; #define ll long long #define ld long double #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 #define sz(x) ((int)(x).size()) #define chmin(x,y) x = min(x,y) #define chmax(x,y) x = max(x,y) #define all(x) (x).beg...
a.cc: In function 'int main()': a.cc:19:9: error: expected initializer before '.' token 19 | ll a.b; | ^ a.cc:21:12: error: 'a' was not declared in this scope 21 | cin >> a >> op >> b; | ^ a.cc:21:23: error: 'b' was not declared in this scope 21 | cin >> a >> op >> b;...
s020079572
p03844
C++
#include<bits/stdc++.h> using namespace std; int main () { char A, B; string op; cin >> A >> op >> B; if (op=='+') { cout << A+B << endl; } else { cout << A-B << endl; } }
a.cc: In function 'int main()': a.cc:9:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if (op=='+') { | ~~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<...
s466008736
p03844
C++
#include<bits/stdc++.h> using namespace std; int main () { char A, op, B; cin >> A >> op >> B; cout << A op B << endl; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before 'op' 8 | cout << A op B << endl; | ^~~ | ;
s574345349
p03844
C++
#include<bits/stdc++.h> using namespace std; int main () { char A, op, B; cin >> A >> op >> B; cout << 'A' 'op' 'B' << endl; }
a.cc:8:17: warning: multi-character character constant [-Wmultichar] 8 | cout << 'A' 'op' 'B' << endl; | ^~~~ a.cc: In function 'int main()': a.cc:8:16: error: expected ';' before '\x6f70' 8 | cout << 'A' 'op' 'B' << endl; | ^~~~~ | ;
s789250711
p03844
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b; string op; cin >> a >> op >> b; if(op == '+') a += b; else a -= b; cout << a << endl; }
a.cc: In function 'int main()': a.cc:9:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if(op == '+') a += b; | ~~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<ch...
s001984183
p03844
C
#include <stdio.h> #include <string.h> int main(void){ int A, B; char op; scanf("%d %c %d", &A, &op, &B); if (op == '+'){ printf("%d\n", A+B); } else if (op == '-'){ printf("%d\n", A-B); } else { printf("%s\n", "Invalid!") } return 0; }
main.c: In function 'main': main.c:13:31: error: expected ';' before '}' token 13 | printf("%s\n", "Invalid!") | ^ | ; 14 | } | ~