submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s618958116
p03811
C++
#include<iostream> #include<algorithm> using namespace std; int Eulg(int a, int b); int main(int argc, char *argv[]){ int N; cin>>N; int *a = new int[N](); for(int i=0; i<N; i++){ cin>>a[i]; } sort(a, a+N); bool flag = true; while(flag){ for(int i=0; i<N; i++){ for(int j=i+1; j<N; j++){ if(Eulg(a[i], a[j]) == 1){ if(a[i]<a[j]){ int tmp; tmp =a[i]; a[i] = b[i]; b[i] = tmp; } else flag = false; break; } } } } for(int i=0; i<N; i++) cout<<a[i]<<" "; delete[] a; return 0; } int Eulg(int a, int b){ if(a<b){ int tmp; tmp =a; a = b; b = tmp; } int r; r = a % b; while(r){ a = b; b = r; r = a % b; } return b; }
a.cc: In function 'int main(int, char**)': a.cc:29:48: error: 'b' was not declared in this scope 29 | a[i] = b[i]; | ^
s778662785
p03811
C++
#include<iostream> #include<algorithm> using namespace std; int Eulg(int a, int b); int main(int argc, char *argv[]){ int N; cin>>N; int *a = new int[N](); for(int i=0; i<N; i++){ cin>>a[i]; } sort(a, a+N); bool flag = true; while(flag){ for(int i=0; i<N; i++){ for(int j=i+1; j<N; j++){ if(Eulg(a[i], a[j]) == 1){ if(a[i]<a[j]){ int tmp; tmp =a[i]; a[i] = b[i]; b[i] = tmp; } else flag = false; break; } } } } for(int i=0; i<N; i++) cout<<a[i]<<" "; delete[] a; return 0; } int Eulg(int a, int b){ if(a<b){ int tmp; tmp =a; a = b; b = tmp; } int r; r = a % b; while(r){ a = b; b = r; r = a % b; } return b; }
a.cc: In function 'int main(int, char**)': a.cc:29:48: error: 'b' was not declared in this scope 29 | a[i] = b[i]; | ^
s717742136
p03811
C++
#include<iostream> #include<algorithm> using namespace std; int Eulg(int a, int b); int main(int argc, char *argv[]){ int N; cin>>N; int *a = new int[N](); for(int i=0; i<N; i++){ cin>>a[i]; } sort(a, a+N); bool flag = true; while(flag){ for(int i=0; i<N; i++){ for(int j=i+1; j<N; j++){ if(Eulg(a[i], a[j]) == 1){ if(a[i]<a[j]){ int tmp; tmp =a[i]; a[i] = b[i]; b[i] = tmp; } else flag = false; break; } } } } for(int i=0; i<N; i++) cout<<a[i]<<" "; delete[] a; return 0; } int Eulg(int a, int b){ if(a<b){ int tmp; tmp =a; a = b; b = tmp; } int r; r = a % b; while(r){ a = b; b = a / b; r = a % b; } return b; }
a.cc: In function 'int main(int, char**)': a.cc:29:48: error: 'b' was not declared in this scope 29 | a[i] = b[i]; | ^
s028131691
p03811
C++
#include <cstdio> #include <algorithm> #include <stack> #include <queue> #include <deque> #include <vector> #include <string> #include <string.h> #include <cstdlib> #include <ctime> #include <cmath> #include <map> #include <set> #include <iostream> #include <sstream> #include <numeric> #include <cctype> #include <bitset> #include <cassert> #include <random> #define fi first #define se second #define rep(i,n) for(int i = 0; i < (n); ++i) #define rrep(i,n) for(int i = 1; i <= (n); ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) #define gep(i,g,j) for(int i = g.head[j]; i != -1; i = g.e[i].next) #define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++) #define rng(a) a.begin(),a.end() #define maxs(x,y) x = max(x,y) #define mins(x,y) x = min(x,y) #define pb push_back #define sz(x) (int)(x).size() #define pcnt __builtin_popcount #define uni(x) x.erase(unique(rng(x)),x.end()) #define snuke srand((unsigned)clock()+(unsigned)time(NULL)); #define df(x) int x = in() #define dame { puts("-1"); return 0;} #define show(x) cout<<#x<<" = "<<x<<endl; #define PQ(T) priority_queue<T,vector<T>,greater<T> > #define bn(x) ((1<<x)-1) #define newline puts("") using namespace std; typedef long long int ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vl; typedef vector<P> vp; inline int in() { int x; scanf("%d",&x); return x;} inline void priv(vi a) { rep(i,sz(a)) printf("%d%c",a[i],i==sz(a)-1?'\n':' ');} template<typename T>istream& operator>>(istream&i,vector<T>&v) {rep(j,sz(v))i>>v[j];return i;} template<typename T>string join(vector<T>&v) {stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);} template<typename T>ostream& operator<<(ostream&o,vector<T>&v) {if(sz(v))o<<join(v);return o;} template<typename T1,typename T2>istream& operator>>(istream&i,pair<T1,T2>&v) {return i>>v.fi>>v.se;} template<typename T1,typename T2>ostream& operator<<(ostream&o,pair<T1,T2>&v) {return o<<v.fi<<","<<v.se;} const int MX = 100005, INF = 1001001001; const ll LINF = 1e18; const double eps = 1e-10; // coordinate compression struct X { typedef int T; vector<T> d; inline void add(T x) { d.pb(x);} void init() { sort(rng(d)); d.erase(unique(rng(d)), d.end()); } inline int size() { return sz(d);} inline int operator[](T x) { return upper_bound(rng(d),x)-d.begin()-1;} }; // // Lowlink // bridge : v->u, ord[u]==low[u] // articulation : exist ord[v]<=low[u] (root:*2) struct Lowlink { int n, k; vvi to, st, br, g, gr; vi ord, low, art, gv; Lowlink(int n=0):n(n),to(n),st(n),br(n),ord(n,-1),low(n),art(n){} void add(int a, int b) { to[a].pb(b); st[a].pb(0); to[b].pb(a); st[b].pb(0); } void dfs(int v, int p=-1) { ord[v] = low[v] = k++; rep(i,sz(to[v])) { int u = to[v][i]; if (u == p) continue; if (ord[u] == -1) { st[v][i] = 1; dfs(u,v); mins(low[v],low[u]); } else { st[v][i] = -1; mins(low[v],ord[u]); } } } void init() { k = 0; dfs(0); rep(i,n)rep(j,sz(to[i])) { int v = i, u = to[i][j]; if (ord[v] > ord[u]) swap(v,u); br[i].pb(ord[u] == low[u]); } rep(i,n) { int cnt = 0; rep(j,sz(to[i])) { if (st[i][j] == 1 && ord[i] <= low[to[i][j]]) ++cnt; } art[i] = cnt > !i; } g = vvi(1); gr = vvi(1); gv = vi(n); gfs(0,0); k = sz(g); } void gfs(int v, int r) { gr[r].pb(v); gv[v] = r; rep(i,sz(to[v])) { if (st[v][i] != 1) continue; if (br[v][i]) { g[r].pb(sz(g)); g.pb(vi(1,r)); gr.pb(vi()); gfs(to[v][i],sz(g)-1); } else gfs(to[v][i],r); } } }; // int main() { int n; scanf("%d",&n); vi a(n); rep(i,n) { scanf("%d",&a[i]); } X xs; vvi a; rep(i,n) { int na = a[i]; for (int j = 2; j*j <= na; ++j) { if (na%j) continue; xs.add(j); while (na%j == 0) { na /= j; } } if (na != 1) xs.add(na); } int m = sz(xs); xs.init(); map<int,vi> mp; rep(i,n) { vi ps; rep(j,m) { if (a[i]%xs.d[j] == 0) ps.pb(j); } mp[a[i]] = ps; } vi ans; while (sz(a)) { n = sz(a); sort(rng(a)); Lowlink g(n+m); rep(i,n) { vi ps = mp[a[i]]; for (int j : ps) g.add(i,n+j); } g.init(); } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:152:7: error: conflicting declaration 'vvi a' 152 | vvi a; | ^ a.cc:147:6: note: previous declaration as 'vi a' 147 | vi a(n); | ^
s605555995
p03812
C++
#include <iostream> #include <stdio.h> using namespace std; const int N = 3005; int n, tot, a[N], lnk[N], son[N << 1], nxt[N << 1]; bool win[N]; void add(int x, int y) { nxt[++tot] = lnk[x], lnk[x] = tot, son[tot] = y; } void dfs(int x, int p) { win[x] = 0; for (int j = lnk[x]; j; j = nxt[j]) { if (son[j] == p) continue; if (a[x] > a[son[j]]) { dfs(son[j], x); if (!win[son[j]]) win[x] = 1; } } } int main() { scanf_s("%d", &n); for (int i = 1; i <= n; i++) scanf_s("%d", &a[i]); for (int i = 1, x, y; i < n; i++) { scanf_s("%d%d", &x, &y); add(x, y), add(y, x); } for (int i = 1; i <= n; i++) { dfs(i, 0); if (win[i]) printf("%d ", i); } return 0; }
a.cc: In function 'int main()': a.cc:25:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 25 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s225838633
p03812
C++
#include <iostream> #include <stdio.h> using namespace std; const int N = 3005; int n, tot, a[N], lnk[N], son[N << 1], nxt[N << 1]; bool win[N]; void add(int x, int y) { nxt[++tot] = lnk[x], lnk[x] = tot, son[tot] = y; } void dfs(int x, int p) { win[x] = 0; for (int j = lnk[x]; j; j = nxt[j]) { if (son[j] == p) continue; if (a[x] > a[son[j]]) { dfs(son[j], x); if (!win[son[j]]) win[x] = 1; } } } int main() { scanf_s("%d", &n); for (int i = 1; i <= n; i++) scanf_s("%d", &a[i]); for (int i = 1, x, y; i < n; i++) { scanf_s("%d%d", &x, &y); add(x, y), add(y, x); } for (int i = 1; i <= n; i++) { dfs(i, 0); if (win[i]) printf("%d ", i); } return 0; }
a.cc: In function 'int main()': a.cc:25:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 25 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s512420616
p03812
C++
#include <cstdio> #include <vector> using namespace std; int n; int arr[3005]; int depth[3005]; vector<int> al[3005]; bool dfs(int i){ if (depth[i]&1){ bool trap=true; for (auto &it:al[i]){ if (arr[it]<arr[i]) trap=false; } if (trap) return true; } for (auto &it:al[i]){ if (arr[it]>=arr[i]) continue; depth[it]=depth[i]+1; if (dfs(it)) return true; } return false; int main(){ scanf("%d",&n); for (int x=1;x<=n;x++) scanf("%d",&arr[x]); int a,b; for (int x=1;x<n;x++){ scanf("%d%d",&a,&b); al[a].push_back(b); al[b].push_back(a); } for (int x=1;x<=n;x++){ depth[x]=0; if (dfs(x)) printf("%d ",x); } }
a.cc: In function 'bool dfs(int)': a.cc:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 28 | int main(){ | ^~ a.cc:28:9: note: remove parentheses to default-initialize a variable 28 | int main(){ | ^~ | -- a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable a.cc:28:11: error: a function-definition is not allowed here before '{' token 28 | int main(){ | ^ a.cc:43:2: error: expected '}' at end of input 43 | } | ^ a.cc:9:16: note: to match this '{' 9 | bool dfs(int i){ | ^
s645367494
p03812
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second const long long MAXN = 3e3 + 21, LG = 20, inf = 1e18; int n; int a[MAXN]; bool dp[MAXN]; vector<int> adj[MAXN]; void dfs(int v, int par = -1){ dp[v] = 0; for(auto &y: adj[v]) if(y ^ par && a[v] > a[y]) { dfs(y, v); dp[v] |= (!dp[y]); } } int main(){ ios_base::sync_with_stdio(false), can.tie(0), cout.tie(0); cin >> n; for(int i = 1; i <= n; i++) cin >> a[i]; for(int i = 1; i < n; i++) { int u, v; cin >> u >> v; adj[u].pb(v); adj[v].pb(u); } for(int i = 1; i <= n; i++){ dfs(i); if(dp[i]) cout << i << ' '; } cout <<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:25:39: error: 'can' was not declared in this scope; did you mean 'tan'? 25 | ios_base::sync_with_stdio(false), can.tie(0), cout.tie(0); | ^~~ | tan
s231303645
p03812
C++
#include<iostream> #include<vector> using namespace std; bool check[3001]; int n,x,y,w[3001]; vector<int> point[3001]; bool dfs(int u,int f) { check[u]=false; for(int v:point[])if(v!=f&&w[v]<w[u]) { dfs(v,u); if(!check[v]) { check[u]=true; break; } } } int main() { cin>>n; for(int i=1;i<=n;i++) scanf("%d",w+i); for(int i=1;i<n; i++) cin>>x>>y; point[x].push_back(y),point[y].push_back(x); for(int i=1;i<=n;i++) { dfs(i,0); if(check[i]) cout<<i<<" "; } cout<<endl; return 0; }
a.cc: In function 'bool dfs(int, int)': a.cc:10:25: error: expected primary-expression before ']' token 10 | for(int v:point[])if(v!=f&&w[v]<w[u]) { | ^ a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^
s646637175
p03812
C++
#include<iostream> #include<vector> using namespace std; bool check[3001]; int n,x,y,w[3001]; vector<int> point[3001]; bool dfs(int u,int f) { check[u]=false; for(int v:point[])if(v!=f&&w[v]<w[u]) { dfs(v,u); if(!check[v]) { check[u]=true; break; } } } int main() { cin>>n; for(int i=1;i<=n;i++) cin>>w+i; for(int i=1;i<n; i++) cin>>x>>y; point[x].push_back(y),point[y].push_back(x); for(int i=1;i<=n;i++) { dfs(i,0); if(check[i]) cout<<i<<" "; } return 0; }
a.cc: In function 'bool dfs(int, int)': a.cc:10:25: error: expected primary-expression before ']' token 10 | for(int v:point[])if(v!=f&&w[v]<w[u]) { | ^ a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type] 17 | } | ^ a.cc: In function 'int main()': a.cc:21:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int*') 21 | cin>>w+i; | ~~~^~~~~ | | | | | int* | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 21 | cin>>w+i; | ~^~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(short int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(short unsigned int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(unsigned int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(long int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(long unsigned int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(long long int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 21 | cin>>w+i; | ~^~ | | | int* a.cc:21:23: error: cannot bind rvalue '(long long unsigned int)(((int*)(& w)) + ((sizetype)(((long unsigned int)i) * 4)))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:21:23: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 21 | cin>>w+i; | ~^~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int*' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int*' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int*' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int*' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basi
s219170508
p03812
C++
#include<stdio.h> #include<vector> bool check[3005]; int n,x,y,w[3005]; vector<int> point[3005]; int dfs(int a,int k) { check[a]=false; for(int v:point[a])if(v!=k&&w[v]<w[a]) { dfs(v,a); if(!check[v]) { check[a]=true; break; } } } int main() { scanf("%d",&n); for(int i=1; i<=n; ++i) scanf("%d",w+i); for(int i=1; i<n; ++i) scanf("%d%d",&x,&y); point[x].push_back(y),point[y].push_back(x); for(int i=1; i<=n; ++i) { dfs(i,0); if(check[i]) printf("%d ",i); } system("pause"); }
a.cc:5:1: error: 'vector' does not name a type 5 | vector<int> point[3005]; | ^~~~~~ a.cc: In function 'int dfs(int, int)': a.cc:8:19: error: 'point' was not declared in this scope; did you mean 'printf'? 8 | for(int v:point[a])if(v!=k&&w[v]<w[a]) { | ^~~~~ | printf a.cc:15:1: warning: no return statement in function returning non-void [-Wreturn-type] 15 | } | ^ a.cc: In function 'int main()': a.cc:23:17: error: 'point' was not declared in this scope; did you mean 'printf'? 23 | point[x].push_back(y),point[y].push_back(x); | ^~~~~ | printf a.cc:29:9: error: 'system' was not declared in this scope 29 | system("pause"); | ^~~~~~
s553074770
p03812
C++
#include <cstdio> #include <iostream> #include <algorithm> #define MN 3010 std::vector<int> v[MN]; int c[MN], p[MN]; bool ok[MN]; bool cmp(int a, int b) {return c[a] < c[b];} int main() { int n; scanf("%d", &n); for(int i = 1; i <= n; i++) scanf("%d", &c[i]), p[i] = i; std::sort(p + 1, p + n + 1, cmp); for(int i = 1; i < n; i++) { int a, b; scanf("%d%d", &a, &b); v[a].push_back(b); v[b].push_back(a); } for(int i = 1; i <= n; i++) { int u = p[i]; for(int j = 0; j < v[u].size(); j++) if(c[v[u][j]] < c[u] && ok[v[u][j]] == 0) ok[u] = 1; } for(int i = 1; i <= n; i++) if(ok[i]) printf("%d ", i); }
a.cc:6:6: error: 'vector' in namespace 'std' does not name a template type 6 | std::vector<int> v[MN]; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm> +++ |+#include <vector> 4 | #define MN 3010 a.cc: In function 'int main()': a.cc:20:17: error: 'v' was not declared in this scope 20 | v[a].push_back(b); v[b].push_back(a); | ^ a.cc:25:36: error: 'v' was not declared in this scope 25 | for(int j = 0; j < v[u].size(); j++) | ^
s979864029
p03812
C++
#include<bits/stdc++.h> using namespace std; bool check[3001]; int n,x,y,w[3001],i; vector<int> point[3001]; bool dfs(int u,int f) { check[u]=false; for(int v:point[u]) if(v!=f&&w[v]<w[u]) { dfs(v,u); if(!check[v]) { check[u]=true; break; } } int main() { cin>>n; for(i=1;i<=n;++i) scanf("%d",w+i); for(i=1;i<n;++i){ scanf("%d%d",&x,&y); point[x].push_back(y); point[y].push_back(x); } for(i=1;i<=n;++i){ dfs(i,0); if(check[i]) printf("%d ",i); } return 0; }
a.cc: In function 'bool dfs(int, int)': a.cc:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 19 | int main() | ^~ a.cc:19:9: note: remove parentheses to default-initialize a variable 19 | int main() | ^~ | -- a.cc:19:9: note: or replace parentheses with braces to value-initialize a variable a.cc:20:1: error: a function-definition is not allowed here before '{' token 20 | { | ^ a.cc:35:2: error: expected '}' at end of input 35 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^ a.cc:35:2: warning: no return statement in function returning non-void [-Wreturn-type] 35 | } | ^
s551905673
p03812
C++
#include<bits/stdc++.h> using namespace std; bool check[3001]; int n,x,y,w[3001],i; vector<int> point[3001]; bool dfs(int u,int f) { check[u]=false; for(int v:point[u]) if(v!=f&&w[v]<w[u]) { dfs(v,u); if(!check[v]) { check[u]=true; break; } } int main() { cin>>n; for(i=1;i<=n;++i) scanf("%d",w+i); for(i=1;i<n;++i){ scanf("%d%d",&x,&y); point[x].push_back(y); point[y].push_back(x); } for(i=1;i<=n;++i){ dfs(i,0); if(check[i]) printf("%d ",i); } return 0; }
a.cc: In function 'bool dfs(int, int)': a.cc:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 19 | int main() | ^~ a.cc:19:9: note: remove parentheses to default-initialize a variable 19 | int main() | ^~ | -- a.cc:19:9: note: or replace parentheses with braces to value-initialize a variable a.cc:20:1: error: a function-definition is not allowed here before '{' token 20 | { | ^ a.cc:35:2: error: expected '}' at end of input 35 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^ a.cc:35:2: warning: no return statement in function returning non-void [-Wreturn-type] 35 | } | ^
s423737455
p03812
C++
#include<bits/stdc++.h> using namespace std; bool check[3001]; int n,x,y,w[3001],i; vector<int> point[3001]; bool dfs(int u,int f) { check[u]=false; for(int v:point[u]) if(v!=f&&w[v]<w[u]) { dfs(v,u); if(!check[v]) check[u]=true,break; } int main() { cin>>n; for(i=1;i<=n;++i) scanf("%d",w+i); for(i=1;i<n;++i) scanf("%d%d",&x,&y),point[x].push_back(y),point[y].push_back(x); for(i=1;i<=n;++i) {dfs(i,0);if(check[i])printf("%d ",i);} }
a.cc: In function 'bool dfs(int, int)': a.cc:14:55: error: expected primary-expression before 'break' 14 | check[u]=true,break; | ^~~~~ a.cc:17:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 17 | int main() | ^~ a.cc:17:9: note: remove parentheses to default-initialize a variable 17 | int main() | ^~ | -- a.cc:17:9: note: or replace parentheses with braces to value-initialize a variable a.cc:18:1: error: a function-definition is not allowed here before '{' token 18 | { | ^ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:7:1: note: to match this '{' 7 | { | ^ a.cc:26:2: warning: no return statement in function returning non-void [-Wreturn-type] 26 | } | ^
s953179865
p03812
C++
main()
a.cc:1:7: error: expected constructor, destructor, or type conversion at end of input 1 | main() | ^
s257147768
p03812
C++
#include<iostream> #include<string> #include<algorithm> #include<cstdio> #include<cstring> #include<cstdlib> #include<cmath> using namespace std; typedef long long s64; const int ONE = 1000005; const int MOD = 1e9 + 7; int get() { int res = 1, Q = 1; char c; while( (c = getchar()) < 48 || c > 57) if(c == '-') Q = -1; if(Q) res = c - 48; while( (c = getchar()) >= 48 && c <= 57) res = res * 10 + c - 48; return res * Q; } int n; int next[ONE], first[ONE], go[ONE], tot; void Add(int u, int v) { next[++tot] = first[u], first[u] = tot, go[tot] = v; next[++tot] = first[v], first[v] = tot, go[tot] = u; } int x, y; int SG[ONE], val[ONE]; void Dfs(int u, int father) { int pd = 0; for(int e = first[u]; e; e = next[e]) { int v = go[e]; if(v == father || val[v] >= val[u]) continue; Dfs(v, u); if(SG[v] == 0) pd = 1; } SG[u] = pd; } int main() { //freopen(".in","r",stdin); //freopen(".out","w",stdout); n = get(); for(int i = 1; i <= n; i++) val[i] = get(); for(int i = 1; i < n; i++) x = get(), y = get(), Add(x, y); for(int i = 1; i <= n; i++) { memset(SG, 0, sizeof(SG)); Dfs(i, 0); if(SG[i]) printf("%d ", i); } }
a.cc: In function 'void Add(int, int)': a.cc:30:17: error: reference to 'next' is ambiguous 30 | next[++tot] = first[u], first[u] = tot, go[tot] = v; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:26:5: note: 'int next [1000005]' 26 | int next[ONE], first[ONE], go[ONE], tot; | ^~~~ a.cc:31:17: error: reference to 'next' is ambiguous 31 | next[++tot] = first[v], first[v] = tot, go[tot] = u; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:26:5: note: 'int next [1000005]' 26 | int next[ONE], first[ONE], go[ONE], tot; | ^~~~ a.cc: In function 'void Dfs(int, int)': a.cc:40:46: error: reference to 'next' is ambiguous 40 | for(int e = first[u]; e; e = next[e]) | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:26:5: note: 'int next [1000005]' 26 | int next[ONE], first[ONE], go[ONE], tot; | ^~~~
s813405410
p03812
C++
#include<bits/stdc++.h> using namespace std; int n,i,j,A[2000000],x,y; int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; bool lost[2000000],win[2000000]; inline void add(int x,int y) { top++,to[top]=y; if(first[x]==0)first[x]=top;else next[last[x]]=top; last[x]=top; } void dfs(int x) { int mn=2100000000,i=first[x]; while (i) { mn=min(A[to[i]],mn); i=next[i]; } if(mn>=A[x])lost[x]=true; if(lost[x]) { i=first[x]; while (i) { if(A[to[i]]>A[x])win[to[i]]=true; i=next[i]; } } i=first[x]; while (i) { if(fa[to[i]]!=x)fa[to[i]]=x,dfs(to[i]); i=next[i]; } } inline int read() { char ch=getchar();int ret=0,flag=1; while(ch<'0'||ch>'9') {if(ch=='-') flag=-1; ch=getchar();} while(ch>='0'&&ch<='9') ret=ret*10+ch-'0',ch=getchar(); return ret*flag; } int main() { n=read(); for (i=1;i<=n;i++)A[i]=read(); for (i=1;i<n;i++)x=read(),y=read(),add(x,y),add(y,x); fa[1]=1; dfs(1); for (i=1;i<=n;i++)if(win[i])printf("%d ",i); return 0; }
a.cc: In function 'void add(int, int)': a.cc:9:42: error: reference to 'next' is ambiguous 9 | if(first[x]==0)first[x]=top;else next[last[x]]=top; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:4:36: note: 'int next [5000000]' 4 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc: In function 'void dfs(int)': a.cc:18:19: error: reference to 'next' is ambiguous 18 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:4:36: note: 'int next [5000000]' 4 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc:27:27: error: reference to 'next' is ambiguous 27 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:4:36: note: 'int next [5000000]' 4 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc:34:19: error: reference to 'next' is ambiguous 34 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:4:36: note: 'int next [5000000]' 4 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~
s107981748
p03812
C++
#pragma GCC optimize(3) #include<bits/stdc++.h> using namespace std; int n,i,j,A[2000000],x,y; int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; bool lost[2000000],win[2000000]; inline void add(int x,int y) { top++,to[top]=y; if(first[x]==0)first[x]=top;else next[last[x]]=top; last[x]=top; } void dfs(int x) { int mn=2100000000,i=first[x]; while (i) { mn=min(A[to[i]],mn); i=next[i]; } if(mn>=A[x])lost[x]=true; if(lost[x]) { i=first[x]; while (i) { if(A[to[i]]>A[x])win[to[i]]=true; i=next[i]; } } i=first[x]; while (i) { if(fa[to[i]]!=x)fa[to[i]]=x,dfs(to[i]); i=next[i]; } } inline int read() { char ch=getchar();int ret=0,flag=1; while(ch<'0'||ch>'9') {if(ch=='-') flag=-1; ch=getchar();} while(ch>='0'&&ch<='9') ret=ret*10+ch-'0',ch=getchar(); return ret*flag; } int main() { n=read(); for (i=1;i<=n;i++)A[i]=read(); for (i=1;i<n;i++)x=read(),y=read(),add(x,y),add(y,x); fa[1]=1; dfs(1); for (i=1;i<=n;i++)if(win[i])printf("%d ",i); return 0; }
a.cc: In function 'void add(int, int)': a.cc:10:42: error: reference to 'next' is ambiguous 10 | if(first[x]==0)first[x]=top;else next[last[x]]=top; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:2: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:5:36: note: 'int next [5000000]' 5 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc: In function 'void dfs(int)': a.cc:19:19: error: reference to 'next' is ambiguous 19 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:5:36: note: 'int next [5000000]' 5 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc:28:27: error: reference to 'next' is ambiguous 28 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:5:36: note: 'int next [5000000]' 5 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~ a.cc:35:19: error: reference to 'next' is ambiguous 35 | i=next[i]; | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:5:36: note: 'int next [5000000]' 5 | int fa[2000000],first[2000000],top,next[5000000],last[5000000],to[5000000]; | ^~~~
s506586171
p03812
C++
#include<bits/stdc++.h> using namespace std; namespace fastIO{ #define BUF_SIZE 100005 #define OUT_SIZE 100005 #define ll long long //fread->read bool IOerror=0; inline char nc(){ static char buf[BUF_SIZE],*p1=buf+BUF_SIZE,*pend=buf+BUF_SIZE; if (p1==pend){ p1=buf; pend=buf+fread(buf,1,BUF_SIZE,stdin); if (pend==p1){IOerror=1;return -1;} //{printf("IO error!\n");system("pause");for (;;);exit(0);} } return *p1++; } inline bool blank(char ch){return ch==' '||ch=='\n'||ch=='\r'||ch=='\t';} inline void read(int &x){ bool sign=0; char ch=nc(); x=0; for (;blank(ch);ch=nc()); if (IOerror)return; if (ch=='-')sign=1,ch=nc(); for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0'; if (sign)x=-x; } inline void read(ll &x){ bool sign=0; char ch=nc(); x=0; for (;blank(ch);ch=nc()); if (IOerror)return; if (ch=='-')sign=1,ch=nc(); for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0'; if (sign)x=-x; } inline void read(double &x){ bool sign=0; char ch=nc(); x=0; for (;blank(ch);ch=nc()); if (IOerror)return; if (ch=='-')sign=1,ch=nc(); for (;ch>='0'&&ch<='9';ch=nc())x=x*10+ch-'0'; if (ch=='.'){ double tmp=1; ch=nc(); for (;ch>='0'&&ch<='9';ch=nc())tmp/=10.0,x+=tmp*(ch-'0'); } if (sign)x=-x; } inline void read(char *s){ char ch=nc(); for (;blank(ch);ch=nc()); if (IOerror)return; for (;!blank(ch)&&!IOerror;ch=nc())*s++=ch; *s=0; } inline void read(char &c){ for (c=nc();blank(c);c=nc()); if (IOerror){c=-1;return;} } //getchar->read inline void read1(int &x){ char ch;int bo=0;x=0; for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1; for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar()); if (bo)x=-x; } inline void read1(ll &x){ char ch;int bo=0;x=0; for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1; for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar()); if (bo)x=-x; } inline void read1(double &x){ char ch;int bo=0;x=0; for (ch=getchar();ch<'0'||ch>'9';ch=getchar())if (ch=='-')bo=1; for (;ch>='0'&&ch<='9';x=x*10+ch-'0',ch=getchar()); if (ch=='.'){ double tmp=1; for (ch=getchar();ch>='0'&&ch<='9';tmp/=10.0,x+=tmp*(ch-'0'),ch=getchar()); } if (bo)x=-x; } inline void read1(char *s){ char ch=getchar(); for (;blank(ch);ch=getchar()); for (;!blank(ch);ch=getchar())*s++=ch; *s=0; } inline void read1(char &c){for (c=getchar();blank(c);c=getchar());} //scanf->read inline void read2(int &x){scanf("%d",&x);} inline void read2(ll &x){ #ifdef _WIN32 scanf("%I64d",&x); #else #ifdef __linux scanf("%lld",&x); #else puts("error:can‘t recognize the system!"); #endif #endif } inline void read2(double &x){scanf("%lf",&x);} inline void read2(char *s){scanf("%s",s);} inline void read2(char &c){scanf(" %c",&c);} inline void readln2(char *s){gets(s);} //fwrite->write struct Ostream_fwrite{ char *buf,*p1,*pend; Ostream_fwrite(){buf=new char[BUF_SIZE];p1=buf;pend=buf+BUF_SIZE;} void out(char ch){ if (p1==pend){ fwrite(buf,1,BUF_SIZE,stdout);p1=buf; } *p1++=ch; } void print(int x){ static char s[15],*s1;s1=s; if (!x)*s1++='0';if (x<0)out('-'),x=-x; while(x)*s1++=x%10+'0',x/=10; while(s1--!=s)out(*s1); } void println(int x){ static char s[15],*s1;s1=s; if (!x)*s1++='0';if (x<0)out('-'),x=-x; while(x)*s1++=x%10+'0',x/=10; while(s1--!=s)out(*s1); out('\n'); } void print(ll x){ static char s[25],*s1;s1=s; if (!x)*s1++='0';if (x<0)out('-'),x=-x; while(x)*s1++=x%10+'0',x/=10; while(s1--!=s)out(*s1); } void println(ll x){ static char s[25],*s1;s1=s; if (!x)*s1++='0';if (x<0)out('-'),x=-x; while(x)*s1++=x%10+'0',x/=10; while(s1--!=s)out(*s1); out('\n'); } void print(double x,int y){ static ll mul[]={1,10,100,1000,10000,100000,1000000,10000000,100000000, 1000000000,10000000000LL,100000000000LL,1000000000000LL,10000000000000LL, 100000000000000LL,1000000000000000LL,10000000000000000LL,100000000000000000LL}; if (x<-1e-12)out('-'),x=-x;x*=mul[y]; ll x1=(ll)floor(x); if (x-floor(x)>=0.5)++x1; ll x2=x1/mul[y],x3=x1-x2*mul[y]; print(x2); if (y>0){out('.'); for (size_t i=1;i<y&&x3*mul[i]<mul[y];out('0'),++i); print(x3);} } void println(double x,int y){print(x,y);out('\n');} void print(char *s){while (*s)out(*s++);} void println(char *s){while (*s)out(*s++);out('\n');} void flush(){if (p1!=buf){fwrite(buf,1,p1-buf,stdout);p1=buf;}} ~Ostream_fwrite(){flush();} }Ostream; inline void print(int x){Ostream.print(x);} inline void println(int x){Ostream.println(x);} inline void print(char x){Ostream.out(x);} inline void println(char x){Ostream.out(x);Ostream.out('\n');} inline void print(ll x){Ostream.print(x);} inline void println(ll x){Ostream.println(x);} inline void print(double x,int y){Ostream.print(x,y);} inline void println(double x,int y){Ostream.println(x,y);} inline void print(char *s){Ostream.print(s);} inline void println(char *s){Ostream.println(s);} inline void println(){Ostream.out('\n');} inline void flush(){Ostream.flush();} //puts->write char Out[OUT_SIZE],*o=Out; inline void print1(int x){ static char buf[15]; char *p1=buf;if (!x)*p1++='0';if (x<0)*o++='-',x=-x; while(x)*p1++=x%10+'0',x/=10; while(p1--!=buf)*o++=*p1; } inline void println1(int x){print1(x);*o++='\n';} inline void print1(ll x){ static char buf[25]; char *p1=buf;if (!x)*p1++='0';if (x<0)*o++='-',x=-x; while(x)*p1++=x%10+'0',x/=10; while(p1--!=buf)*o++=*p1; } inline void println1(ll x){print1(x);*o++='\n';} inline void print1(char c){*o++=c;} inline void println1(char c){*o++=c;*o++='\n';} inline void print1(char *s){while (*s)*o++=*s++;} inline void println1(char *s){print1(s);*o++='\n';} inline void println1(){*o++='\n';} inline void flush1(){if (o!=Out){if (*(o-1)=='\n')*--o=0;puts(Out);}} struct puts_write{ ~puts_write(){flush1();} }_puts; inline void print2(int x){printf("%d",x);} inline void println2(int x){printf("%d\n",x);} inline void print2(char x){printf("%c",x);} inline void println2(char x){printf("%c\n",x);} inline void print2(ll x){ #ifdef _WIN32 printf("%I64d",x); #else #ifdef __linux printf("%lld",x); #else puts("error:can‘t recognize the system!"); #endif #endif } inline void println2(ll x){print2(x);printf("\n");} inline void println2(){printf("\n");} #undef ll #undef OUT_SIZE #undef BUF_SIZE }; using namespace fastIO; struct R{ int to,nex; }r[2002000]; int hea[1001000],cnt=1; int n,a[1001000],f[1001000],x,y; bitset<1001000>bo; void U(int x,int y,int fl){ f[x]+=fl*(!f[y]&&a[x]>a[y]); } void ddd(int x,int fff){ int y; f[x]=0; for (int i=hea[x];i>0;i=r[i].nex){ y=r[i].to; if (y==fff) continue; ddd(y,x); U(x,y,1); } } void dfs(int x,int fff){ if (f[x]) bo[x]=1; int y; for (int i=hea[x];i>0;i=r[i].nex){ y=r[i].to; if (y==fff) continue; U(x,y,-1); U(y,x,1); dfs(y,x); U(y,x,-1); U(x,y,1); } } int main(){ //freopen("C.in","r",stdin); freopen("C.out","w",stdout); bo.reset(); read(n); for (int i=1;i<=n;i++) read(a[i]); for (int i=1;i<n;i++){ read(x); read(y); r[++cnt]=(R){y,hea[x]}; hea[x]=cnt; r[++cnt]=(R){x,hea[y]}; hea[y]=cnt; } ddd(1,0); dfs(1,0); for (int i=1;i<=n;i++) if (bo[i]) printf("%d ",i); }
a.cc: In function 'void fastIO::readln2(char*)': a.cc:105:34: error: 'gets' was not declared in this scope; did you mean 'getw'? 105 | inline void readln2(char *s){gets(s);} | ^~~~ | getw
s553113193
p03812
C++
#include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; typedef long long ll; const int maxn=10010; int pre[maxn], nxt[maxn], to[maxn], A[maxn], tot=1; bool vis[maxn],res[maxn]; vector<int>ans; bool dfs(int x){ if(vis[x])return res[x]; vis[x]=1; bool flag=false; for(int t=pre[x];t;t=nxt[t])if(A[to[t]]<A[x]){ if(!dfs(to[t])){ flag=true; break; } } if(flag)ans.push_back(x); return res[x]=flag; } int main(){ int N; scanf("%d",&N); for(int i=1;i<=N;i++)scanf("%d",A+i); for(int i=1;i< N;i++){ int u,v; scanf("%d%d",&u,&v); to[tot]=v, nxt[tot]=pre[u], pre[u]=tot++; to[tot]=u, nxt[tot]=pre[v], pre[v]=tot++; } memset(vis,0,sizeof(vis)); for(int i=1;i<=N;i++)dfs(i); sort(ans.begin(), ans.end()); if(ans.empty())puts(""); else{ for(int i=0; i<ans.size()-1; i++)printf("%d ", ans[i]); printf("%d\n", ans[ans.size()-1]); } return 0; }
a.cc:10:1: error: 'vector' does not name a type 10 | vector<int>ans; | ^~~~~~ a.cc: In function 'bool dfs(int)': a.cc:21:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 21 | if(flag)ans.push_back(x); | ^~~ | abs a.cc: In function 'int main()': a.cc:36:14: error: 'ans' was not declared in this scope; did you mean 'abs'? 36 | sort(ans.begin(), ans.end()); | ^~~ | abs
s749188498
p03812
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #include<cstdlib> #include<ctime> #include<queue> #include<set> using namespace std; typedef long long LL; const int N=3010; int gi() { int w=0;bool q=1;char c=getchar(); while ((c<'0'||c>'9') && c!='-') c=getchar(); if (c=='-') q=0,c=getchar(); while (c>='0'&&c <= '9') w=w*10+c-'0',c=getchar(); return q? w:-w; } int s[N],deg[N],q[N]; bool win[N]; int head[N],next[N],to[N]; int main() { int n=gi(),i,a,b,tot=0,l=0,r=0,k; for (i=1;i<=n;i++) s[i]=gi(); for (i=1;i<n;i++) { a=gi(),b=gi(); if (s[a]>s[b]) swap(a,b); if (s[a]<s[b]) deg[to[++tot]=b]++,next[tot]=head[a],head[a]=tot; } for (i=1;i<=n;i++) if (!deg[i]) q[++r]=i; while (l!=r) if (!win[k=q[++l]]) for (i=head[k];i;i=next[i]) { win[to[i]]=true; if (!--deg[to[i]]) q[++r]=to[i]; } for (i=1;i<=n;i++) if (win[i]) printf("%d ",i); return 0; }
a.cc: In function 'int main()': a.cc:32:44: error: reference to 'next' is ambiguous 32 | deg[to[++tot]=b]++,next[tot]=head[a],head[a]=tot; | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:23:13: note: 'int next [3010]' 23 | int head[N],next[N],to[N]; | ^~~~ a.cc:37:44: error: reference to 'next' is ambiguous 37 | for (i=head[k];i;i=next[i]) { | ^~~~ /usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: candidates are: 'template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename iterator_traits<_Iter>::difference_type)' 232 | next(_InputIterator __x, typename | ^~~~ a.cc:23:13: note: 'int next [3010]' 23 | int head[N],next[N],to[N]; | ^~~~
s468136079
p03812
C++
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) #define zero(x) (((x)>0?(x):-(x))<eps) typedef vector<int> VI; typedef long long LL; typedef pair<int,int>PII; const double eps=1e-6; const double pi=acos(-1.0); const LL mod=1e18+7; const int INF=0x3f3f3f3f; //LL powmod(LL a,LL b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;} VI v[100010]; int sg[3010]; int dfs(int x){ sg[x]=0; for(auto i:v[x]){ if(~sg[i]) continue; dfs(i); if(a[x]>a[i]&&sg[i]==0){ sg[x]=1; break; } } } int main(){ // freopen("in.in","r",stdin); // freopen("out.out",";w",stdout); int n,x,y; cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; for(int i=1;i<n;i++){ cin>>x>>y; v[x].pb(y); v[y].pb(x); } for(int i=1;i<=n;i++){ memset(sg,-1,sizeof sg); if(dfs(i)) cout<<i<<" "; } puts(""); return 0; } /* */
a.cc: In function 'int dfs(int)': a.cc:25:12: error: 'a' was not declared in this scope 25 | if(a[x]>a[i]&&sg[i]==0){ | ^ a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type] 30 | } | ^ a.cc: In function 'int main()': a.cc:36:32: error: 'a' was not declared in this scope 36 | for(int i=1;i<=n;i++) cin>>a[i]; | ^
s537951838
p03812
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using u32 = uint32_t; using vi = vector<int>; using vvi = vector<vi>; using vb = vector<bool>; using vvb = vector<vb>; using vl = vector<ll>; using vvl = vector<vl>; using vd = vector<double>; using vvd = vector<vd>; #define MAXC(c, x) (c = max(c, x)) #define MINC(c, x) (c = min(c, x)) #define REP(i,n) for(auto i = 0 * (n), i##_len = (n); i < i##_len; ++i) #define ALL(c) (c).begin(), (c).end() #define FOR(i,s,n) for(ll i=s, i##_len=(ll)(n); i<i##_len; ++i) #define TEN(x) ((ll)1e##x) const ll mod = TEN(9) + 7; // 制約fを満たす最大値(最小値)の二分探索 // ok < ng なら最大値,ok > ng なら最小値探索になる template<class T, typename F> T bsearch(T ok, T ng, int loop, F f) { for(int i = 0; i < loop; ++i) { T middle = (ok + ng) / 2; (f(middle) ? ok : ng) = middle; } return ok; } #define EPS (1e-10) int main() { #ifdef INPUT_FROM_FILE ifstream cin("sample.in"); ofstream cout("sample.out"); #endif cin.tie(0); ios_base::sync_with_stdio(false); cout << fixed << setprecision(50); ll n; cin >> n; vl A(n); REP(i, n) cin >> A[i]; vvl path(n); REP(i, n) { ll a, b; cin >> a >> b; a--, b--; path[a].push_back(b); path[b].push_back(a); } vb yes(n, false); REP(i, n) { if (A[i] == 0) { for (ll e : path[i]) {if (A[e] != 0) yes[e] = true; } ll mi = TEN(10); for (ll e : path[i]) { mi = min(mi, A[e]); } if (mi >= A[i]) { for (ll e : path[i]) { if (mi == A[e] && A[i] < mi) yes[e] = true; if (mi != A[e] && A[i] <= mi) yes[e] = true; } } } REP(i, n) if (yes[i]) cout << i + 1 << " "; cout << endl; }
a.cc: In function 'int main()': a.cc:69:2: error: expected '}' at end of input 69 | } | ^ a.cc:32:12: note: to match this '{' 32 | int main() { | ^
s977975736
p03813
C
#include <bits/stdc++.h> #include <algorithm> #include <array> #ifdef _MSC_VER #include <intrin.h> #endif namespace atcoder { namespace internal { // @param n `0 <= n` // @return minimum non-negative `x` s.t. `n <= 2**x` int ceil_pow2(int n) { int x = 0; while ((1U << x) < (unsigned int)(n)) x++; return x; } // @param n `1 <= n` // @return minimum non-negative `x` s.t. `(n & (1 << x)) != 0` int bsf(unsigned int n) { #ifdef _MSC_VER unsigned long index; _BitScanForward(&index, n); return index; #else return __builtin_ctz(n); #endif } } // namespace internal } // namespace atcoder #include <utility> namespace atcoder { namespace internal { // @param m `1 <= m` // @return x mod m constexpr long long safe_mod(long long x, long long m) { x %= m; if (x < 0) x += m; return x; } // Fast moduler by barrett reduction // Reference: https://en.wikipedia.org/wiki/Barrett_reduction // NOTE: reconsider after Ice Lake struct barrett { unsigned int _m; unsigned long long im; // @param m `1 <= m` barrett(unsigned int m) : _m(m), im((unsigned long long)(-1) / m + 1) {} // @return m unsigned int umod() const { return _m; } // @param a `0 <= a < m` // @param b `0 <= b < m` // @return `a * b % m` unsigned int mul(unsigned int a, unsigned int b) const { // [1] m = 1 // a = b = im = 0, so okay // [2] m >= 2 // im = ceil(2^64 / m) // -> im * m = 2^64 + r (0 <= r < m) // let z = a*b = c*m + d (0 <= c, d < m) // a*b * im = (c*m + d) * im = c*(im*m) + d*im = c*2^64 + c*r + d*im // c*r + d*im < m * m + m * im < m * m + 2^64 + m <= 2^64 + m * (m + 1) < 2^64 * 2 // ((ab * im) >> 64) == c or c + 1 unsigned long long z = a; z *= b; #ifdef _MSC_VER unsigned long long x; _umul128(z, im, &x); #else unsigned long long x = (unsigned long long)(((unsigned __int128)(z)*im) >> 64); #endif unsigned int v = (unsigned int)(z - x * _m); if (_m <= v) v += _m; return v; } }; // @param n `0 <= n` // @param m `1 <= m` // @return `(x ** n) % m` constexpr long long pow_mod_constexpr(long long x, long long n, int m) { if (m == 1) return 0; unsigned int _m = (unsigned int)(m); unsigned long long r = 1; unsigned long long y = safe_mod(x, m); while (n) { if (n & 1) r = (r * y) % _m; y = (y * y) % _m; n >>= 1; } return r; } // Reference: // M. Forisek and J. Jancina, // Fast Primality Testing for Integers That Fit into a Machine Word // @param n `0 <= n` constexpr bool is_prime_constexpr(int n) { if (n <= 1) return false; if (n == 2 || n == 7 || n == 61) return true; if (n % 2 == 0) return false; long long d = n - 1; while (d % 2 == 0) d /= 2; for (long long a : {2, 7, 61}) { long long t = d; long long y = pow_mod_constexpr(a, t, n); while (t != n - 1 && y != 1 && y != n - 1) { y = y * y % n; t <<= 1; } if (y != n - 1 && t % 2 == 0) { return false; } } return true; } template <int n> constexpr bool is_prime = is_prime_constexpr(n); // @param b `1 <= b` // @return pair(g, x) s.t. g = gcd(a, b), xa = g (mod b), 0 <= x < b/g constexpr std::pair<long long, long long> inv_gcd(long long a, long long b) { a = safe_mod(a, b); if (a == 0) return {b, 0}; // Contracts: // [1] s - m0 * a = 0 (mod b) // [2] t - m1 * a = 0 (mod b) // [3] s * |m1| + t * |m0| <= b long long s = b, t = a; long long m0 = 0, m1 = 1; while (t) { long long u = s / t; s -= t * u; m0 -= m1 * u; // |m1 * u| <= |m1| * s <= b // [3]: // (s - t * u) * |m1| + t * |m0 - m1 * u| // <= s * |m1| - t * u * |m1| + t * (|m0| + |m1| * u) // = s * |m1| + t * |m0| <= b auto tmp = s; s = t; t = tmp; tmp = m0; m0 = m1; m1 = tmp; } // by [3]: |m0| <= b/g // by g != b: |m0| < b/g if (m0 < 0) m0 += b / s; return {s, m0}; } // Compile time primitive root // @param m must be prime // @return primitive root (and minimum in now) constexpr int primitive_root_constexpr(int m) { if (m == 2) return 1; if (m == 167772161) return 3; if (m == 469762049) return 3; if (m == 754974721) return 11; if (m == 998244353) return 3; int divs[20] = {}; divs[0] = 2; int cnt = 1; int x = (m - 1) / 2; while (x % 2 == 0) x /= 2; for (int i = 3; (long long)(i)*i <= x; i += 2) { if (x % i == 0) { divs[cnt++] = i; while (x % i == 0) { x /= i; } } } if (x > 1) { divs[cnt++] = x; } for (int g = 2;; g++) { bool ok = true; for (int i = 0; i < cnt; i++) { if (pow_mod_constexpr(g, (m - 1) / divs[i], m) == 1) { ok = false; break; } } if (ok) return g; } } template <int m> constexpr int primitive_root = primitive_root_constexpr(m); } // namespace internal } // namespace atcoder #include <cassert> #include <numeric> #include <type_traits> namespace atcoder { namespace internal { #ifndef _MSC_VER template <class T> using is_signed_int128 = typename std::conditional<std::is_same<T, __int128_t>::value || std::is_same<T, __int128>::value, std::true_type, std::false_type>::type; template <class T> using is_unsigned_int128 = typename std::conditional<std::is_same<T, __uint128_t>::value || std::is_same<T, unsigned __int128>::value, std::true_type, std::false_type>::type; template <class T> using make_unsigned_int128 = typename std::conditional<std::is_same<T, __int128_t>::value, __uint128_t, unsigned __int128>; template <class T> using is_integral = typename std::conditional<std::is_integral<T>::value || is_signed_int128<T>::value || is_unsigned_int128<T>::value, std::true_type, std::false_type>::type; template <class T> using is_signed_int = typename std::conditional<(is_integral<T>::value && std::is_signed<T>::value) || is_signed_int128<T>::value, std::true_type, std::false_type>::type; template <class T> using is_unsigned_int = typename std::conditional<(is_integral<T>::value && std::is_unsigned<T>::value) || is_unsigned_int128<T>::value, std::true_type, std::false_type>::type; template <class T> using to_unsigned = typename std::conditional< is_signed_int128<T>::value, make_unsigned_int128<T>, typename std::conditional<std::is_signed<T>::value, std::make_unsigned<T>, std::common_type<T>>::type>::type; #else template <class T> using is_integral = typename std::is_integral<T>; template <class T> using is_signed_int = typename std::conditional<is_integral<T>::value && std::is_signed<T>::value, std::true_type, std::false_type>::type; template <class T> using is_unsigned_int = typename std::conditional<is_integral<T>::value && std::is_unsigned<T>::value, std::true_type, std::false_type>::type; template <class T> using to_unsigned = typename std::conditional<is_signed_int<T>::value, std::make_unsigned<T>, std::common_type<T>>::type; #endif template <class T> using is_signed_int_t = std::enable_if_t<is_signed_int<T>::value>; template <class T> using is_unsigned_int_t = std::enable_if_t<is_unsigned_int<T>::value>; template <class T> using to_unsigned_t = typename to_unsigned<T>::type; } // namespace internal } // namespace atcoder #include <cassert> #include <numeric> #include <type_traits> #ifdef _MSC_VER #include <intrin.h> #endif namespace atcoder { namespace internal { struct modint_base {}; struct static_modint_base : modint_base {}; template <class T> using is_modint = std::is_base_of<modint_base, T>; template <class T> using is_modint_t = std::enable_if_t<is_modint<T>::value>; } // namespace internal template <int m, std::enable_if_t<(1 <= m)>* = nullptr> struct static_modint : internal::static_modint_base { using mint = static_modint; public: static constexpr int mod() { return m; } static mint raw(int v) { mint x; x._v = v; return x; } static_modint() : _v(0) {} template <class T, internal::is_signed_int_t<T>* = nullptr> static_modint(T v) { long long x = (long long)(v % (long long)(umod())); if (x < 0) x += umod(); _v = (unsigned int)(x); } template <class T, internal::is_unsigned_int_t<T>* = nullptr> static_modint(T v) { _v = (unsigned int)(v % umod()); } static_modint(bool v) { _v = ((unsigned int)(v) % umod()); } unsigned int val() const { return _v; } mint& operator++() { _v++; if (_v == umod()) _v = 0; return *this; } mint& operator--() { if (_v == 0) _v = umod(); _v--; return *this; } mint operator++(int) { mint result = *this; ++*this; return result; } mint operator--(int) { mint result = *this; --*this; return result; } mint& operator+=(const mint& rhs) { _v += rhs._v; if (_v >= umod()) _v -= umod(); return *this; } mint& operator-=(const mint& rhs) { _v -= rhs._v; if (_v >= umod()) _v += umod(); return *this; } mint& operator*=(const mint& rhs) { unsigned long long z = _v; z *= rhs._v; _v = (unsigned int)(z % umod()); return *this; } mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); } mint operator+() const { return *this; } mint operator-() const { return mint() - *this; } mint pow(long long n) const { assert(0 <= n); mint x = *this, r = 1; while (n) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; } mint inv() const { if (prime) { assert(_v); return pow(umod() - 2); } else { auto eg = internal::inv_gcd(_v, m); assert(eg.first == 1); return eg.second; } } friend mint operator+(const mint& lhs, const mint& rhs) { return mint(lhs) += rhs; } friend mint operator-(const mint& lhs, const mint& rhs) { return mint(lhs) -= rhs; } friend mint operator*(const mint& lhs, const mint& rhs) { return mint(lhs) *= rhs; } friend mint operator/(const mint& lhs, const mint& rhs) { return mint(lhs) /= rhs; } friend bool operator==(const mint& lhs, const mint& rhs) { return lhs._v == rhs._v; } friend bool operator!=(const mint& lhs, const mint& rhs) { return lhs._v != rhs._v; } private: unsigned int _v; static constexpr unsigned int umod() { return m; } static constexpr bool prime = internal::is_prime<m>; }; template <int id> struct dynamic_modint : internal::modint_base { using mint = dynamic_modint; public: static int mod() { return (int)(bt.umod()); } static void set_mod(int m) { assert(1 <= m); bt = internal::barrett(m); } static mint raw(int v) { mint x; x._v = v; return x; } dynamic_modint() : _v(0) {} template <class T, internal::is_signed_int_t<T>* = nullptr> dynamic_modint(T v) { long long x = (long long)(v % (long long)(mod())); if (x < 0) x += mod(); _v = (unsigned int)(x); } template <class T, internal::is_unsigned_int_t<T>* = nullptr> dynamic_modint(T v) { _v = (unsigned int)(v % mod()); } dynamic_modint(bool v) { _v = ((unsigned int)(v) % mod()); } unsigned int val() const { return _v; } mint& operator++() { _v++; if (_v == umod()) _v = 0; return *this; } mint& operator--() { if (_v == 0) _v = umod(); _v--; return *this; } mint operator++(int) { mint result = *this; ++*this; return result; } mint operator--(int) { mint result = *this; --*this; return result; } mint& operator+=(const mint& rhs) { _v += rhs._v; if (_v >= umod()) _v -= umod(); return *this; } mint& operator-=(const mint& rhs) { _v += mod() - rhs._v; if (_v >= umod()) _v -= umod(); return *this; } mint& operator*=(const mint& rhs) { _v = bt.mul(_v, rhs._v); return *this; } mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); } mint operator+() const { return *this; } mint operator-() const { return mint() - *this; } mint pow(long long n) const { assert(0 <= n); mint x = *this, r = 1; while (n) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; } mint inv() const { auto eg = internal::inv_gcd(_v, mod()); assert(eg.first == 1); return eg.second; } friend mint operator+(const mint& lhs, const mint& rhs) { return mint(lhs) += rhs; } friend mint operator-(const mint& lhs, const mint& rhs) { return mint(lhs) -= rhs; } friend mint operator*(const mint& lhs, const mint& rhs) { return mint(lhs) *= rhs; } friend mint operator/(const mint& lhs, const mint& rhs) { return mint(lhs) /= rhs; } friend bool operator==(const mint& lhs, const mint& rhs) { return lhs._v == rhs._v; } friend bool operator!=(const mint& lhs, const mint& rhs) { return lhs._v != rhs._v; } private: unsigned int _v; static internal::barrett bt; static unsigned int umod() { return bt.umod(); } }; template <int id> internal::barrett dynamic_modint<id>::bt = 998244353; using modint998244353 = static_modint<998244353>; using modint1000000007 = static_modint<1000000007>; using modint = dynamic_modint<-1>; namespace internal { template <class T> using is_static_modint = std::is_base_of<internal::static_modint_base, T>; template <class T> using is_static_modint_t = std::enable_if_t<is_static_modint<T>::value>; template <class> struct is_dynamic_modint : public std::false_type {}; template <int id> struct is_dynamic_modint<dynamic_modint<id>> : public std::true_type {}; template <class T> using is_dynamic_modint_t = std::enable_if_t<is_dynamic_modint<T>::value>; } // namespace internal } // namespace atcoder #include <cassert> #include <type_traits> #include <vector> namespace atcoder { namespace internal { template <class mint, internal::is_static_modint_t<mint>* = nullptr> void butterfly(std::vector<mint>& a) { static constexpr int g = internal::primitive_root<mint::mod()>; int n = int(a.size()); int h = internal::ceil_pow2(n); static bool first = true; static mint sum_e[30]; // sum_e[i] = ies[0] * ... * ies[i - 1] * es[i] if (first) { first = false; mint es[30], ies[30]; // es[i]^(2^(2+i)) == 1 int cnt2 = bsf(mint::mod() - 1); mint e = mint(g).pow((mint::mod() - 1) >> cnt2), ie = e.inv(); for (int i = cnt2; i >= 2; i--) { // e^(2^i) == 1 es[i - 2] = e; ies[i - 2] = ie; e *= e; ie *= ie; } mint now = 1; for (int i = 0; i < cnt2 - 2; i++) { sum_e[i] = es[i] * now; now *= ies[i]; } } for (int ph = 1; ph <= h; ph++) { int w = 1 << (ph - 1), p = 1 << (h - ph); mint now = 1; for (int s = 0; s < w; s++) { int offset = s << (h - ph + 1); for (int i = 0; i < p; i++) { auto l = a[i + offset]; auto r = a[i + offset + p] * now; a[i + offset] = l + r; a[i + offset + p] = l - r; } now *= sum_e[bsf(~(unsigned int)(s))]; } } } template <class mint, internal::is_static_modint_t<mint>* = nullptr> void butterfly_inv(std::vector<mint>& a) { static constexpr int g = internal::primitive_root<mint::mod()>; int n = int(a.size()); int h = internal::ceil_pow2(n); static bool first = true; static mint sum_ie[30]; // sum_ie[i] = es[0] * ... * es[i - 1] * ies[i] if (first) { first = false; mint es[30], ies[30]; // es[i]^(2^(2+i)) == 1 int cnt2 = bsf(mint::mod() - 1); mint e = mint(g).pow((mint::mod() - 1) >> cnt2), ie = e.inv(); for (int i = cnt2; i >= 2; i--) { // e^(2^i) == 1 es[i - 2] = e; ies[i - 2] = ie; e *= e; ie *= ie; } mint now = 1; for (int i = 0; i < cnt2 - 2; i++) { sum_ie[i] = ies[i] * now; now *= es[i]; } } for (int ph = h; ph >= 1; ph--) { int w = 1 << (ph - 1), p = 1 << (h - ph); mint inow = 1; for (int s = 0; s < w; s++) { int offset = s << (h - ph + 1); for (int i = 0; i < p; i++) { auto l = a[i + offset]; auto r = a[i + offset + p]; a[i + offset] = l + r; a[i + offset + p] = (unsigned long long)(mint::mod() + l.val() - r.val()) * inow.val(); } inow *= sum_ie[bsf(~(unsigned int)(s))]; } } } } // namespace internal template <class mint, internal::is_static_modint_t<mint>* = nullptr> std::vector<mint> convolution(std::vector<mint> a, std::vector<mint> b) { int n = int(a.size()), m = int(b.size()); if (!n || !m) return {}; if (std::min(n, m) <= 60) { if (n < m) { std::swap(n, m); std::swap(a, b); } std::vector<mint> ans(n + m - 1); for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { ans[i + j] += a[i] * b[j]; } } return ans; } int z = 1 << internal::ceil_pow2(n + m - 1); a.resize(z); internal::butterfly(a); b.resize(z); internal::butterfly(b); for (int i = 0; i < z; i++) { a[i] *= b[i]; } internal::butterfly_inv(a); a.resize(n + m - 1); mint iz = mint(z).inv(); for (int i = 0; i < n + m - 1; i++) a[i] *= iz; return a; } template <unsigned int mod = 998244353, class T, std::enable_if_t<internal::is_integral<T>::value>* = nullptr> std::vector<T> convolution(const std::vector<T>& a, const std::vector<T>& b) { int n = int(a.size()), m = int(b.size()); if (!n || !m) return {}; using mint = static_modint<mod>; std::vector<mint> a2(n), b2(m); for (int i = 0; i < n; i++) { a2[i] = mint(a[i]); } for (int i = 0; i < m; i++) { b2[i] = mint(b[i]); } auto c2 = convolution(move(a2), move(b2)); std::vector<T> c(n + m - 1); for (int i = 0; i < n + m - 1; i++) { c[i] = c2[i].val(); } return c; } std::vector<long long> convolution_ll(const std::vector<long long>& a, const std::vector<long long>& b) { int n = int(a.size()), m = int(b.size()); if (!n || !m) return {}; static constexpr unsigned long long MOD1 = 754974721; // 2^24 static constexpr unsigned long long MOD2 = 167772161; // 2^25 static constexpr unsigned long long MOD3 = 469762049; // 2^26 static constexpr unsigned long long M2M3 = MOD2 * MOD3; static constexpr unsigned long long M1M3 = MOD1 * MOD3; static constexpr unsigned long long M1M2 = MOD1 * MOD2; static constexpr unsigned long long M1M2M3 = MOD1 * MOD2 * MOD3; static constexpr unsigned long long i1 = internal::inv_gcd(MOD2 * MOD3, MOD1).second; static constexpr unsigned long long i2 = internal::inv_gcd(MOD1 * MOD3, MOD2).second; static constexpr unsigned long long i3 = internal::inv_gcd(MOD1 * MOD2, MOD3).second; auto c1 = convolution<MOD1>(a, b); auto c2 = convolution<MOD2>(a, b); auto c3 = convolution<MOD3>(a, b); std::vector<long long> c(n + m - 1); for (int i = 0; i < n + m - 1; i++) { unsigned long long x = 0; x += (c1[i] * i1) % MOD1 * M2M3; x += (c2[i] * i2) % MOD2 * M1M3; x += (c3[i] * i3) % MOD3 * M1M2; // B = 2^63, -B <= x, r(real value) < B // (x, x - M, x - 2M, or x - 3M) = r (mod 2B) // r = c1[i] (mod MOD1) // focus on MOD1 // r = x, x - M', x - 2M', x - 3M' (M' = M % 2^64) (mod 2B) // r = x, // x - M' + (0 or 2B), // x - 2M' + (0, 2B or 4B), // x - 3M' + (0, 2B, 4B or 6B) (without mod!) // (r - x) = 0, (0) // - M' + (0 or 2B), (1) // -2M' + (0 or 2B or 4B), (2) // -3M' + (0 or 2B or 4B or 6B) (3) (mod MOD1) // we checked that // ((1) mod MOD1) mod 5 = 2 // ((2) mod MOD1) mod 5 = 3 // ((3) mod MOD1) mod 5 = 4 long long diff = c1[i] - internal::safe_mod((long long)(x), (long long)(MOD1)); if (diff < 0) diff += MOD1; static constexpr unsigned long long offset[5] = { 0, 0, M1M2M3, 2 * M1M2M3, 3 * M1M2M3}; x -= offset[diff % 5]; c[i] = x; } return c; } } // namespace atcoder #include <algorithm> #include <cassert> #include <vector> namespace atcoder { // Implement (union by size) + (path compression) // Reference: // Zvi Galil and Giuseppe F. Italiano, // Data structures and algorithms for disjoint set union problems struct dsu { public: dsu() : _n(0) {} dsu(int n) : _n(n), parent_or_size(n, -1) {} int merge(int a, int b) { assert(0 <= a && a < _n); assert(0 <= b && b < _n); int x = leader(a), y = leader(b); if (x == y) return x; if (-parent_or_size[x] < -parent_or_size[y]) std::swap(x, y); parent_or_size[x] += parent_or_size[y]; parent_or_size[y] = x; return x; } bool same(int a, int b) { assert(0 <= a && a < _n); assert(0 <= b && b < _n); return leader(a) == leader(b); } int leader(int a) { assert(0 <= a && a < _n); if (parent_or_size[a] < 0) return a; return parent_or_size[a] = leader(parent_or_size[a]); } int size(int a) { assert(0 <= a && a < _n); return -parent_or_size[leader(a)]; } std::vector<std::vector<int>> groups() { std::vector<int> leader_buf(_n), group_size(_n); for (int i = 0; i < _n; i++) { leader_buf[i] = leader(i); group_size[leader_buf[i]]++; } std::vector<std::vector<int>> result(_n); for (int i = 0; i < _n; i++) { result[i].reserve(group_size[i]); } for (int i = 0; i < _n; i++) { result[leader_buf[i]].push_back(i); } result.erase( std::remove_if(result.begin(), result.end(), [&](const std::vector<int>& v) { return v.empty(); }), result.end()); return result; } private: int _n; // root node: -1 * component size // otherwise: parent std::vector<int> parent_or_size; }; } // namespace atcoder #include <cassert> #include <vector> namespace atcoder { // Reference: https://en.wikipedia.org/wiki/Fenwick_tree template <class T> struct fenwick_tree { using U = internal::to_unsigned_t<T>; public: fenwick_tree() : _n(0) {} fenwick_tree(int n) : _n(n), data(n) {} void add(int p, T x) { assert(0 <= p && p < _n); p++; while (p <= _n) { data[p - 1] += U(x); p += p & -p; } } T sum(int l, int r) { assert(0 <= l && l <= r && r <= _n); return sum(r) - sum(l); } private: int _n; std::vector<U> data; U sum(int r) { U s = 0; while (r > 0) { s += data[r - 1]; r -= r & -r; } return s; } }; } // namespace atcoder #include <algorithm> #include <cassert> #include <iostream> #include <vector> namespace atcoder { template <class S, S (*op)(S, S), S (*e)(), class F, S (*mapping)(F, S), F (*composition)(F, F), F (*id)()> struct lazy_segtree { public: lazy_segtree() : lazy_segtree(0) {} lazy_segtree(int n) : lazy_segtree(std::vector<S>(n, e())) {} lazy_segtree(const std::vector<S>& v) : _n(int(v.size())) { log = internal::ceil_pow2(_n); size = 1 << log; d = std::vector<S>(2 * size, e()); lz = std::vector<F>(size, id()); for (int i = 0; i < _n; i++) d[size + i] = v[i]; for (int i = size - 1; i >= 1; i--) { update(i); } } void set(int p, S x) { assert(0 <= p && p < _n); p += size; for (int i = log; i >= 1; i--) push(p >> i); d[p] = x; for (int i = 1; i <= log; i++) update(p >> i); } S get(int p) { assert(0 <= p && p < _n); p += size; for (int i = log; i >= 1; i--) push(p >> i); return d[p]; } S prod(int l, int r) { assert(0 <= l && l <= r && r <= _n); if (l == r) return e(); l += size; r += size; for (int i = log; i >= 1; i--) { if (((l >> i) << i) != l) push(l >> i); if (((r >> i) << i) != r) push(r >> i); } S sml = e(), smr = e(); while (l < r) { if (l & 1) sml = op(sml, d[l++]); if (r & 1) smr = op(d[--r], smr); l >>= 1; r >>= 1; } return op(sml, smr); } S all_prod() { return d[1]; } void apply(int p, F f) { assert(0 <= p && p < _n); p += size; for (int i = log; i >= 1; i--) push(p >> i); d[p] = mapping(f, d[p]); for (int i = 1; i <= log; i++) update(p >> i); } void apply(int l, int r, F f) { assert(0 <= l && l <= r && r <= _n); if (l == r) return; l += size; r += size; for (int i = log; i >= 1; i--) { if (((l >> i) << i) != l) push(l >> i); if (((r >> i) << i) != r) push((r - 1) >> i); } { int l2 = l, r2 = r; while (l < r) { if (l & 1) all_apply(l++, f); if (r & 1) all_apply(--r, f); l >>= 1; r >>= 1; } l = l2; r = r2; } for (int i = 1; i <= log; i++) { if (((l >> i) << i) != l) update(l >> i); if (((r >> i) << i) != r) update((r - 1) >> i); } } template <bool (*g)(S)> int max_right(int l) { return max_right(l, [](S x) { return g(x); }); } template <class G> int max_right(int l, G g) { assert(0 <= l && l <= _n); assert(g(e())); if (l == _n) return _n; l += size; for (int i = log; i >= 1; i--) push(l >> i); S sm = e(); do { while (l % 2 == 0) l >>= 1; if (!g(op(sm, d[l]))) { while (l < size) { push(l); l = (2 * l); if (g(op(sm, d[l]))) { sm = op(sm, d[l]); l++; } } return l - size; } sm = op(sm, d[l]); l++; } while ((l & -l) != l); return _n; } template <bool (*g)(S)> int min_left(int r) { return min_left(r, [](S x) { return g(x); }); } template <class G> int min_left(int r, G g) { assert(0 <= r && r <= _n); assert(g(e())); if (r == 0) return 0; r += size; for (int i = log; i >= 1; i--) push((r - 1) >> i); S sm = e(); do { r--; while (r > 1 && (r % 2)) r >>= 1; if (!g(op(d[r], sm))) { while (r < size) { push(r); r = (2 * r + 1); if (g(op(d[r], sm))) { sm = op(d[r], sm); r--; } } return r + 1 - size; } sm = op(d[r], sm); } while ((r & -r) != r); return 0; } private: int _n, size, log; std::vector<S> d; std::vector<F> lz; void update(int k) { d[k] = op(d[2 * k], d[2 * k + 1]); } void all_apply(int k, F f) { d[k] = mapping(f, d[k]); if (k < size) lz[k] = composition(f, lz[k]); } void push(int k) { all_apply(2 * k, lz[k]); all_apply(2 * k + 1, lz[k]); lz[k] = id(); } }; } // namespace atcoder #include <algorithm> #include <cassert> #include <tuple> #include <vector> namespace atcoder { long long pow_mod(long long x, long long n, int m) { assert(0 <= n && 1 <= m); if (m == 1) return 0; internal::barrett bt((unsigned int)(m)); unsigned int r = 1, y = (unsigned int)(internal::safe_mod(x, m)); while (n) { if (n & 1) r = bt.mul(r, y); y = bt.mul(y, y); n >>= 1; } return r; } long long inv_mod(long long x, long long m) { assert(1 <= m); auto z = internal::inv_gcd(x, m); assert(z.first == 1); return z.second; } // (rem, mod) std::pair<long long, long long> crt(const std::vector<long long>& r, const std::vector<long long>& m) { assert(r.size() == m.size()); int n = int(r.size()); // Contracts: 0 <= r0 < m0 long long r0 = 0, m0 = 1; for (int i = 0; i < n; i++) { assert(1 <= m[i]); long long r1 = internal::safe_mod(r[i], m[i]), m1 = m[i]; if (m0 < m1) { std::swap(r0, r1); std::swap(m0, m1); } if (m0 % m1 == 0) { if (r0 % m1 != r1) return {0, 0}; continue; } // assume: m0 > m1, lcm(m0, m1) >= 2 * max(m0, m1) // (r0, m0), (r1, m1) -> (r2, m2 = lcm(m0, m1)); // r2 % m0 = r0 // r2 % m1 = r1 // -> (r0 + x*m0) % m1 = r1 // -> x*u0*g % (u1*g) = (r1 - r0) (u0*g = m0, u1*g = m1) // -> x = (r1 - r0) / g * inv(u0) (mod u1) // im = inv(u0) (mod u1) (0 <= im < u1) long long g, im; std::tie(g, im) = internal::inv_gcd(m0, m1); long long u1 = (m1 / g); // |r1 - r0| < (m0 + m1) <= lcm(m0, m1) if ((r1 - r0) % g) return {0, 0}; // u1 * u1 <= m1 * m1 / g / g <= m0 * m1 / g = lcm(m0, m1) long long x = (r1 - r0) / g % u1 * im % u1; // |r0| + |m0 * x| // < m0 + m0 * (u1 - 1) // = m0 + m0 * m1 / g - m0 // = lcm(m0, m1) r0 += x * m0; m0 *= u1; // -> lcm(m0, m1) if (r0 < 0) r0 += m0; } return {r0, m0}; } long long floor_sum(long long n, long long m, long long a, long long b) { long long ans = 0; if (a >= m) { ans += (n - 1) * n * (a / m) / 2; a %= m; } if (b >= m) { ans += n * (b / m); b %= m; } long long y_max = (a * n + b) / m, x_max = (y_max * m - b); if (y_max == 0) return ans; ans += (n - (x_max + a - 1) / a) * y_max; ans += floor_sum(y_max, a, m, (a - x_max % a) % a); return ans; } } // namespace atcoder #include <algorithm> #include <vector> namespace atcoder { namespace internal { template <class T> struct simple_queue { std::vector<T> payload; int pos = 0; void reserve(int n) { payload.reserve(n); } int size() const { return int(payload.size()) - pos; } bool empty() const { return pos == int(payload.size()); } void push(const T& t) { payload.push_back(t); } T& front() { return payload[pos]; } void clear() { payload.clear(); pos = 0; } void pop() { pos++; } }; } // namespace internal } // namespace atcoder #include <cassert> #include <limits> #include <queue> #include <vector> namespace atcoder { template <class Cap> struct mf_graph { public: mf_graph() : _n(0) {} mf_graph(int n) : _n(n), g(n) {} int add_edge(int from, int to, Cap cap) { assert(0 <= from && from < _n); assert(0 <= to && to < _n); assert(0 <= cap); int m = int(pos.size()); pos.push_back({from, int(g[from].size())}); g[from].push_back(_edge{to, int(g[to].size()), cap}); g[to].push_back(_edge{from, int(g[from].size()) - 1, 0}); return m; } struct edge { int from, to; Cap cap, flow; }; edge get_edge(int i) { int m = int(pos.size()); assert(0 <= i && i < m); auto _e = g[pos[i].first][pos[i].second]; auto _re = g[_e.to][_e.rev]; return edge{pos[i].first, _e.to, _e.cap + _re.cap, _re.cap}; } std::vector<edge> edges() { int m = int(pos.size()); std::vector<edge> result; for (int i = 0; i < m; i++) { result.push_back(get_edge(i)); } return result; } void change_edge(int i, Cap new_cap, Cap new_flow) { int m = int(pos.size()); assert(0 <= i && i < m); assert(0 <= new_flow && new_flow <= new_cap); auto& _e = g[pos[i].first][pos[i].second]; auto& _re = g[_e.to][_e.rev]; _e.cap = new_cap - new_flow; _re.cap = new_flow; } Cap flow(int s, int t) { return flow(s, t, std::numeric_limits<Cap>::max()); } Cap flow(int s, int t, Cap flow_limit) { assert(0 <= s && s < _n); assert(0 <= t && t < _n); std::vector<int> level(_n), iter(_n); internal::simple_queue<int> que; auto bfs = [&]() { std::fill(level.begin(), level.end(), -1); level[s] = 0; que.clear(); que.push(s); while (!que.empty()) { int v = que.front(); que.pop(); for (auto e : g[v]) { if (e.cap == 0 || level[e.to] >= 0) continue; level[e.to] = level[v] + 1; if (e.to == t) return; que.push(e.to); } } }; auto dfs = [&](auto self, int v, Cap up) { if (v == s) return up; Cap res = 0; int level_v = level[v]; for (int& i = iter[v]; i < int(g[v].size()); i++) { _edge& e = g[v][i]; if (level_v <= level[e.to] || g[e.to][e.rev].cap == 0) continue; Cap d = self(self, e.to, std::min(up - res, g[e.to][e.rev].cap)); if (d <= 0) continue; g[v][i].cap += d; g[e.to][e.rev].cap -= d; res += d; if (res == up) break; } return res; }; Cap flow = 0; while (flow < flow_limit) { bfs(); if (level[t] == -1) break; std::fill(iter.begin(), iter.end(), 0); while (flow < flow_limit) { Cap f = dfs(dfs, t, flow_limit - flow); if (!f) break; flow += f; } } return flow; } std::vector<bool> min_cut(int s) { std::vector<bool> visited(_n); internal::simple_queue<int> que; que.push(s); while (!que.empty()) { int p = que.front(); que.pop(); visited[p] = true; for (auto e : g[p]) { if (e.cap && !visited[e.to]) { visited[e.to] = true; que.push(e.to); } } } return visited; } private: int _n; struct _edge { int to, rev; Cap cap; }; std::vector<std::pair<int, int>> pos; std::vector<std::vector<_edge>> g; }; } // namespace atcoder #include <algorithm> #include <cassert> #include <limits> #include <queue> #include <vector> namespace atcoder { template <class Cap, class Cost> struct mcf_graph { public: mcf_graph() {} mcf_graph(int n) : _n(n), g(n) {} int add_edge(int from, int to, Cap cap, Cost cost) { assert(0 <= from && from < _n); assert(0 <= to && to < _n); int m = int(pos.size()); pos.push_back({from, int(g[from].size())}); g[from].push_back(_edge{to, int(g[to].size()), cap, cost}); g[to].push_back(_edge{from, int(g[from].size()) - 1, 0, -cost}); return m; } struct edge { int from, to; Cap cap, flow; Cost cost; }; edge get_edge(int i) { int m = int(pos.size()); assert(0 <= i && i < m); auto _e = g[pos[i].first][pos[i].second]; auto _re = g[_e.to][_e.rev]; return edge{ pos[i].first, _e.to, _e.cap + _re.cap, _re.cap, _e.cost, }; } std::vector<edge> edges() { int m = int(pos.size()); std::vector<edge> result(m); for (int i = 0; i < m; i++) { result[i] = get_edge(i); } return result; } std::pair<Cap, Cost> flow(int s, int t) { return flow(s, t, std::numeric_limits<Cap>::max()); } std::pair<Cap, Cost> flow(int s, int t, Cap flow_limit) { return slope(s, t, flow_limit).back(); } std::vector<std::pair<Cap, Cost>> slope(int s, int t) { return slope(s, t, std::numeric_limits<Cap>::max()); } std::vector<std::pair<Cap, Cost>> slope(int s, int t, Cap flow_limit) { assert(0 <= s && s < _n); assert(0 <= t && t < _n); assert(s != t); // variants (C = maxcost): // -(n-1)C <= dual[s] <= dual[i] <= dual[t] = 0 // reduced cost (= e.cost + dual[e.from] - dual[e.to]) >= 0 for all edge std::vector<Cost> dual(_n, 0), dist(_n); std::vector<int> pv(_n), pe(_n); std::vector<bool> vis(_n); auto dual_ref = [&]() { std::fill(dist.begin(), dist.end(), std::numeric_limits<Cost>::max()); std::fill(pv.begin(), pv.end(), -1); std::fill(pe.begin(), pe.end(), -1); std::fill(vis.begin(), vis.end(), false); struct Q { Cost key; int to; bool operator<(Q r) const { return key > r.key; } }; std::priority_queue<Q> que; dist[s] = 0; que.push(Q{0, s}); while (!que.empty()) { int v = que.top().to; que.pop(); if (vis[v]) continue; vis[v] = true; if (v == t) break; // dist[v] = shortest(s, v) + dual[s] - dual[v] // dist[v] >= 0 (all reduced cost are positive) // dist[v] <= (n-1)C for (int i = 0; i < int(g[v].size()); i++) { auto e = g[v][i]; if (vis[e.to] || !e.cap) continue; // |-dual[e.to] + dual[v]| <= (n-1)C // cost <= C - -(n-1)C + 0 = nC Cost cost = e.cost - dual[e.to] + dual[v]; if (dist[e.to] - dist[v] > cost) { dist[e.to] = dist[v] + cost; pv[e.to] = v; pe[e.to] = i; que.push(Q{dist[e.to], e.to}); } } } if (!vis[t]) { return false; } for (int v = 0; v < _n; v++) { if (!vis[v]) continue; // dual[v] = dual[v] - dist[t] + dist[v] // = dual[v] - (shortest(s, t) + dual[s] - dual[t]) + (shortest(s, v) + dual[s] - dual[v]) // = - shortest(s, t) + dual[t] + shortest(s, v) // = shortest(s, v) - shortest(s, t) >= 0 - (n-1)C dual[v] -= dist[t] - dist[v]; } return true; }; Cap flow = 0; Cost cost = 0, prev_cost = -1; std::vector<std::pair<Cap, Cost>> result; result.push_back({flow, cost}); while (flow < flow_limit) { if (!dual_ref()) break; Cap c = flow_limit - flow; for (int v = t; v != s; v = pv[v]) { c = std::min(c, g[pv[v]][pe[v]].cap); } for (int v = t; v != s; v = pv[v]) { auto& e = g[pv[v]][pe[v]]; e.cap -= c; g[v][e.rev].cap += c; } Cost d = -dual[s]; flow += c; cost += c * d; if (prev_cost == d) { result.pop_back(); } result.push_back({flow, cost}); prev_cost = cost; } return result; } private: int _n; struct _edge { int to, rev; Cap cap; Cost cost; }; std::vector<std::pair<int, int>> pos; std::vector<std::vector<_edge>> g; }; } // namespace atcoder #include <algorithm> #include <algorithm> #include <utility> #include <vector> namespace atcoder { namespace internal { template <class E> struct csr { std::vector<int> start; std::vector<E> elist; csr(int n, const std::vector<std::pair<int, E>>& edges) : start(n + 1), elist(edges.size()) { for (auto e : edges) { start[e.first + 1]++; } for (int i = 1; i <= n; i++) { start[i] += start[i - 1]; } auto counter = start; for (auto e : edges) { elist[counter[e.first]++] = e.second; } } }; // Reference: // R. Tarjan, // Depth-First Search and Linear Graph Algorithms struct scc_graph { public: scc_graph(int n) : _n(n) {} int num_vertices() { return _n; } void add_edge(int from, int to) { edges.push_back({from, {to}}); } // @return pair of (# of scc, scc id) std::pair<int, std::vector<int>> scc_ids() { auto g = csr<edge>(_n, edges); int now_ord = 0, group_num = 0; std::vector<int> visited, low(_n), ord(_n, -1), ids(_n); visited.reserve(_n); auto dfs = [&](auto self, int v) -> void { low[v] = ord[v] = now_ord++; visited.push_back(v); for (int i = g.start[v]; i < g.start[v + 1]; i++) { auto to = g.elist[i].to; if (ord[to] == -1) { self(self, to); low[v] = std::min(low[v], low[to]); } else { low[v] = std::min(low[v], ord[to]); } } if (low[v] == ord[v]) { while (true) { int u = visited.back(); visited.pop_back(); ord[u] = _n; ids[u] = group_num; if (u == v) break; } group_num++; } }; for (int i = 0; i < _n; i++) { if (ord[i] == -1) dfs(dfs, i); } for (auto& x : ids) { x = group_num - 1 - x; } return {group_num, ids}; } std::vector<std::vector<int>> scc() { auto ids = scc_ids(); int group_num = ids.first; std::vector<int> counts(group_num); for (auto x : ids.second) counts[x]++; std::vector<std::vector<int>> groups(ids.first); for (int i = 0; i < group_num; i++) { groups[i].reserve(counts[i]); } for (int i = 0; i < _n; i++) { groups[ids.second[i]].push_back(i); } return groups; } private: int _n; struct edge { int to; }; std::vector<std::pair<int, edge>> edges; }; } // namespace internal } // namespace atcoder #include <cassert> #include <vector> namespace atcoder { struct scc_graph { public: scc_graph() : internal(0) {} scc_graph(int n) : internal(n) {} void add_edge(int from, int to) { int n = internal.num_vertices(); assert(0 <= from && from < n); assert(0 <= to && to < n); internal.add_edge(from, to); } std::vector<std::vector<int>> scc() { return internal.scc(); } private: internal::scc_graph internal; }; } // namespace atcoder #include <algorithm> #include <cassert> #include <vector> namespace atcoder { template <class S, S (*op)(S, S), S (*e)()> struct segtree { public: segtree() : segtree(0) {} segtree(int n) : segtree(std::vector<S>(n, e())) {} segtree(const std::vector<S>& v) : _n(int(v.size())) { log = internal::ceil_pow2(_n); size = 1 << log; d = std::vector<S>(2 * size, e()); for (int i = 0; i < _n; i++) d[size + i] = v[i]; for (int i = size - 1; i >= 1; i--) { update(i); } } void set(int p, S x) { assert(0 <= p && p < _n); p += size; d[p] = x; for (int i = 1; i <= log; i++) update(p >> i); } S get(int p) { assert(0 <= p && p < _n); return d[p + size]; } S prod(int l, int r) { assert(0 <= l && l <= r && r <= _n); S sml = e(), smr = e(); l += size; r += size; while (l < r) { if (l & 1) sml = op(sml, d[l++]); if (r & 1) smr = op(d[--r], smr); l >>= 1; r >>= 1; } return op(sml, smr); } S all_prod() { return d[1]; } template <bool (*f)(S)> int max_right(int l) { return max_right(l, [](S x) { return f(x); }); } template <class F> int max_right(int l, F f) { assert(0 <= l && l <= _n); assert(f(e())); if (l == _n) return _n; l += size; S sm = e(); do { while (l % 2 == 0) l >>= 1; if (!f(op(sm, d[l]))) { while (l < size) { l = (2 * l); if (f(op(sm, d[l]))) { sm = op(sm, d[l]); l++; } } return l - size; } sm = op(sm, d[l]); l++; } while ((l & -l) != l); return _n; } template <bool (*f)(S)> int min_left(int r) { return min_left(r, [](S x) { return f(x); }); } template <class F> int min_left(int r, F f) { assert(0 <= r && r <= _n); assert(f(e())); if (r == 0) return 0; r += size; S sm = e(); do { r--; while (r > 1 && (r % 2)) r >>= 1; if (!f(op(d[r], sm))) { while (r < size) { r = (2 * r + 1); if (f(op(d[r], sm))) { sm = op(d[r], sm); r--; } } return r + 1 - size; } sm = op(d[r], sm); } while ((r & -r) != r); return 0; } private: int _n, size, log; std::vector<S> d; void update(int k) { d[k] = op(d[2 * k], d[2 * k + 1]); } }; } // namespace atcoder #include <algorithm> #include <cassert> #include <numeric> #include <string> #include <vector> namespace atcoder { namespace internal { std::vector<int> sa_naive(const std::vector<int>& s) { int n = int(s.size()); std::vector<int> sa(n); std::iota(sa.begin(), sa.end(), 0); std::sort(sa.begin(), sa.end(), [&](int l, int r) { if (l == r) return false; while (l < n && r < n) { if (s[l] != s[r]) return s[l] < s[r]; l++; r++; } return l == n; }); return sa; } std::vector<int> sa_doubling(const std::vector<int>& s) { int n = int(s.size()); std::vector<int> sa(n), rnk = s, tmp(n); std::iota(sa.begin(), sa.end(), 0); for (int k = 1; k < n; k *= 2) { auto cmp = [&](int x, int y) { if (rnk[x] != rnk[y]) return rnk[x] < rnk[y]; int rx = x + k < n ? rnk[x + k] : -1; int ry = y + k < n ? rnk[y + k] : -1; return rx < ry; }; std::sort(sa.begin(), sa.end(), cmp); tmp[sa[0]] = 0; for (int i = 1; i < n; i++) { tmp[sa[i]] = tmp[sa[i - 1]] + (cmp(sa[i - 1], sa[i]) ? 1 : 0); } std::swap(tmp, rnk); } return sa; } // SA-IS, linear-time suffix array construction // Reference: // G. Nong, S. Zhang, and W. H. Chan, // Two Efficient Algorithms for Linear Time Suffix Array Construction template <int THRESHOLD_NAIVE = 10, int THRESHOLD_DOUBLING = 40> std::vector<int> sa_is(const std::vector<int>& s, int upper) { int n = int(s.size()); if (n == 0) return {}; if (n == 1) return {0}; if (n == 2) { if (s[0] < s[1]) { return {0, 1}; } else { return {1, 0}; } } if (n < THRESHOLD_NAIVE) { return sa_naive(s); } if (n < THRESHOLD_DOUBLING) { return sa_doubling(s); } std::vector<int> sa(n); std::vector<bool> ls(n); for (int i = n - 2; i >= 0; i--) { ls[i] = (s[i] == s[i + 1]) ? ls[i + 1] : (s[i] < s[i + 1]); } std::vector<int> sum_l(upper + 1), sum_s(upper + 1); for (int i = 0; i < n; i++) { if (!ls[i]) { sum_s[s[i]]++; } else { sum_l[s[i] + 1]++; } } for (int i = 0; i <= upper; i++) { sum_s[i] += sum_l[i]; if (i < upper) sum_l[i + 1] += sum_s[i]; } auto induce = [&](const std::vector<int>& lms) { std::fill(sa.begin(), sa.end(), -1); std::vector<int> buf(upper + 1); std::copy(sum_s.begin(), sum_s.end(), buf.begin()); for (auto d : lms) { if (d == n) continue; sa[buf[s[d]]++] = d; } std::copy(sum_l.begin(), sum_l.end(), buf.begin()); sa[buf[s[n - 1]]++] = n - 1; for (int i = 0; i < n; i++) { int v = sa[i]; if (v >= 1 && !ls[v - 1]) { sa[buf[s[v - 1]]++] = v - 1; } } std::copy(sum_l.begin(), sum_l.end(), buf.begin()); for (int i = n - 1; i >= 0; i--) { int v = sa[i]; if (v >= 1 && ls[v - 1]) { sa[--buf[s[v - 1] + 1]] = v - 1; } } }; std::vector<int> lms_map(n + 1, -1); int m = 0; for (int i = 1; i < n; i++) { if (!ls[i - 1] && ls[i]) { lms_map[i] = m++; } } std::vector<int> lms; lms.reserve(m); for (int i = 1; i < n; i++) { if (!ls[i - 1] && ls[i]) { lms.push_back(i); } } induce(lms); if (m) { std::vector<int> sorted_lms; sorted_lms.reserve(m); for (int v : sa) { if (lms_map[v] != -1) sorted_lms.push_back(v); } std::vector<int> rec_s(m); int rec_upper = 0; rec_s[lms_map[sorted_lms[0]]] = 0; for (int i = 1; i < m; i++) { int l = sorted_lms[i - 1], r = sorted_lms[i]; int end_l = (lms_map[l] + 1 < m) ? lms[lms_map[l] + 1] : n; int end_r = (lms_map[r] + 1 < m) ? lms[lms_map[r] + 1] : n; bool same = true; if (end_l - l != end_r - r) { same = false; } else { while (l < end_l) { if (s[l] != s[r]) { break; } l++; r++; } if (l == n || s[l] != s[r]) same = false; } if (!same) rec_upper++; rec_s[lms_map[sorted_lms[i]]] = rec_upper; } auto rec_sa = sa_is<THRESHOLD_NAIVE, THRESHOLD_DOUBLING>(rec_s, rec_upper); for (int i = 0; i < m; i++) { sorted_lms[i] = lms[rec_sa[i]]; } induce(sorted_lms); } return sa; } } // namespace internal std::vector<int> suffix_array(const std::vector<int>& s, int upper) { assert(0 <= upper); for (int d : s) { assert(0 <= d && d <= upper); } auto sa = internal::sa_is(s, upper); return sa; } template <class T> std::vector<int> suffix_array(const std::vector<T>& s) { int n = int(s.size()); std::vector<int> idx(n); iota(idx.begin(), idx.end(), 0); sort(idx.begin(), idx.end(), [&](int l, int r) { return s[l] < s[r]; }); std::vector<int> s2(n); int now = 0; for (int i = 0; i < n; i++) { if (i && s[idx[i - 1]] != s[idx[i]]) now++; s2[idx[i]] = now; } return internal::sa_is(s2, now); } std::vector<int> suffix_array(const std::string& s) { int n = int(s.size()); std::vector<int> s2(n); for (int i = 0; i < n; i++) { s2[i] = s[i]; } return internal::sa_is(s2, 255); } // Reference: // T. Kasai, G. Lee, H. Arimura, S. Arikawa, and K. Park, // Linear-Time Longest-Common-Prefix Computation in Suffix Arrays and Its // Applications template <class T> std::vector<int> lcp_array(const std::vector<T>& s, const std::vector<int>& sa) { int n = int(s.size()); assert(n >= 1); std::vector<int> rnk(n); for (int i = 0; i < n; i++) { rnk[sa[i]] = i; } std::vector<int> lcp(n - 1); int h = 0; for (int i = 0; i < n; i++) { if (h > 0) h--; if (rnk[i] == 0) continue; int j = sa[rnk[i] - 1]; for (; j + h < n && i + h < n; h++) { if (s[j + h] != s[i + h]) break; } lcp[rnk[i] - 1] = h; } return lcp; } std::vector<int> lcp_array(const std::string& s, const std::vector<int>& sa) { int n = int(s.size()); std::vector<int> s2(n); for (int i = 0; i < n; i++) { s2[i] = s[i]; } return lcp_array(s2, sa); } // Reference: // D. Gusfield, // Algorithms on Strings, Trees, and Sequences: Computer Science and // Computational Biology template <class T> std::vector<int> z_algorithm(const std::vector<T>& s) { int n = int(s.size()); if (n == 0) return {}; std::vector<int> z(n); z[0] = 0; for (int i = 1, j = 0; i < n; i++) { int& k = z[i]; k = (j + z[j] <= i) ? 0 : std::min(j + z[j] - i, z[i - j]); while (i + k < n && s[k] == s[i + k]) k++; if (j + z[j] < i + z[i]) j = i; } z[0] = n; return z; } std::vector<int> z_algorithm(const std::string& s) { int n = int(s.size()); std::vector<int> s2(n); for (int i = 0; i < n; i++) { s2[i] = s[i]; } return z_algorithm(s2); } } // namespace atcoder #include <cassert> #include <vector> namespace atcoder { // Reference: // B. Aspvall, M. Plass, and R. Tarjan, // A Linear-Time Algorithm for Testing the Truth of Certain Quantified Boolean // Formulas struct two_sat { public: two_sat() : _n(0), scc(0) {} two_sat(int n) : _n(n), _answer(n), scc(2 * n) {} void add_clause(int i, bool f, int j, bool g) { assert(0 <= i && i < _n); assert(0 <= j && j < _n); scc.add_edge(2 * i + (f ? 0 : 1), 2 * j + (g ? 1 : 0)); scc.add_edge(2 * j + (g ? 0 : 1), 2 * i + (f ? 1 : 0)); } bool satisfiable() { auto id = scc.scc_ids().second; for (int i = 0; i < _n; i++) { if (id[2 * i] == id[2 * i + 1]) return false; _answer[i] = id[2 * i] < id[2 * i + 1]; } return true; } std::vector<bool> answer() { return _answer; } private: int _n; std::vector<bool> _answer; internal::scc_graph scc; }; } // namespace atcoder #define ll long long int #define MOD 1000000007 #define P pair<ll,ll> #define INF 1000000000000000000 using namespace atcoder; using namespace std; int main(void){ ll x; cin >> x; if (x < 1200) cout << "ABC" << endl; else cout << "ARC" << endl; return 0; }
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s429321852
p03813
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x<1200) cout << "ABC"; else cout << "ARC; }
a.cc:8:22: warning: missing terminating " character 8 | else cout << "ARC; | ^ a.cc:8:22: error: missing terminating " character 8 | else cout << "ARC; | ^~~~~ a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s367791722
p03813
C
#include<stdio.h> int sum(int a){ if(a<1200) return "ABC"; else return "ARC"; } int main(){ int a; scnaf("%d",&a); printf("%s",sum(a)); return 0; }
main.c: In function 'sum': main.c:4:12: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 4 | return "ABC"; | ^~~~~ main.c:6:12: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 6 | return "ARC"; | ^~~~~ main.c: In function 'main': main.c:10:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scnaf("%d",&a); | ^~~~~ | scanf
s938482389
p03813
C
#include<stdio.h> int may(int a){ if(a<1200) return "ABC"; else return "ARC"; } int main(){a int a; scnaf("%d",&a); printf("%s",may(a)); return 0; }
main.c: In function 'may': main.c:4:12: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 4 | return "ABC"; | ^~~~~ main.c:6:12: error: returning 'char *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion] 6 | return "ARC"; | ^~~~~ main.c: In function 'main': main.c:8:12: error: 'a' undeclared (first use in this function) 8 | int main(){a | ^ main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in main.c:8:13: error: expected ';' before 'int' 8 | int main(){a | ^ | ; 9 | int a; | ~~~ main.c:10:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 10 | scnaf("%d",&a); | ^~~~~ | scanf
s532824103
p03813
C++
#include<iostream> #include<string> string may(int a){ if(a<1200) return 'ABC'; else return 'ARC'; } int main(){ int a; cin>>a; cout<<may(a); return 0; }
a.cc:5:12: warning: multi-character character constant [-Wmultichar] 5 | return 'ABC'; | ^~~~~ a.cc:7:12: warning: multi-character character constant [-Wmultichar] 7 | return 'ARC'; | ^~~~~ a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string may(int a){ | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:11:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 11 | cin>>a; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout<<may(a); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:9: error: 'may' was not declared in this scope 12 | cout<<may(a); | ^~~
s165437682
p03813
C++
#include<iostream> #include<string> int may(int a){ string g="ABC"; string h="ARC"; if(a<1200) return g; else return h; } int main(){ int a; cin>>a; cout<<may(a); return 0; }
a.cc: In function 'int may(int)': a.cc:4:3: error: 'string' was not declared in this scope 4 | string g="ABC"; | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:9: error: expected ';' before 'h' 5 | string h="ARC"; | ^~ | ; a.cc:7:12: error: 'g' was not declared in this scope 7 | return g; | ^ a.cc:9:12: error: 'h' was not declared in this scope 9 | return h; | ^ a.cc: In function 'int main()': a.cc:13:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 13 | cin>>a; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | cout<<may(a); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s322893979
p03813
C++
#include<iostream> #include<string> int may(int a){ string g='ABC'; string h='ARC'; if(a<1200) return g; else return h; } int main(){ int a; cin>>a; cout<<may(a); return 0; }
a.cc:4:12: warning: multi-character character constant [-Wmultichar] 4 | string g='ABC'; | ^~~~~ a.cc:5:12: warning: multi-character character constant [-Wmultichar] 5 | string h='ARC'; | ^~~~~ a.cc: In function 'int may(int)': a.cc:4:3: error: 'string' was not declared in this scope 4 | string g='ABC'; | ^~~~~~ a.cc:4:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stringfwd.h:77:33: note: 'std::string' 77 | typedef basic_string<char> string; | ^~~~~~ In file included from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/string:76:11: note: 'std::pmr::string' 76 | using string = basic_string<char>; | ^~~~~~ a.cc:5:9: error: expected ';' before 'h' 5 | string h='ARC'; | ^~ | ; a.cc:7:12: error: 'g' was not declared in this scope 7 | return g; | ^ a.cc:9:12: error: 'h' was not declared in this scope 9 | return h; | ^ a.cc: In function 'int main()': a.cc:13:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 13 | cin>>a; | ^~~ | std::cin /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:14:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 14 | cout<<may(a); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s913373554
p03813
C++
#include<iostream> int may(int a){ if(a<1200) return 'ABC'; else return 'ARC'; } int main(){ int a; cin>>a; cout<<may(a); return 0; }
a.cc:4:12: warning: multi-character character constant [-Wmultichar] 4 | return 'ABC'; | ^~~~~ a.cc:6:12: warning: multi-character character constant [-Wmultichar] 6 | return 'ARC'; | ^~~~~ a.cc: In function 'int main()': a.cc:10:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 10 | cin>>a; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout<<may(a); | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s348971885
p03813
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; ll GetDigit(ll num){ return log10(num)+1; } //numの桁数を求める int main() { int x; cin >> x; if(x < 1200) cout << "ABC" << endl; else cout << "ARC" << end; return 0; }
a.cc: In function 'int main()': a.cc:12:24: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | else cout << "ARC" << end; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*' 301 | operator<<(const void* __p) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std::nullptr_t]
s977015417
p03813
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(long long i=0; i<(int)n; i++) #define rep2(i,a,n) for(long long i=(a); i<(int)(n); i++) #define all(vec) vec.begin(),vec.end() using vi = vector<int>; using vs = vector<string>; using vvi = vector<vi>; using pii = pair<int, int>; using psi = pair<string, int>; const int dx[4] = {1, 0,-1, 0}; const int dy[4] = {0, 1, 0,-1}; const int mod = 1e9+7; int gcd(int a, int b){if(a%b == 0){return(b);}else{return(gcd(b, a%b));}} int lcm(int a, int b){return a * b / gcd(a, b);} int N, M, K, H, W, L, R, X; //string S, T; signed main(){ cin >> N; if(N>=1200) cout << "ARC" << endl; else cout << "ABC" << endl; return; }
a.cc: In function 'int main()': a.cc:25:3: error: return-statement with no value, in function returning 'int' [-fpermissive] 25 | return; | ^~~~~~
s705365850
p03813
C
#include<stdio.h> #include<string.h> using namespace std; int main() { int n; while(~scanf("%d",&n)) { if(n<1200)printf("ABC\n"); else printf("ARC\n"); } }
main.c:3:5: error: unknown type name 'using' 3 | using namespace std; | ^~~~~ main.c:3:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 3 | using namespace std; | ^~~
s069392466
p03813
C++
#include<iostream> using namespace std; int main() { int n; cin>>n; if(n<=1200) cout<<"ABC"; else(n>1200 && n<=3000) cout<<"ARC"; }
a.cc: In function 'int main()': a.cc:10:32: error: expected ';' before 'cout' 10 | else(n>1200 && n<=3000) | ^ | ; 11 | cout<<"ARC"; | ~~~~
s776546909
p03813
C++
#include <iostream> using namespace std; int main(){ int r; cin >> r; if(r < 1200){ cout << "ABC" << endl; else{ cout << "ARC" << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else{ | ^~~~ a.cc:8:15: note: to match this '{' 8 | if(r < 1200){ | ^
s837527090
p03813
C++
#include <iostream> using namespace std; int main(){ int r; cin >> r; cout << r < 1200 ? "ABC" : "ARC" << endl; }
a.cc: In function 'int main()': a.cc:8:13: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and 'int') 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ~~~~~~~~~ ^ ~~~~ | | | | | int | std::basic_ostream<char> a.cc:8:13: note: candidate: 'operator<(int, int)' (built-in) 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ~~~~~~~~~~^~~~~~ a.cc:8:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:8:15: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:8:15: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:8:15: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:8:36: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<' 8 | cout << r < 1200 ? "ABC" : "ARC" << endl; | ~~~~~~^~~~~~~
s036405257
p03813
C++
#include<iostream> using namespace std; int main(){ cin>>n; if(n<1200){ cout<<"ABC"; } else cout<<"ARC"; }
a.cc: In function 'int main()': a.cc:4:8: error: 'n' was not declared in this scope 4 | cin>>n; | ^
s906125037
p03813
C++
#include <bits/stdc++.h> #define pi 3.14159 using namespace std; typedef long long LL; const LL MOD = 1e9 + 7; const int N = 1e5 + 7, M = 1e7, OO = 0x3f3f3f3f; #define AC ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin.sync_with_stdio(0); int main() { int x; cin>>x; if(x<1200) cout<<"ABC"; else cout<<cout<<"ARC"; return 0; }
a.cc: In function 'int main()': a.cc:15:9: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::ostream' {aka 'std::basic_ostream<char>'}) 15 | cout<<cout<<"ARC"; | ~~~~^~~~~~ | | | | | basic_ostream<[...]> | basic_ostream<[...]> a.cc:15:9: note: candidate: 'operator<<(int, int)' (built-in) 15 | cout<<cout<<"ARC"; | ~~~~^~~~~~ a.cc:15:9: note: no known conversion for argument 2 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127, from a.cc:1: /usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'} 116 | operator<<(__ostream_type& (*__pf)(__ostream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]' 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 125 | operator<<(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ^~~~~~~~ /usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'std::ios_base& (*)(std::ios_base&)' 135 | operator<<(ios_base& (*__pf) (ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 174 | operator<<(long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long int' 174 | operator<<(long __n) | ~~~~~^~~ /usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 178 | operator<<(unsigned long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long unsigned int' 178 | operator<<(unsigned long __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 182 | operator<<(bool __n) | ^~~~~~~~ /usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'bool' 182 | operator<<(bool __n) | ~~~~~^~~ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]' 96 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short int' 97 | operator<<(short __n) | ~~~~~~^~~ /usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 189 | operator<<(unsigned short __n) | ^~~~~~~~ /usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'short unsigned int' 189 | operator<<(unsigned short __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]' 110 | basic_ostream<_CharT, _Traits>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' 111 | operator<<(int __n) | ~~~~^~~ /usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 200 | operator<<(unsigned int __n) | ^~~~~~~~ /usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'unsigned int' 200 | operator<<(unsigned int __n) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 211 | operator<<(long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long int' 211 | operator<<(long long __n) | ~~~~~~~~~~^~~ /usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 215 | operator<<(unsigned long long __n) | ^~~~~~~~ /usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long long unsigned int' 215 | operator<<(unsigned long long __n) | ~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 231 | operator<<(double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'double' 231 | operator<<(double __f) | ~~~~~~~^~~ /usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 235 | operator<<(float __f) | ^~~~~~~~ /usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'float' 235 | operator<<(float __f) | ~~~~~~^~~ /usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 243 | operator<<(long double __f) | ^~~~~~~~ /usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'long double' 243 | operator<<(long double __f) | ~~~~~~~~~~~~^~~ /usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]' 301 | operator<<(const void* __p) | ^~~~~~~~ /usr/include/c++/14/ostream:301:30: note: no known conversion for argumen
s438023380
p03813
C++
#incude<bits/stdc++.h> using namespace std; int main() { long long n; cin>>n; if (n<1200) { cout<<"ABC"<<endl; } else { cout<<"ARC"<<endl; } }
a.cc:2:2: error: invalid preprocessing directive #incude; did you mean #include? 2 | #incude<bits/stdc++.h> | ^~~~~~ | include a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin>>n; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:10:9: error: 'cout' was not declared in this scope 10 | cout<<"ABC"<<endl; | ^~~~ a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:10:22: error: 'endl' was not declared in this scope 10 | cout<<"ABC"<<endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | a.cc:14:9: error: 'cout' was not declared in this scope 14 | cout<<"ARC"<<endl; | ^~~~ a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:14:22: error: 'endl' was not declared in this scope 14 | cout<<"ARC"<<endl; | ^~~~ a.cc:14:22: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
s147313778
p03813
Java
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new scanner(System.in); int x = scanner.nextInt(); if(x < 1200) { System.out.println("ABC"); } else { System.out.println("ARC"); } } }
Main.java:5: error: cannot find symbol Scanner scanner = new scanner(System.in); ^ symbol: class scanner location: class Main 1 error
s009712112
p03813
C
#include <stdio.h> int main(){ long x, z, y=0; scanf("%ld",&x); tmp=z; result+=(z/11)*2; z=z%11; if(7<=z){ result+=2; } else if(1<=z && z<7) { result+=1; } printf("%ld",y); }
main.c: In function 'main': main.c:6:3: error: 'tmp' undeclared (first use in this function) 6 | tmp=z; | ^~~ main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in main.c:8:3: error: 'result' undeclared (first use in this function) 8 | result+=(z/11)*2; | ^~~~~~
s287539668
p03813
C++
//#include <bits/stdc++.h> #include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <string> #include <vector> #include <map> #include <queue> using namespace std; typedef long long ll; typedef vector<int> vint; typedef vector<vector<int> > vvint; typedef vector<long long> vll, vLL; typedef vector<vector<long long> > vvll, vvLL; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) for(int i=0;i<n;++i) #define mod (ll)(1e9+7) #define FIX(a) ((a)%mod+mod)%mod #define ALL(obj) (obj).begin(), (obj).end() #define rALL(obj) (obj).rbegin(), (obj).rend() #define INF 1000000000 //1e9 #define LLINF 2000000000000000000LL //2e18 #define fi first #define se second #define pb push_back int dy[]={0, 0, 1, -1}; int dx[]={1, -1, 0, 0}; int main(){ cin.tie(0); ios::sync_with_stdio(false); int x; cin >> x; if(x<1200){ puts("ABC"); }else{ puts("ARC") } return 0; }
a.cc: In function 'int main()': a.cc:40:20: error: expected ';' before '}' token 40 | puts("ARC") | ^ | ; 41 | } | ~
s130226010
p03813
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Sacnner(System.in); int x = sc.nextInt(); System.out.println(x<1200 ? "ABC" : "ARC"); } }
Main.java:5: error: cannot find symbol Scanner sc = new Sacnner(System.in); ^ symbol: class Sacnner location: class Main 1 error
s829725167
p03813
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int x; cin >>x; if(x < 1200) { cout << ABC << endl; } if(x > 1200) { cout << ARC << endl; } }
a.cc: In function 'int main()': a.cc:9:16: error: 'ABC' was not declared in this scope 9 | cout << ABC << endl; | ^~~ a.cc:13:16: error: 'ARC' was not declared in this scope 13 | cout << ARC << endl; | ^~~
s425470256
p03813
C++
int main(void){ string s; cin >> s; int b, e; for(int i = 0; i < s.size(); i++){ if(s.at(i) == 'A'){ b = i; break; } } for(int i = s.size()-1; i>=0; i--){ if(s.at(i) == 'Z'){ e = i; break; } } cout << e-b+1 << endl; return 0; }
a.cc: In function 'int main()': a.cc:2:3: error: 'string' was not declared in this scope 2 | string s; | ^~~~~~ a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> s; | ^~~ a.cc:3:10: error: 's' was not declared in this scope 3 | cin >> s; | ^ a.cc:17:3: error: 'cout' was not declared in this scope 17 | cout << e-b+1 << endl; | ^~~~ a.cc:17:20: error: 'endl' was not declared in this scope 17 | cout << e-b+1 << endl; | ^~~~
s258617136
p03813
Java
import java.util.Scanner; public class Abc { public static void main(String[] args){ System.out.println("レートを入力してください。"); String score = new Scanner(System.in).nextLine(); int sukeme_score = Integer.parseInt(score); if (sukeme_score < 1200 && sukeme_score >= 1){ System.out.println("ABC"); } else if (sukeme_score >= 1200 && sukeme_score <= 3000) { System.out.println("ARC"); } else { System.out.println("1~3,000で入力してください。"); } } }
Main.java:3: error: class Abc is public, should be declared in a file named Abc.java public class Abc { ^ 1 error
s812612442
p03813
Java
import java.util.Scanner; public class Abc { public static void main(String[] args){ System.out.println("レートを入力してください。"); String score = new Scanner(System.in).nextLine(); int sukeme_score = Integer.parseInt(score); if (sukeme_score < 1200 && sukeme_score >= 1){ System.out.println("ABC"); } else if (sukeme_score >= 1200 && sukeme_score <= 3000) { System.out.println("ARC"); } else { System.out.println("1~3,000で入力してください。"); } } }
Main.java:3: error: class Abc is public, should be declared in a file named Abc.java public class Abc { ^ 1 error
s005050199
p03813
Java
import java.util. public class Abc { public static void main(String[] args){ System.out.println('レートを入力してください。') String score = new Scanner(System.in).nextLine(); int sukeme_score = Integer.parseInt(score); if (sukeme_score < 1200 && sukeme_score >= 1){ System.out.println("ABC"); } else if (sukeme_score >= 1200 && sukeme_score <= 3000) { System.out.println("ARC"); } else { System.out.println("1~3,000で入力してください。"); } } }
Main.java:1: error: <identifier> expected import java.util. ^ Main.java:5: error: unclosed character literal System.out.println('?????????????') ^ Main.java:5: error: illegal character: '\u3002' System.out.println('?????????????') ^ Main.java:5: error: not a statement System.out.println('?????????????') ^ Main.java:5: error: unclosed character literal System.out.println('?????????????') ^ 5 errors
s499391210
p03813
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if(x>=1200){ cout<<"ARC"<<endl }else{ cout<<"ABC"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:22: error: expected ';' before '}' token 9 | cout<<"ARC"<<endl | ^ | ; 10 | }else{ | ~
s971663277
p03813
C
#include<stdio.h> int main() { int x; scanf("%d"); if(x<1200)printf("ABC\n"); else(x>=1200)printf("ARC\n"); return 0; }
main.c: In function 'main': main.c:10:15: error: expected ';' before 'printf' 10 | else(x>=1200)printf("ARC\n"); | ^~~~~~ | ;
s208244608
p03813
C
#include<stdio.h> int main() { int x; scanf("%d"); if(x<1200)printf("ABC\n"); else(x>=1200)printf("ARC\n"); return 0; }i
main.c: In function 'main': main.c:10:15: error: expected ';' before 'printf' 10 | else(x>=1200)printf("ARC\n"); | ^~~~~~ | ; main.c: At top level: main.c:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 13 | }i | ^
s889987229
p03813
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x < 1200)cout << "ABC\n"; else cout << "ARC\n; return 0; }
a.cc:8:16: warning: missing terminating " character 8 | else cout << "ARC\n; | ^ a.cc:8:16: error: missing terminating " character 8 | else cout << "ARC\n; | ^~~~~~~ a.cc: In function 'int main()': a.cc:10:3: error: expected primary-expression before 'return' 10 | return 0; | ^~~~~~
s466592284
p03813
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x < 1200)cout << "ABC\n"; else cout << "ARC\n; }
a.cc:8:16: warning: missing terminating " character 8 | else cout << "ARC\n; | ^ a.cc:8:16: error: missing terminating " character 8 | else cout << "ARC\n; | ^~~~~~~ a.cc: In function 'int main()': a.cc:9:1: error: expected primary-expression before '}' token 9 | } | ^
s216514206
p03813
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { int s; cin >> s; if (s < 1200) cout << "ABC" << endl; else cout << "ARC" <<< endl; }
a.cc: In function 'int main()': a.cc:9:24: error: expected primary-expression before '<' token 9 | else cout << "ARC" <<< endl; | ^
s664201888
p03813
C++
#include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if(x < 1200) cout << "ABC" << endl; else cout << "ARC" << endl;
a.cc: In function 'int main()': a.cc:9:30: error: expected '}' at end of input 9 | else cout << "ARC" << endl; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s930092736
p03813
C++
#include <bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if(x<1200) cout << "ABC"; else cout << "ARC" }
a.cc: In function 'int main()': a.cc:13:18: error: expected ';' before '}' token 13 | cout << "ARC" | ^ | ; 14 | 15 | } | ~
s509315162
p03813
C++
#include<iostream> int main(){ int x; cin >> x; std::cout << (x < 1200 ? "ABC\n" : "ARC\n"); return 0; }
a.cc: In function 'int main()': a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | int x; cin >> x; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~
s260836833
p03813
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin << x; if(x<1200) cout << "ABC" << endl; else cout << "ARC" << endl; }
a.cc: In function 'int main()': a.cc:5:14: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | int x; cin << x; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:5:14: note: candidate: 'operator<<(int, int)' (built-in) 5 | int x; cin << x; | ~~~~^~~~ a.cc:5:14: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)' 1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:5:10: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 5 | int x; cin << x; | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)' 1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46, from /usr/include/c++/14/streambuf:43, from /usr/include/c++/14/bits/streambuf_iterator.h:35, from /usr/include/c++/14/iterator:66, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ In file included from /usr/include/c++/14/memory:80, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56: /usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)' 70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 5 | int x; cin << x; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:5:17: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_
s210615572
p03813
C++
#include<iostream> #include<conio.h> using namespace std; int main() { int a; cin>>a; (a<1200)?cout<<"ABC":cout<<"ARC"; getch(); }
a.cc:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s721826277
p03813
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i, n) for(int i = 0; i < n; i++) #define sort(v) sort((v).begin(), (v).end()) using vi = vector<int>; const int MOD = 1e9+7; bool IsPrime(int num){ if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) return false; } return true; } int main() { int x; cinn >> x; if(x < 1200) cout << "ABC" << endl; else cout << "ARC" << endl; }
a.cc: In function 'int main()': a.cc:21:9: error: 'cinn' was not declared in this scope 21 | cinn >> x; | ^~~~
s751884062
p03813
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i, n) for(int i = 0; i < n; i++) #define sort(v) sort((v).begin(), (v).end()) using vi = vector<int>; const int MOD = 1e9+7; bool IsPrime(int num){ if (num < 2) return false; else if (num == 2) return true; else if (num % 2 == 0) return false; // 偶数はあらかじめ除く double sqrtNum = sqrt(num); for (int i = 3; i <= sqrtNum; i += 2) { if (num % i == 0) return false; } return true; } int main() { int x; cinn >> x; if(x < 1200) cout << ABC << endl; else cout << ARC << endl; }
a.cc: In function 'int main()': a.cc:21:9: error: 'cinn' was not declared in this scope 21 | cinn >> x; | ^~~~ a.cc:22:30: error: 'ABC' was not declared in this scope 22 | if(x < 1200) cout << ABC << endl; | ^~~ a.cc:23:22: error: 'ARC' was not declared in this scope 23 | else cout << ARC << endl; | ^~~
s266337838
p03813
C++
#include <iostream> #include <algorithm> #include <math.h> #include <vector> #include <string> #include <queue> #include <map> #include <utility> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) /* 大文字を小文字に変換 tolower*/ /* 小文字を大文字に変換 toupper*/ int main () { int x; ccin >> x; if (x < 1200) cout << "ABC" << endl; else cout << "ARC" << endl; }
a.cc: In function 'int main()': a.cc:17:3: error: 'ccin' was not declared in this scope 17 | ccin >> x; | ^~~~
s201902354
p03813
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x =sc.nextInt(); if(a<1200){ System.out.println("ABC"); }else{ System.out.println("ARC"); } } }
Main.java:6: error: cannot find symbol if(a<1200){ ^ symbol: variable a location: class Main 1 error
s696285873
p03813
C++
#include <bits/stdc++.h> using namespace std; int main(){ std::ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long test; test=1; while(test--) { long i,j,n,m,q,a=0,t,b,c,temp,k,maxpeak=0,peak,d; cin>>n; if(n<1200)cout<<"ABC"; else cout<<"ARC"; }
a.cc: In function 'int main()': a.cc:16:6: error: expected '}' at end of input 16 | } | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s263619647
p03813
C++
#include <bits/stdc++.h> using namespace std; int main() { int x; cin>>x; if(x<1200) cout<<"ABC"<<endl; else cour<<"ARC"<<endl; }
a.cc: In function 'int main()': a.cc:7:8: error: 'cour' was not declared in this scope 7 | else cour<<"ARC"<<endl; | ^~~~
s399373147
p03813
C++
#include <iostream> using namespace std; int main() { int x; cin >> x; if(x < 1200){ cout << "ABC" < endl; } else{ cout << "ARC" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << "ABC" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:8:21: note: couldn't deduce template parameter '_CharT' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:8:21: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
s171945227
p03813
C++
#include <iostream> using namespace std; int main() { int x; cin >> x; if(x < 1200){ cout << "ABC" < endl; } else{ cout << "ARC" < endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << "ABC" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:8:21: note: couldn't deduce template parameter '_CharT' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 8 | cout << "ABC" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:8:21: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 8 | cout << "ABC" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:11:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 11 | cout << "ARC" < endl; | ~~~~~~~~~~~~~~^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:11:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 11 | cout << "ARC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:11:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 11 | cout << "ARC" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const mov
s257377118
p03813
C++
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin >> x; if(x<1200){ cout << "ABC" << endl; } else{ cout << "ARC" << endl; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s168638701
p03813
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define fin(ans) cout << (ans) << endl; #define blank(ans) cout << (ans) << " "; #define mp(p, q) make_pair(p, q) #define pb(n) push_back(n) #define all(a) a.begin(), a.end() typedef long long ll; typedef long long lli; typedef unsigned long long ull; typedef long double ld; typedef string str; typedef vector<char> vc; typedef vector<bool> vb; typedef vector<ld> vd; typedef vector<str> vs; typedef vector<ll> vll; typedef vector<pair<ll, ll>> vpll; typedef vector<pair<ll, str>> vpls; typedef vector<tuple<str, ll, ll>> vtsl; typedef vector<vector<ll>> vvll; typedef vector<vector<char>> vvc; typedef vector<vector<str>> vvs; const ld PI = acos(-1.0); const ll MAX = 9000000000000000000; const ll MIN = -9000000000000000000; const ld DMAX = 4500; const ld DMIN = -4500; const ll MOD = 1000000007; //実行部 void Main() { ll a, b; cin >> a; if(a < 1200?"ABC":"ARC") } //前処理 int main() { //ios::sync_with_stdio(false); //cin.tie(0); cout << fixed << setprecision(20); //高精度少数表示 Main(); return 0; }
a.cc: In function 'void Main()': a.cc:42:1: error: expected primary-expression before '}' token 42 | } | ^
s677233526
p03813
C++
int main() { int N; cin >> N; if(N >= 1200) cout << "ARC"; else { cout << "ABC"; } }
a.cc: In function 'int main()': a.cc:4:5: error: 'cin' was not declared in this scope 4 | cin >> N; | ^~~ a.cc:6:9: error: 'cout' was not declared in this scope 6 | cout << "ARC"; | ^~~~ a.cc:9:9: error: 'cout' was not declared in this scope 9 | cout << "ABC"; | ^~~~
s086006737
p03813
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for(int i = 0; i < (int)(n); i++) int main(){ int x; cin>>x; if (x<1200) { /* code */ cout<<"ABC"<endl; } else { cout<<"ARC"<<endl; } }
a.cc: In function 'int main()': a.cc:12:20: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | cout<<"ABC"<endl; | ~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:12:21: note: couldn't deduce template parameter '_Bi_iter' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:12:21: note: couldn't deduce template parameter '_Bi_iter' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | cout<<"ABC"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 12 | cout<<"ABC"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | cout<<"ABC"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:12:21: note: couldn't deduce template parameter '_CharT' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:12:21: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 12 | cout<<"ABC"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
s133933988
p03813
C
#include<stdio.h> int main(void){ int x; scnaf("%d",&x); if(x<1200){ printf("ABC"); } else { printf("ARC"); } return 0; }
main.c: In function 'main': main.c:4:5: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration] 4 | scnaf("%d",&x); | ^~~~~ | scanf
s762287782
p03813
C++
#include <iostream> using namespace std; int main(){ int a, cin>>a; string ret; if(a<1200){ ret="ABC"; }else{ ret="ARC"; } return 0; }
a.cc: In function 'int main()': a.cc:5:6: error: expected initializer before '>>' token 5 | cin>>a; | ^~
s570205908
p03813
C++
#include <iostream> using namespace std ; int main() { int N cin << N; if(N<1200 ) cout >> "ABC"; else if (N>= 1200) cout >>"ARC"; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: expected initializer before 'cin' 6 | cin << N; | ^~~ a.cc:8:5: error: 'N' was not declared in this scope 8 | if(N<1200 ) | ^ a.cc:9:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 9 | cout >> "ABC"; | ~~~~ ^~ ~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "ABC"; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:9:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 9 | cout >> "ABC"; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:9:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]': a.cc:9:9: required from here 9 | cout >> "ABC"; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ a.cc:11:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]') 11 | cout >>"ARC"; | ~~~~ ^~~~~~~ | | | | | const char [4] | std::ostream {aka std::basic_ostream<char>} /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >>"ARC"; | ^~~~~ /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:11:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 11 | cout >>"ARC"; | ^~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >>"ARC"; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >>"ARC"; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >>"ARC"; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 11 | cout >>"ARC"; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:11:8: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 11 | cout >>"A
s969485951
p03813
C
#include <stdio.h> int main(x){ int x;scanf("%d",&x); printf("%s",(x<1200)?"ABC":"ARC"); }
main.c: In function 'main': main.c:2:5: error: type of 'x' defaults to 'int' [-Wimplicit-int] 2 | int main(x){ | ^~~~ main.c:3:8: error: 'x' redeclared as different kind of symbol 3 | int x;scanf("%d",&x); | ^ main.c:2:5: note: previous definition of 'x' with type 'int' 2 | int main(x){ | ^~~~
s260997852
p03813
C
int main(x){ int x;scanf("%d",&x); printf("%s",(x<1200)?"ABC":"ARC"); }
main.c: In function 'main': main.c:1:5: error: type of 'x' defaults to 'int' [-Wimplicit-int] 1 | int main(x){ | ^~~~ main.c:2:8: error: 'x' redeclared as different kind of symbol 2 | int x;scanf("%d",&x); | ^ main.c:1:5: note: previous definition of 'x' with type 'int' 1 | int main(x){ | ^~~~ main.c:2:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 2 | int x;scanf("%d",&x); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(x){ main.c:2:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 2 | int x;scanf("%d",&x); | ^~~~~ main.c:2:10: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:3:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 3 | printf("%s",(x<1200)?"ABC":"ARC"); | ^~~~~~ main.c:3:4: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:3:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:3:4: note: include '<stdio.h>' or provide a declaration of 'printf'
s873319776
p03813
C++
#include<iostream. using namespace std; int main(){ int n; cin >> n; if (n < 1200) cout << "ABC" << endl; else cout << "ARC" << endl; return 0; }
a.cc:1:19: error: missing terminating > character 1 | #include<iostream. | ^ a.cc:1:9: fatal error: iostream.: No such file or directory 1 | #include<iostream. | ^ compilation terminated.
s646942609
p03813
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int x; cin>>x; if(x < 1200) cout<<"ABC"<<endl else cout<<"ARC"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:39: error: expected ';' before 'else' 8 | if(x < 1200) cout<<"ABC"<<endl | ^ | ; 9 | else cout<<"ARC"<<endl; | ~~~~
s497284353
p03813
C++
using namespace std; int main() { int a; cin >> a; if(a <= 1200) cout << "ABC"; else cout << "ARC"; return 0; }
a.cc: In function 'int main()': a.cc:7:1: error: 'cin' was not declared in this scope 7 | cin >> a; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:9:2: error: 'cout' was not declared in this scope 9 | cout << "ABC"; | ^~~~ a.cc:9:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:11:2: error: 'cout' was not declared in this scope 11 | cout << "ARC"; | ^~~~ a.cc:11:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s609084029
p03813
C
#include<stdio.h> int main(void){ int n; scanf("%d",%n); if(n<1200){ printf("ABC"); }else{ printf("ARC"); } return 0; }
main.c: In function 'main': main.c:4:14: error: expected expression before '%' token 4 | scanf("%d",%n); | ^
s060075886
p03813
C
#include<stdio.h> int main(void){ int n scanf("%d",%n); if(n<1200){ printf("ABC"); }else{ printf("ARC"); } return 0; }
main.c: In function 'main': main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf' 4 | scanf("%d",%n); | ^~~~~ main.c:4:14: error: expected expression before '%' token 4 | scanf("%d",%n); | ^ main.c:5:6: error: 'n' undeclared (first use in this function) 5 | if(n<1200){ | ^ main.c:5:6: note: each undeclared identifier is reported only once for each function it appears in
s367888988
p03813
C++
#include<iostream> using namespace std; int main(){ int n;cin<<n; cout<<(n<1200?"ABC\n":"ARC\n"); return 0; }
a.cc: In function 'int main()': a.cc:4:12: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 4 | int n;cin<<n; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:4:12: note: candidate: 'operator<<(int, int)' (built-in) 4 | int n;cin<<n; | ~~~^~~ a.cc:4:12: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:4:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 4 | int n;cin<<n; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:4:14: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:4:14: required from here 4 | int n;cin<<n; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s949586010
p03813
Java
public class Sample{ String s; public Sample(String str){ s = str; } public int searchA(){ return s.indexOf("A"); } public int searchZ(){ return s.lastIndexOf("Z") + 1; } public static void main(String[] args){ Sample sample = new Sample(args[0]); int start = sample.searchA(); int end = sample.searchZ(); System.out.println(end - start); } }
Main.java:2: error: class Sample is public, should be declared in a file named Sample.java public class Sample{ ^ 1 error
s684703000
p03813
Java
import String; class Sample{ String s; String ss; Sample(String str){ s = str; } int searchA(){ return s.indexOf("A"); } int searchZ(){ return s.lastIndexOf("Z") + 1; } public static void main(String[] args){ Sample sample = new Sample(args[0]); int start = sample.searchA(); int end = sample.searchZ(); System.out.println(end - start); } }
Main.java:1: error: '.' expected import String; ^ 1 error
s122097717
p03813
C
#include <stdio.h> int main(void){ int a; scanf("%d",&a); if((a<1200){ printf("ABC"); }else{ printf("ARC"); } return 0; }
main.c: In function 'main': main.c:5:20: error: expected ')' before '{' token 5 | if((a<1200){ | ~ ^ | ) main.c:11:1: error: expected expression before '}' token 11 | } | ^
s270621378
p03813
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vi = vector<int>; using vll = vector<ll>; using P = pair<int, int> const int INF = 1e9; const ll INFLL = 1e18; const int MOD = 1e9 + 7; const int NIL = -1; #define rep(i,n) for(int i=0; i<(n); ++i) #define all(n) begin(n),end(n) template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } #define DEBUG int main() { ios::sync_with_stdio(false); cin.tie(0); int x; cin >> x; cout << (x < 1200 ? "ABC" : "ARC") << endl; return 0; }
a.cc:8:11: error: two or more data types in declaration of 'type name' 8 | using P = pair<int, int> | ^~~~~~~~~~~~~~
s770167136
p03813
C++
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; const int INF= 1e9+5; typedef long long ll; int main(){ int x; cin>>X; if(x<1200)cout<<"ABC"<<endl; else cout<<"ARC"<<endl; }
a.cc: In function 'int main()': a.cc:10:8: error: 'X' was not declared in this scope 10 | cin>>X; | ^
s389302201
p03813
C++
#include<iostream> using namesapce std; int main() { int a; cin>>a; if(a<1200) cout<<"ABC"<<endl; else cout<<"ARC"<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namesapce' 2 | using namesapce std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:7:16: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | if(a<1200) cout<<"ABC"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 7 | if(a<1200) cout<<"ABC"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:8:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 8 | else cout<<"ARC"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:8:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 8 | else cout<<"ARC"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s841973497
p03813
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<cmath> #include<cstdlib> #include<cstring> #include<stdio.h> using namespace std; int n; int main() { scanf("%d",&n); n>1200:printf("ARC\n"):printf("ABC\n"); }
a.cc: In function 'int main()': a.cc:14:15: error: expected ';' before ':' token 14 | n>1200:printf("ARC\n"):printf("ABC\n"); | ^ | ;
s731285863
p03813
C++
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if(n>1200){ cout<<"ABC"; } else{ cout<<"ARC" } }
a.cc: In function 'int main()': a.cc:11:20: error: expected ';' before '}' token 11 | cout<<"ARC" | ^ | ; 12 | } | ~
s208451067
p03813
C++
#include<iostream> using namespace std; int main() { int x; cin>>X; if(x>1200)cout<<"ARC"<<endl; else cout<<"ABC"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:10: error: 'X' was not declared in this scope 6 | cin>>X; | ^
s455027305
p03813
C++
#include<bits/stdc++.h> template<typename T>inline auto range(T i,T j){ std::vector<T>ee; if(j>=i)for(T o=i;o<=j;++o)ee.push_back(o); else for(T o=i;o>=j;--o)ee.push_back(o); return ee; } struct __EMPty__{}; template <typename T> struct Greater:std::greater<T>{}; template <typename T> struct Less:std::less<T>{}; #define Print print #define Greater(x) greater<x> #define Less(x) less<x> #define print std::cout #define out << #define Constructor(f) f #define Destructor(f) ~f #define read std::cin #define Read read #define in >> #define begin main(){ #define another #define called #define integer int #define plus + #define Let #define let #define be = #define the #define value #define of #define us #define now #define I #define have #define an #define thing auto #define Please #define please #define Now #define Then #define That #define is #define all return 0; #define Thank #define you #define so #define within : #define much } #define do ) #define each ( #define For for #define word char #define sentence string #define Do do #define While while( #define array #define Until until #define some #define integers integer #define times * #define minus - #define divided / #define by #define mod % #define Sort std::sort #define equals == #define not_equals != #define stop break #define Stop stop #define If if( #define to #define Else else #define boolean bool #define one #define is #define from #define different != #define function auto #define with #define as #define well , #define nothing #define address & #define One one #define An an #define type struct #define includes #define which #define way #define Use #define its this-> #define Return return #define cpp std #define itself *this; #define Another another #define but __EMPty__ #define decimal double #define greater > #define less < #define than Let us begin; I have an integer called x; Read in x; If the value of x is less than 1200 do{ Print out "ABC\n"; } Else{ Print out "ARC\n"; } That is all; Thank you;
a.cc:21:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 21 | #define begin main(){ | ^~~~ a.cc:102:8: note: in expansion of macro 'begin' 102 | Let us begin; | ^~~~~ a.cc: In function 'int main()': a.cc:112:11: error: expected '}' at end of input 112 | Thank you; | ^ a.cc:21:21: note: to match this '{' 21 | #define begin main(){ | ^ a.cc:102:8: note: in expansion of macro 'begin' 102 | Let us begin; | ^~~~~
s219982854
p03813
C++
#include<cstdio> using namespace std; int main() { int a; scanf("%d",&a); if(a<1200)cout<<"ABC"; else cout<<"ARC"; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: 'cout' was not declared in this scope 7 | if(a<1200)cout<<"ABC"; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using namespace std; a.cc:8:9: error: 'cout' was not declared in this scope 8 | else cout<<"ARC"; | ^~~~ a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
s098529651
p03813
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < n; i++) using namespace std; int main() { int x; cin >> x; if(x < 1200) cout << "ABC" << endl; else cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:18: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | else cout << ans << endl; | ^~~ | abs
s162222292
p03813
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if (X<1200){ cout<<"ABC"<<endl; return 0; } cout<<"ARC"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'X' was not declared in this scope 7 | if (X<1200){ | ^
s725348454
p03813
C++
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <utility> #include <cmath> #include <vector> #include <queue> #include <set> #include <map> #include <functional> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; typedef pair<ll, ll> P; typedef vector<vector<P>> vvP; #define rep(i, n) for(ll i = 0; i < n; i++) #define exrep(i, a, b) for(ll i = a; i <= b; i++) #define out(x) cout << x << endl #define exout(x) printf("%.10f\n", x) #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define pb push_back #define re0 return 0 const ll mod = 1000000007; const ll INF = 1e16; const ll MAX_N = 100010; int main() { ll x; cin >> x; if(x < 1200) { out("ABC") } else { out("ARC"); } re0; }
a.cc: In function 'int main()': a.cc:37:5: error: expected ';' before '}' token 37 | } | ^
s871100588
p03813
C++
#include<bits/stdc++.h> using namespace std; int main() { int x; cin >> x; if(x >=1200){ puts("ARC"); }else{ puts("ABC") } }
a.cc: In function 'int main()': a.cc:11:16: error: expected ';' before '}' token 11 | puts("ABC") | ^ | ; 12 | } | ~
s388003575
p03813
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> int x; if (x < 1200) cout << "ABC" < <endl; else cout << "ARC" << endl; }
a.cc: In function 'int main()': a.cc:5:10: error: expected primary-expression before 'int' 5 | cin >> int x; | ^~~ a.cc:6:7: error: 'x' was not declared in this scope 6 | if (x < 1200) cout << "ABC" < <endl; | ^ a.cc:6:33: error: expected primary-expression before '<' token 6 | if (x < 1200) cout << "ABC" < <endl; | ^