submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s326188811
p03851
C++
#include<bits/stdc++.h> #include<deque> #include<iostream> #include<algorithm> using namespace std; #define ll long long const int maxn = 3e5 + 5; int n, m; ll t[maxn], p[maxn], f[maxn], g[maxn], F[maxn], G[maxn], h[maxn]; pair<int, ll> drink[maxn]; struct node { ll x, y; }; long double k(const node &a, const node &b) { return long double(a.y - b.y) / long double(a.x - b.x); } ll crossz(const node &a, const node &b, const node& c) { return (b.x - a.x) * (c.y - b.y) - (b.y - a.y) * (c.x - b.x); } void rev(ll *a) { for (int i = 1; i <= n - i + 1; ++i)swap(a[i], a[n - i + 1]); } void cal(ll *dp) { p[0] = 0; for (int i = 1; i <= n; ++i)p[i] = p[i - 1] + t[i]; deque<node> Q; Q.push_back({ 0, 0 }); dp[0] = 0; for (ll i = 1; i <= n; ++i) { dp[i] = dp[i - 1]; while (Q.size() > 1) { node temp = Q.front(); Q.pop_front(); node temp2 = Q.front(); ll ans1, ans2; ans1 = temp.y - i * temp.x - p[i] + (i*i + i) / 2; ans2 = temp2.y - i * temp2.x - p[i] + (i*i + i) / 2; if (ans1 > ans2) { Q.push_front(temp); break; } } dp[i] = max(dp[i], Q.front().y - i * Q.front().x - p[i] + (i*i + i) / 2); //add dp[i] node temp = { i, dp[i] + p[i] + (i * i - i) / 2 }; while (Q.size() > 1) { node back = Q.back(); Q.pop_back(); //用除法求斜率判大小,精度有误差 //long double k1 = k(temp, back), k2 = k(back, Q.back()); //if (k1 < k2) if(crossz(Q.back(), back, temp) < 0) { Q.push_back(back); break; } } Q.push_back(temp); } } void calh(int l, int r) { if (l == r) { h[l] = max(h[l], f[l - 1] + g[r + 1] + 1 - t[l]); return; } int mid = (l + r >> 1); for (ll i = l; i <= mid; ++i)F[i] = f[i - 1] + p[i - 1] + (i*i - 3 * i) / 2 + 1; for (ll j = mid + 1; j <= r; ++j)G[j] = g[j + 1] - p[j] + (j*j + j * 3) / 2; deque<node> Q; for (int i = mid + 1; i <= r; ++i) { node now = { i, G[i] }; while (Q.size() > 1) { node tmp = Q.back(); Q.pop_back(); //long double k1 = k(now, tmp), k2 = k(tmp, Q.back()); if(crossz(Q.back(), tmp, now) < 0)//if (k1 < k2) { Q.push_back(tmp); break; } } Q.push_back(now); } ll t = -4e18; for (ll j = l; j <= mid; ++j) { while (Q.size() > 1) { ll ans1, ans2; node tmp = Q.back(); Q.pop_back(); ans1 = tmp.y - tmp.x * j, ans2 = Q.back().y - Q.back().x * j; if (ans1 > ans2) { Q.push_back(tmp); break; } } t = max(t, Q.back().y - Q.back().x * j + F[j]); h[j] = max(t, h[j]); } calh(l, mid); calh(mid + 1, r); } void solve() { cin >> n; for (int i = 1; i <= n; ++i)cin >> t[i]; cin >> m; //for (int i = 1; i <= m; ++i)cin >> drink[i].first >> drink[i].second; memset(h, 0xbf, sizeof(h));//初值不能为0,因为要求i必选,值可能为负 cal(f); rev(t); cal(g); rev(t); rev(g); for (int i = 1; i <= n; ++i)p[i] = p[i - 1] + t[i]; calh(1, n); rev(t); for (int i = 1; i <= n; ++i)p[i] = p[i - 1] + t[i]; swap(f, g); rev(f); rev(g); rev(h); calh(1, n); rev(t); rev(h); rev(f); rev(g); swap(f, g); for (int i = 1; i <= m; ++i) { ll p, v; cin >> p >> v; //ll p = drink[i].first, v = drink[i].second; ll ans = max(f[p - 1] + g[p + 1], h[p] + t[p] - v); cout << ans << "\n"; } } signed main() { ios::sync_with_stdio(false); cin.tie(0); // int t; cin >> t; // for(int i = 1; i <= t; ++i) solve(); // system("pause"); return 0; }
a.cc: In function 'long double k(const node&, const node&)': a.cc:19:16: error: expected primary-expression before 'long' 19 | return long double(a.y - b.y) / long double(a.x - b.x); | ^~~~ a.cc:19:15: error: expected ';' before 'long' 19 | return long double(a.y - b.y) / long double(a.x - b.x); | ^~~~~ | ; a.cc:19:16: error: expected primary-expression before 'long' 19 | return long double(a.y - b.y) / long double(a.x - b.x); | ^~~~
s168190184
p03851
C++
#include <bits/stdc++.h> #define pb emplace_back #define ll long long #define fi first #define se second #define mp make_pair #define sz(x) int(x.size()) #define int int64_t using namespace std; typedef pair<int, int> pii; const int N = 3e5 + 5; const int inf = (ll)1e18; int operator*(const pii& x, const pii& y) {return x.fi * y.se - y.fi * x.se;} pii operator-(const pii& x, const pii& y) {return {x.fi - y.fi, x.se - y.se};} int ccw(const pii& a, const pii& b, const pii& c) {return (c - b) * (b - a);} vector<pii> hull; int sz, low, high, mid, type, ptr, res; void init(int _type) {type = _type, hull.clear(), sz = ptr = 0;} void push(const pii& p) { for(; sz > 1 && ccw(hull[sz - 2], hull[sz - 1], p) * type >= 0; hull.pop_back(), --sz); hull.pb(p); ++sz; } int val(int i, int x) {return (i < sz && i >= 0)? hull[i].fi * x + hull[i].se: -inf;} int get(int x) { if(hull.empty()) return -inf; low = 0, high = sz - 1; while(low <= high) { mid = (low + high) >> 1; if(val(mid, x) <= val(mid + 1, x)) low = mid + 1; else high = mid - 1; } return max(val(low, x), val(high, x)); } int n, t[N], s[N], f[N], g[N], _dp[N], dp[N]; void divide(int l, int r) { if(l == r) { dp[l] = max(dp[l], f[l - 1] + g[l + 1] + 1 - s[l]); return; } int mid = (l + r) >> 1; init(1); t[l - 1] = 0; for(int i = l; i <= r; ++i) t[i] = t[i - 1] + s[i]; t[r + 1] = t[r]; /// dp(i) = max f(j) + (i - j) * (i - j + 1) / 2 - t[i] + t[j] /// 2f(j) + 2t[j] + jj - j - 2ij + ii - 2t[i] + i for(int i = l - 1; i < mid; ++i) push({-2 * i, 2 * f[i] + 2 * t[i] + i * i - i}); int ans = -inf; for(int i = mid + 1; i <= r; ++i) { _dp[i] = (get(i) + i * i - 2 * t[i] + i) / 2 + g[i + 1]; } for(int i = r; i > mid; --i) { ans = max(ans, _dp[i]); dp[i] = max(dp[i], ans); } init(-1); ans = -inf; /// dp(i) = g(j) + (j - i) * (j - i + 1) / 2 - t[j - 1] + t[i - 1] /// 2g(j) + jj - 2t[j - 1] + j - 2ij + ii + 2t[i - 1] - i for(int i = r + 1; i > mid + 1; --i) { push({-2 * i, 2 * g[i] + i * i - 2 * t[i - 1] + i}); } for(int i = mid; i >= l; --i) _dp[i] = (get(i) + i * i - i + 2 * t[i - 1]) / 2 + f[i - 1]; for(int i = l; i <= mid; ++i) { ans = max(ans, _dp[i]); dp[i] = max(dp[i], ans); } divide(l, mid); divide(mid + 1, r); } int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); #define Task "test" if(fopen(Task".inp", "r")) { freopen(Task".inp", "r", stdin); freopen(Task".out", "w", stdout); } cin >> n; for(int i = 1; i <= n; ++i) cin >> s[i], t[i] = t[i - 1] + s[i]; init(1); push({0, 0}); for(int i = 1; i <= n; ++i) { f[i] = max(f[i - 1], (get(i) - 2ll * t[i] + i * i + i) >> 1); push({-2 * i, 2ll * f[i] + i * i - i + 2 * t[i]}); } init(-1); push({-2 * n - 2, (n + 1) * (n + 1) - 2 * t[n] + n + 1}); for(int i = n; i >= 1; --i) { g[i] = max(g[i + 1], (get(i) + i * i - i + 2 * t[i - 1]) >> 1); push({-2 * i, 2 * g[i] + i * i - 2 * t[i - 1] + i}); } divide(1, n); int q, pi, xi; cin >> q; while(q --) { cin >> pi >> xi; cout << max(f[pi - 1] + g[pi + 1], dp[pi] + s[pi] - xi) << '\n'; } }
a.cc: In function 'int32_t main()': a.cc:86:19: error: no matching function for call to 'max(int64_t&, long long int)' 86 | f[i] = max(f[i - 1], (get(i) - 2ll * t[i] + i * i + i) >> 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included 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_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)' 257 | max(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed: a.cc:86:19: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int') 86 | f[i] = max(f[i - 1], (get(i) - 2ll * t[i] + i * i + i) >> 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)' 303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)' 5706 | max(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)' 5716 | max(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed: a.cc:86:19: note: mismatched types 'std::initializer_list<_Tp>' and 'long int' 86 | f[i] = max(f[i - 1], (get(i) - 2ll * t[i] + i * i + i) >> 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
s463304301
p03851
C++
int a , b ; string op ; cin > > a >> op >> b ; if ( op == "+") cout << a + b << endl ; else cout << a - b << endl ;
a.cc:2:1: error: 'string' does not name a type 2 | string op ; | ^~~~~~ a.cc:3:1: error: 'cin' does not name a type 3 | cin > > a >> op >> b ; | ^~~ a.cc:4:1: error: expected unqualified-id before 'if' 4 | if ( op == "+") | ^~ a.cc:6:1: error: expected unqualified-id before 'else' 6 | else | ^~~~
s261775161
p03851
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<cctype> #define maxn 300005 #define LL long long using namespace std; int n,m; template<class T>inline void read(T &res) { char ch; for(;!isdigit(ch=getchar();); for(res=ch-'0';isdigit(ch=getchar());res=res*10+ch-'0'); } LL sum[maxn],dp[2][maxn]; int RMQ[19][maxn],Q[3][maxn],rpt[3][maxn],L[3],R[3],lg[maxn]; inline int Query(const int &u,const int &v) { if(u>v) return 0;int tmp = lg[v-u+1] ;return min(RMQ[tmp][u] , RMQ[tmp][v-(1<<tmp)+1]); } inline bool check0(int a,int pt,int b) { return dp[a][0] + 1ll * (pt - a) * (pt - a + 1) / 2 - sum[pt] + sum[a] < dp[b][0] + 1ll * (pt - b) * (pt - b + 1) / 2 - sum[pt] + sum[b]; } inline bool check1(int a,int pt,int b) { return dp[a][0] + 1ll * (pt - a) * (pt - a + 1) / 2 - sum[pt] + sum[a] + Query(a+1,pt) < dp[b][0] + 1ll * (pt - b) * (pt - b + 1) / 2 - sum[pt] + sum[b] + Query(b+1, pt); } inline bool check2(int a,int pt,int b) { return dp[a][1] + 1ll * (pt - a) * (pt - a + 1) / 2 - sum[pt] + sum[a] < dp[b][1] + 1ll * (pt - b) * (pt - b + 1) / 2 - sum[pt] + sum[b]; } int main() { read(n); for(int i=1;i<=n;i++) read(sum[i]) ,sum[i]+=sum[i-1]; memset(dp,-0x3f,sizeof dp); memset(RMQ,0x3f,sizeof RMQ); for(int sum=1,i=0;sum<maxn;sum<<=1,i++) lg[sum]=i; for(int i=1;i<maxn;i++) lg[i] = max(lg[i],lg[i-1]); read(m); for(int i=1,a,b;i<=m;i++) { read(a),read(b); RMQ[0][a] = min(RMQ[0][a] , b - sum[a] + sum[a+1]); } for(int j=1;j<19;j++) for(int i=1;i<=n;i++) RMQ[j][i] = min(RMQ[j-1][i] , RMQ[j-1][i+(1<<j-1)]); for(int i=0;i<3;i++) Q[i][R[i]]] = 0 , rpt[i][R[i]++] = n; for(int i=1;i<=n;i++) { for(int j=0;j<3;j++) (rpt[j][L[j]] < i) && (L[j] ++); dp[i][0] = dp[rpt[Q[0][L[0]]]][0] + 1ll * (i - Q[0][L[0]]) * (i - Q[0][L[0]] + 1) / 2 - sum[i] + sum[Q[0][L[0]]]; dp[i][1] = max(dp[rpt[Q[1][L[1]]]][0] + 1ll * (i - Q[1][L[1]]) * (i - Q[1][L[1]] + 1) / 2 - sum[i] + sum[Q[1][L[1]]] + Query(Q[1][L[1]]+1 , i), dp[rpt[Q[2][L[2]]]][1] + 1ll * (i - Q[2][L[2]]) * (i - Q[2][L[2]] + 1) / 2 - sum[i] + sum[Q[2][L[2]]]); for(;L[0] < R[0] - 1 && check0(Q[0][R[0]] , rpt[0][R[0]-1]+1 , i);) R[0] --; for(;L[1] < R[1] - 1 && check0(Q[1][R[1]] , rpt[1][R[1]-1]+1 , i);) R[1] --; for(;L[2] < R[2] - 1 && check0(Q[2][R[2]] , rpt[2][R[2]-1]+1 , i);) R[2] --; } }
a.cc: In function 'void read(T&)': a.cc:13:35: error: expected ')' before ';' token 13 | for(;!isdigit(ch=getchar();); | ~ ^ | ) a.cc: In function 'int main()': a.cc:49:32: error: no matching function for call to 'min(int&, long long int)' 49 | RMQ[0][a] = min(RMQ[0][a] , b - sum[a] + sum[a+1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from a.cc:3: /usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)' 233 | min(const _Tp& __a, const _Tp& __b) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed: a.cc:49:32: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int') 49 | RMQ[0][a] = min(RMQ[0][a] , b - sum[a] + sum[a+1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)' 281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/14/algorithm:61: /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)' 5686 | min(initializer_list<_Tp> __l) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate expects 1 argument, 2 provided /usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)' 5696 | min(initializer_list<_Tp> __l, _Compare __comp) | ^~~ /usr/include/c++/14/bits/stl_algo.h:5696:5: note: template argument deduction/substitution failed: a.cc:49:32: note: mismatched types 'std::initializer_list<_Tp>' and 'int' 49 | RMQ[0][a] = min(RMQ[0][a] , b - sum[a] + sum[a+1]); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:56:27: error: expected ';' before ']' token 56 | Q[i][R[i]]] = 0 , rpt[i][R[i]++] = n; | ^ | ; a.cc:61:22: error: invalid types 'long long int [2][300005][int [300005]]' for array subscript 61 | dp[i][0] = dp[rpt[Q[0][L[0]]]][0] + 1ll * (i - Q[0][L[0]]) * (i - Q[0][L[0]] + 1) / 2 - sum[i] + sum[Q[0][L[0]]]; | ^ a.cc:62:26: error: invalid types 'long long int [2][300005][int [300005]]' for array subscript 62 | dp[i][1] = max(dp[rpt[Q[1][L[1]]]][0] + 1ll * (i - Q[1][L[1]]) * (i - Q[1][L[1]] + 1) / 2 - sum[i] + sum[Q[1][L[1]]] + Query(Q[1][L[1]]+1 , i), | ^ a.cc:63:19: error: invalid types 'long long int [2][300005][int [300005]]' for array subscript 63 | dp[rpt[Q[2][L[2]]]][1] + 1ll * (i - Q[2][L[2]]) * (i - Q[2][L[2]] + 1) / 2 - sum[i] + sum[Q[2][L[2]]]); | ^
s113468190
p03851
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int MN = 300010; struct CHT { vector<ll> M, B; void init() { M.clear(); B.clear(); } bool bad(int l1, int l2, int l3) { return (M[l1] - M[l2]) * (B[l3] - B[l1]) <= (M[l1] - M[l3]) * (B[l2] - B[l1]); } void add(ll m, ll b) { M.push_back(m); B.push_back(b); while(M.size() >= 3 && bad(M.size() - 3, M.size() - 2, M.size() - 1)) { M.erase(M.end() - 2); B.erase(B.end() - 2); } if(M.size() == 2 && M[0] == M[1]) { M.erase(M.end() - 2); B.erase(B.end() - 2); } } ll query(ll x) { if(M.size() == 0) return 1e18; int s = 0, e = (int)M.size() - 2, p = 0; while(s <= e) { int m = (s + e)>>1; if((M[m] - M[m + 1]) * x >= B[m + 1] - B[m]) { p = m + 1; s = m + 1; } else e = m - 1; } return M[p] * x + B[p]; } } cht; int N, M; ll T[MN], psum[MN], dp1[MN], dp2[MN], ans[MN]; struct BIT { vector<ll> tree; void init() { tree = vector<ll>(4 * N, -1e18); } void upd(int a, int b, ll val, int l, int r, int n) { if(b < l || r < a) return; if(a <= l && r <= b) { tree[n] = max(tree[n], val); return; } int m = (l + r)>>1; upd(a, b, val, l, m, 2*n); upd(a, b, val, m + 1, r, 2*n + 1); } ll quer(int idx, int l, int r, int n) { if(idx < l || r < idx) return -1e18; ll ret = tree[n]; if(l == r) return ret; int m = (l + r)>>1; ret = max(ret, quer(idx, l, m, 2*n)); ret = max(ret, quer(idx, m + 1, r, 2*n + 1)); return ret; } } bit1, bit2; void solve(int l, int r, int t, BIT &bit, ll *dp1, ll *dp2) { if(l > r) return; int m = (l + r + t)>>1; solve(m + 1, r, bit, dp1, dp2); for(int i = m; i >= l; i--) { ll t = 1LL * i * i - i + (i? psum[i - 1] : 0) - cht.query(i) + (i? dp2[i - 1] : 0); bit.upd(i, m, t, 0, N - 1, 1); } cht.add(2 * m, - 1LL * m * m - m + (m? psum[m - 1] : 0) - dp1[m]); solve(l, m - 1, bit, dp1, dp2); for(int i = m - 1; i >= l; i--) { cht.add(2 * i, - 1LL * i * i - i + (i? psum[i - 1] : 0) - dp1[i]); } } int main() { scanf("%d", &N); for(int i = 0; i < N; i++) { scanf("%lld", &T[i]); T[i] *= 2; } for(int i = 0; i < N; i++) { psum[i] = T[i]; if(i) psum[i] += psum[i - 1]; } cht.init(); cht.add(2 * N, - 1LL * N * N - N + psum[N - 1]); for(int i = N - 1; i >= 0; i--) { dp1[i] = 1LL * i * i - i + (i? psum[i - 1] : 0) - cht.query(i); dp1[i] = max(dp1[i], dp1[i + 1]); cht.add(2 * i, - 1LL * i * i - i + (i? psum[i - 1] : 0) - dp1[i]); } reverse(T, T + N); for(int i = 0; i < N; i++) { psum[i] = T[i]; if(i) psum[i] += psum[i - 1]; } cht.init(); cht.add(2 * N, - 1LL * N * N - N + psum[N - 1]); for(int i = N - 1; i >= 0; i--) { dp2[i] = 1LL * i * i - i + (i? psum[i - 1] : 0) - cht.query(i); dp2[i] = max(dp2[i], dp2[i + 1]); cht.add(2 * i, - 1LL * i * i - i + (i? psum[i - 1] : 0) - dp2[i]); } bit1.init(); cht.init(); cht.add(2 * N, - 1LL * N * N - N + psum[N - 1]); reverse(dp1, dp1 + N); solve(0, N - 1, 1, bit1, dp2, dp1); reverse(T, T + N); reverse(dp1, dp1 + N); reverse(dp2, dp2 + N); for(int i = 0; i < N; i++) { psum[i] = T[i]; if(i) psum[i] += psum[i - 1]; } bit2.init(); cht.init(); cht.add(2 * N, - 1LL * N * N - N + psum[N - 1]); solve(0, N - 1, 0, bit2, dp1, dp2); scanf("%d", &M); for(int i = 0; i < M; i++) { int p, x; scanf("%d %d", &p, &x); p--; x *= 2; ll tmp = (p? dp2[p - 1] : 0) + dp1[p + 1]; tmp = max(tmp, max(bit1.quer(N - 1 - p, 0, N - 1, 1), bit2.quer(p, 0, N - 1, 1)) + T[p] - x); printf("%lld\n", tmp / 2); } }
a.cc: In function 'void solve(int, int, int, BIT&, ll*, ll*)': a.cc:78:21: error: cannot convert 'BIT' to 'int' 78 | solve(m + 1, r, bit, dp1, dp2); | ^~~ | | | BIT a.cc:74:30: note: initializing argument 3 of 'void solve(int, int, int, BIT&, ll*, ll*)' 74 | void solve(int l, int r, int t, BIT &bit, ll *dp1, ll *dp2) { | ~~~~^ a.cc:86:21: error: cannot convert 'BIT' to 'int' 86 | solve(l, m - 1, bit, dp1, dp2); | ^~~ | | | BIT a.cc:74:30: note: initializing argument 3 of 'void solve(int, int, int, BIT&, ll*, ll*)' 74 | void solve(int l, int r, int t, BIT &bit, ll *dp1, ll *dp2) { | ~~~~^
s792958812
p03851
C++
#include <bits/stdc++.h> #define il inline #define RG register #define ll long long #define N (300005) using namespace std; ll sum[N],tmp[N],f1[N],f2[N],h[N],g[N],y[N],a[N],res; int q[N],n,m,top; il int gi(){ RG int x=0,q=1; RG char ch=getchar(); while ((ch<'0' || ch>'9') && ch!='-') ch=getchar(); if (ch=='-') q=-1,ch=getchar(); while (ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar(); return q*x; } il ll max(RG ll a,RG ll b){ return a>b ? a : b; } il void dp(ll *f){ q[top=1]=0; for (RG int i=1;i<=n;++i){ sum[i]=sum[i-1]+a[i],f1[i]=f1[i-1],res=(1LL*i*(i+1)>>1)-sum[i]; while (top>1 && (y[q[top]]-y[q[top-1]])<=1LL*i*(q[top]-q[top-1])) --top; f[i]=max(f[i],res+y[q[top]]-1LL*i*q[top]),y[i]=f[i]+sum[i]+(1LL*i*(i-1)>>1); while (top>1 && (y[i]-y[q[top-1]])*(q[top]-q[top-1])>=(y[q[top]]-y[q[top-1]])*(i-q[top-1])) --top; q[++top]=i; } return; } il void solve(ll *f,ll *g,RG int l,RG int r){ if (l==r){ h[l]=max(h[l],f[l-1]+g[l+1]-a[l]+1); return; } RG int mid=(l+r-D)>>1; top=0; for (RG int i=l-1;i<mid;++i){ while (top>1 && (y[i]-y[q[top-1]])*(q[top]-q[top-1])>=(y[q[top]]-y[q[top-1]])*(i-q[top-1])) --top; q[++top]=i; } for (RG int i=mid;i<=r;++i){ while (top>1 && (y[q[top]]-y[q[top-1]])<=1LL*i*(q[top]-q[top-1])) --top; tmp[i]=(1LL*i*(i+1)>>1)-sum[i]+y[q[top]]-1LL*i*q[top]+g[i+1]; } for (RG int i=r-1;i>=mid;--i) tmp[i]=max(tmp[i],tmp[i+1]); for (RG int i=mid;i<=r;++i) h[i]=max(h[i],tmp[i]); solve(f,g,l,mid),solve(f,g,mid+1,r); return; } int main(){ n=gi(); for (RG int i=1;i<=n;++i) a[i]=gi(); dp(f1),reverse(a+1,a+n+1),dp(f2),reverse(a+1,a+n+1),reverse(f2+1,f2+n+1); for (RG int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i],y[i]=f1[i]+sum[i]+(1LL*i*(i-1)>>1); solve(f1,f2,1,n),reverse(a+1,a+n+1),reverse(f1+1,f1+n+1),reverse(f2+1,f2+n+1),reverse(h+1,h+n+1); for (RG int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i],y[i]=f2[i]+sum[i]+(1LL*i*(i-1)>>1); D=1; solve(f2,f1,1,n),reverse(a+1,a+n+1),reverse(f1+1,f1+n+1),reverse(f2+1,f2+n+1),reverse(h+1,h+n+1),m=gi(); while (m--){ RG int p=gi(),x=gi(); printf("%lld\n",max(f1[p-1]+f2[p+1],h[p]+a[p]-x)); } return 0; }
a.cc: In function 'int gi()': a.cc:13:10: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | RG int x=0,q=1; RG char ch=getchar(); | ^ a.cc:13:14: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | RG int x=0,q=1; RG char ch=getchar(); | ^ a.cc:13:27: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 13 | RG int x=0,q=1; RG char ch=getchar(); | ^~ a.cc: At global scope: a.cc:20:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 20 | il ll max(RG ll a,RG ll b){ return a>b ? a : b; } | ^ a.cc:20:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 20 | il ll max(RG ll a,RG ll b){ return a>b ? a : b; } | ^ a.cc: In function 'void dp(long long int*)': a.cc:24:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 24 | for (RG int i=1;i<=n;++i){ | ^ a.cc: At global scope: a.cc:34:34: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 34 | il void solve(ll *f,ll *g,RG int l,RG int r){ | ^ a.cc:34:43: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 34 | il void solve(ll *f,ll *g,RG int l,RG int r){ | ^ a.cc: In function 'void solve(long long int*, long long int*, int, int)': a.cc:35:77: error: 'D' was not declared in this scope 35 | if (l==r){ h[l]=max(h[l],f[l-1]+g[l+1]-a[l]+1); return; } RG int mid=(l+r-D)>>1; top=0; | ^ a.cc:35:68: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 35 | if (l==r){ h[l]=max(h[l],f[l-1]+g[l+1]-a[l]+1); return; } RG int mid=(l+r-D)>>1; top=0; | ^~~ a.cc:36:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 36 | for (RG int i=l-1;i<mid;++i){ | ^ a.cc:40:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 40 | for (RG int i=mid;i<=r;++i){ | ^ a.cc:44:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 44 | for (RG int i=r-1;i>=mid;--i) tmp[i]=max(tmp[i],tmp[i+1]); | ^ a.cc:45:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 45 | for (RG int i=mid;i<=r;++i) h[i]=max(h[i],tmp[i]); | ^ a.cc: In function 'int main()': a.cc:50:23: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 50 | n=gi(); for (RG int i=1;i<=n;++i) a[i]=gi(); | ^ a.cc:52:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 52 | for (RG int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i],y[i]=f1[i]+sum[i]+(1LL*i*(i-1)>>1); | ^ a.cc:54:15: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 54 | for (RG int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i],y[i]=f2[i]+sum[i]+(1LL*i*(i-1)>>1); D=1; | ^ a.cc:54:86: error: 'D' was not declared in this scope 54 | for (RG int i=1;i<=n;++i) sum[i]=sum[i-1]+a[i],y[i]=f2[i]+sum[i]+(1LL*i*(i-1)>>1); D=1; | ^ a.cc:57:12: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 57 | RG int p=gi(),x=gi(); | ^ a.cc:57:19: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 57 | RG int p=gi(),x=gi(); | ^
s696052868
p03851
C++
#include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; const int MAXN = 300300; typedef long long LL; LL sum[MAXN],f[MAXN],g[MAXN],pre[MAXN],suf[MAXN],val[MAXN],y[MAXN],temp[MAXN],x; int q[MAXN],top,m,n,pos; template<typename T> void read(T &x) { x = 0; char ch = getchar(); while(ch < '0' || ch > '9') ch = getchar(); while(ch >= '0' && ch <= '9') x = x * 10 + ch - '0',ch = getchar(); } void DP(LL *f) { q[top = 1] = 0; for(int i = 1;i <= n;i++) { sum[i] = sum[i-1] + val[i]; while(top > 1 && (y[q[top]] - y[q[top-1]]) <= 1LL * i * (q[top] - q[top-1])) top--; f[i] = max(f[i-1],f[q[top]] + sum[q[top]] - sum[i] + 1LL * (i-q[top]) * (i-q[top]+1) / 2LL); y[i] = f[i] + sum[i] + 1LL * i * (i - 1LL) / 2LL; while(top > 1 && (y[q[top]] - y[q[top-1]]) * (i - q[top]) <= (y[i] - y[q[top]]) * (q[top] - q[top-1])) top--; q[++top] = i; } } void Solve(int l,int r,LL *pre,LL *suf,LL *f) { if(l == r) { f[l] = 1 - val[l]; return ; } int mid = (l + r) >> 1; Solve(l,mid,pre,suf,f),Solve(mid+1,r,pre,suf,f);top = 0; for(int i = l-1;i <= mid;i++) { y[i] = pre[i] + sum[i] + 1LL * i * (i-1) / 2LL; while(top > 1 && (y[q[top]] - y[q[top-1]]) * (i - q[top]) <= (y[i] - y[q[top]]) * (q[top] - q[top-1])) top--; q[++top] = i; } for(int i = mid+1;i <= r;i++) { while(top > 1 && (y[q[top]] - y[q[top-1]]) <= 1LL * i * (q[top] - q[top-1])) top--; temp[i] = pre[q[top]] + sum[q[top]] - sum[i] + 1LL * (i - q[top]) * (i - q[top] + 1LL) / 2LL + suf[i+1]; } for(int i = r-1;i > mid;i--) temp[i] = max(temp[i],temp[i+1]); for(int i = mid+1;i <= r;i++) f[i] = max(f[i],temp[i]); } int main() { read(n); for(int i = 1;i <= n;i++) read(val[i]); DP(f),reverse(val+1,val+n+1); DP(g),reverse(val+1,val+n+1),reverse(g+1,g+n+1); for(int i = 1;i <= n;i++) sum[i] = sum[i-1] + val[i]; Solve(1,n,f,g,pre); reverse(f+1,f+n+1),reverse(g+1,g+n+1),reverse(val+1,val+n+1); for(int i = 1;i <= n;i++) sum[i] = sum[i-1] + val[i]; Solve(1,n,g,f,suf); reverse(suf+1,suf+n+1),reverse(f+1,f+n+1),reverse(g+1,g+n+1),reverse(val+1,val+n+1); // for(int i = 1;i <= n;i++) printf("pre[%d]:%lld suf[%d]:%lld\n",i,pre[i],i,suf[i]); read(m); while(m--) { read(pos),read(x); printf("%lld\n",max(f[pos-1]+g[pos+1],max(pre[pos],suf[pos])-x+val[pos])); } return 0; } /*
a.cc:82:1: error: unterminated comment 82 | /* | ^
s554936196
p03851
C++
#include <cstdio> #include <algorithm> #define int long long const int maxn = 3e5 + 10; const long long oo = 1ll << 62; int n; long long t[maxn], dpl[maxn], dpr[maxn], w[maxn], T[maxn]; inline bool check(long long x0, long long y0, long long x1, long long y1, long long x2, long long y2) { long long a = x1 - x0, b = y1 - y0, c = x2 - x1, d = y2 - y1; return a * d - b * c >= 0; } inline void pre_calc(long long *dp) { static long long T[maxn], x[maxn], y[maxn]; static int top, chs; top = chs = 0; x[top] = 0; y[top] = 0; dp[0] = 0; ++top; for (int i = 1; i <= n; ++i) { T[i] = T[i - 1] + t[i]; if(chs >= top) { chs = top - 1; } while(chs - 1 >= 0 && x[chs - 1] * -i + y[chs - 1] >= x[chs] * -i + y[chs]) { --chs; } while(chs + 1 < top && x[chs + 1] * -i + y[chs + 1] >= x[chs] * -i + y[chs]) { ++chs; } dp[i] = std::max(dp[i - 1], x[chs] * -i + y[chs] + (long long) i * (i + 1) / 2 - T[i]); long long nx = i, ny = dp[i] + T[i] + (long long) i * (i - 1) / 2; while(top > 1 && check(x[top - 2], y[top - 2], x[top - 1], y[top - 1], nx, ny)) { --top; } x[top] = nx; y[top] = ny; ++top; } return; } inline void dc(int l, int r) { static long long x[maxn], y[maxn], dp[maxn]; static int top; if(l == r) { w[l] = dpl[l - 1] + dpr[r + 1] + 1 - t[l]; return; } int mid = l + r >> 1; dc(l, mid); dc(mid + 1, r); #ifdef DEBUG printf("dc(%d, %d)\n", l, r); #endif //solve w[mid + 1 ... r] top = 0; for (int i = l; i <= mid; ++i) { long long nx = i, ny = dpl[i - 1] + T[i - 1] + (long long) l * (l - 1) / 2 - l; while(top > 1 && check(x[top - 2], y[top - 2], x[top - 1], y[top - 1], nx, ny)) { --top; } x[top] = nx; y[top] = ny; ++top; } for (int i = r, chs = -1; i > mid; --i) { dp[i] = -oo; if(!~chs) { for (int j = 0; j < top; ++j) { if(x[j] * -i + y[j] > dp[i]) { dp[i] = x[j] * -i + y[j]; chs = j; } } dp[i] += (long long) i * (i + 1) / 2 + i + dpr[i + 1] - T[i] + 1; w[i] = std::max(w[i], dp[i]); } else { while(chs - 1 >= 0 && x[chs - 1] * -i + y[chs - 1] >= x[chs] * -i + y[chs]) { --chs; } while(chs + 1 < top && x[chs + 1] * -i + y[chs + 1] >= x[chs] * -i + y[chs]) { ++chs; } dp[i] = x[chs] * -i + y[chs]; dp[i] += (long long) i * (i + 1) / 2 + i + dpr[i + 1] - T[i] + 1; dp[i] = std::max(dp[i], dp[i + 1]); w[i] = std::max(w[i], dp[i]); } #ifdef DEBUG printf("\tdp[%d] = %lld\n", i, dp[i]); #endif } //solve w[l ... mid] top = 0; for (int i = mid + 1; i <= r; ++i) { long long nx = i, ny = dpr[i + 1] - T[i] + (long long) i * (i + 1) / 2 + i; while(top > 1 && check(x[top - 2], y[top - 2], x[top - 1], y[top - 1], nx, ny)) { --top; } x[top] = nx; y[top] = ny; ++top; } for (int i = l, chs = -1; i <= mid; ++i) { dp[i] = -oo; if(!~chs) { for (int j = 0; j < top; ++j) { if(x[j] * -i + y[j] > dp[i]) { dp[i] = x[j] * -i + y[j]; chs = j; } } dp[i] += dpl[i - 1] + T[i - 1] + (long long) i * (i - 1) / 2 - i + 1; w[i] = std::max(w[i], dp[i]); } else { while(chs - 1 >= 0 && x[chs - 1] * -i + y[chs - 1] >= x[chs] * -i + y[chs]) { --chs; } while(chs + 1 < top && x[chs + 1] * -i + y[chs + 1] >= x[chs] * -i + y[chs]) { ++chs; } dp[i] = x[chs] * -i + y[chs]; dp[i] += dpl[i - 1] + T[i - 1] + (long long) i * (i - 1) / 2 - i + 1; dp[i] = std::max(dp[i], dp[i - 1]); w[i] = std::max(w[i], dp[i]); } #ifdef DEBUG printf("\tdp[%d] = %lld\n", i, dp[i]); #endif } return; } main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%lld", t + i); T[i] = T[i - 1] + t[i]; } pre_calc(dpl); std::reverse(t + 1, t + n + 1); pre_calc(dpr); std::reverse(t + 1, t + n + 1); std::reverse(dpr + 1, dpr + n + 1); dc(1, n); int q; scanf("%d", &q); while(q--) { int i; long long x; scanf("%d%lld", &i, &x); #ifdef DEBUG printf("w[%d] = %lld\n", i, w[i]); #endif printf("%lld\n", std::max(dpl[i - 1] + dpr[i + 1], w[i] + t[i] - x)); } return; }
a.cc:147:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 147 | main() { | ^~~~ a.cc: In function 'int main()': a.cc:171:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 171 | return; | ^~~~~~
s201041267
p03851
C++
#include<bits/stdc++.h> using namespace std; //随着左端点单调向右,右端点也一定是单调向左 const int N = 3e5 + 9; using ll = long long; int n, m, p[N], x[N], w[N], q[N], h, t; ll f[N], g[N], y[N], T[N]; template<class T> void Max (T &x, T y) { if (x < y) x = y; } void Solve (int l, int r) { int mid = (l + r) >> 1; } int main () { scanf("%d", &n); for (int i = 1; i <= n; ++i) scanf("%d", &w[i]), T[i] = T[i - 1] - 1 + w[i]; q[h = t = 1] = 0; for (int i = 1; i <= n; ++i) { f[i] = -1e18; // for (int j = 0; j < i; ++j) Max(f[i], y[j] - 2ll * i * j); while (h < t && (y[q[h + 1]] - y[q[h]]) < 2ll * i * (q[h + 1] - q[h])) ++h; while (h < t && (y[i] - y[q[t]]) * (q[t] - q[t - 1]) > (y[q[t]] - y[q[t - 1]]) * (i - q[t])) --t; f[i] = y[q[h]] - 2ll * i * q[h]; (f[i] += 1ll * i * i - T[i] * 2 - i) >>= 1; Max(f[i], f[i - 1]); y[i] = f[i] * 2 + 1ll * i * i + i + T[i] * 2; } q[h = t = 1] = n + 1; T[n + 1] = T[n]; y[n + 1] = 1ll * (n + 1) * (n + 1) - (n + 1) - T[n + 1] * 2; for (int i = n; i; --i) { g[i] = -1e18; for (int j = n + 1; j > i; --j) Max(g[i], y[j] - 2ll * i * j); (g[i] += 1ll * i * i + T[i] * 2 + i) >>= 1; Max(g[i], g[i + 1]);o y[i] = g[i] * 2 + 1ll * i * i - i - T[i] * 2; } Solve(1, n); scanf("%d", &m); for (int i = 1; i <= m; ++i) scanf("%d%d", &p[i], &x[i]); return 0; }
a.cc: In function 'int main()': a.cc:37:37: error: 'o' was not declared in this scope 37 | Max(g[i], g[i + 1]);o | ^
s981461468
p03851
C++
require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')
a.cc:1:9: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:33: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:57: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:81: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:105: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:129: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:153: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:177: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:201: warning: multi-character literal with 13 characters exceeds 'int' size of 4 bytes 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^~~~~~~~~~~~~~~ a.cc:1:8: error: expected constructor, destructor, or type conversion before '(' token 1 | require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view')require('solution/view') | ^
s918864979
p03851
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define pb push_back #define fs first #define sc second #define show(x) cout << #x << " = " << x << endl #define chmin(x,y) x=min(x,y) #define chmax(x,y) x=max(x,y) using namespace std; template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";} template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;} typedef long long ll; struct CHT{ using D = ll; typedef pair<D,D> P; vector<P> deq; int s,sd,t; void init(int N){ deq.resize(N); s=0,sd=0,t=0; } void add(D a,D b){ //add ax+b a:(広義)単調減少!!! b=-b; P p(a,b); while(s+1<t&&check(deq[t-2],deq[t-1],p)) t--; deq[t++]=p; } D incr_query(D x){ //x:単調増加の時,これを繰り返し呼ぶ(間にaddが挟まるのはOK) x=-x; while(s+1<t&&f(deq[s],x)>=f(deq[s+1],x)) s++; return -f(deq[s],x); } D query(D x){ //x:単調減少の時,これを繰り返し呼ぶ(間にaddが挟まるのはOK) x=-x; if(sd>=t) sd=t-1; while(sd+1<t&&f(deq[sd],x)>=f(deq[sd+1],x)) sd++; while(sd>0&&f(deq[sd],x)>f(deq[sd-1],x)) sd--; return -f(deq[sd],x); } D query(D x){ x=-x; int lb=s-1,ub=t-1; while(ub-lb>1){ int m=(lb+ub)/2; if(isright(deq[m],deq[m+1],x)) lb=m; else ub=m; } return -f(deq[ub],x); } bool isright(P& a,P& b,D x){ return f(a,x)>=f(b,x); } bool check(P& a,P& b,P& c){ return (b.fs-a.fs)*(c.sc-b.sc)>=(b.sc-a.sc)*(c.fs-b.fs); } D f(P &p,int x){ return p.fs*x+p.sc; } }cht; ll inf=1e18; const int MN=300000; int N; ll T[MN]; ll le[MN+1],ri[MN+1]; ll notuse[MN]; ll use[MN]; void calc(int L,int R){ if(L==R) return; int m=(L+R)/2; //L<=j<=m<=p<i<=R cht.init(m-L+1); for(ll j=L;j<=m;j++) cht.add(-j,le[j]+(j*j-j)/2); ll mx=-inf; for(ll i=R;i>=m+1;i--){ ll val=cht.incr_query(i)+(i*i+i)/2+ri[N-i]; chmax(mx,val); chmax(use[i-1],mx); } //L<=j<=p<m<i<=R cht.init(R-m); for(ll i=m+1;i<=R;i++) cht.add(-i,ri[N-i]+(i*i+i)/2); mx=-inf; for(ll j=L;j<m;j++){ ll val=cht.query(j)+(j*j-j)/2+le[j]; chmax(mx,val); chmax(use[j],mx); } calc(L,m); calc(m+1,R); } int main(){ cin>>N; rep(i,N) cin>>T[i]; cht.init(N); le[0]=0; for(ll i=0;i<N;i++){ cht.add(-i,le[i]+(i*i-i)/2); le[i+1]=max(le[i]+T[i],cht.query(i+1)+(i+1)*(i+2)/2); } cht.init(N); ri[0]=0; for(ll i=0;i<N;i++){ cht.add(-i,ri[i]+(i*i-i)/2); ri[i+1]=max(ri[i]+T[N-1-i],cht.query(i+1)+(i+1)*(i+2)/2); } rep(i,N) notuse[i]=le[i]+T[i]+ri[N-1-i]; ll sum=0; rep(i,N) sum+=T[i]; calc(0,N); // rep(i,N) printf("use[%d]=%lld\n",i,use[i]); // rep(i,N) printf("notuse[%d]=%lld\n",i,notuse[i]); int M; cin>>M; rep(i,M){ int p; ll x; cin>>p>>x; p--; ll ans=max(use[p],notuse[p]-T[p]+x); cout<<ans-(sum-T[p]+x)<<endl; } }
a.cc:43:11: error: 'CHT::D CHT::query(D)' cannot be overloaded with 'CHT::D CHT::query(D)' 43 | D query(D x){ | ^~~~~ a.cc:36:11: note: previous declaration 'CHT::D CHT::query(D)' 36 | D query(D x){ //x:単調減少の時,これを繰り返し呼ぶ(間にaddが挟まるのはOK) | ^~~~~
s477602228
p03851
C++
#include <algorithm> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define FORE(i,a,b) for(int i=(a);i<=(b);++i) #define REPE(i,n) FORE(i,0,n) typedef long long ll; const int MAXN=300000; typedef struct L { ll a,b; L() {} L(ll a,ll b):a(a),b(b) {} } L; typedef struct Hull { L l[MAXN]; int nl; void clear() { nl=0; } bool ok(const L &p,const L &q,const L &r) { return (q.b-p.b)*(p.a-r.a)>(r.b-p.b)*(p.a-q.a); } ll get(const L &p,int x) { return p.a*x+p.b; } void add(int idx,ll sum,ll have) { L cur(-idx,(ll)idx*(idx-3)/2+sum+have); while(nl>=2&&!ok(l[nl-2],l[nl-1],cur)) --nl; l[nl++]=cur; } ll query(int idx,ll sum) { while(nl>=2&&get(l[nl-2],idx)>=get(l[nl-1],idx)) --nl; ll ret=get(l[nl-1],idx)+(ll)(idx+1)*(idx+2)/2-sum; return ret; } } Hull; Hull h; int n,nq; int cost[MAXN]; ll pcost[MAXN],scost[MAXN]; ll mxlft[MAXN]; ll mxrgt[MAXN]; ll mxwth[MAXN]; ll tmp[MAXN]; void dconq(int l,int r) { int m=l+(r-l)/2; h.clear(); FORE(i,l,m) h.add(i,pcost[i],mxlft[i]); FORE(i,m,r) tmp[i]=h.query(i,pcost[i]+cost[i])+mxrgt[i]; for(int i=r-1;i>=m;--i) tmp[i]=max(tmp[i+1],tmp[i]); FORE(i,m,r) mxwth[i]=max(mxwth[i],tmp[i]); h.clear(); for(int i=r;i>=m;--i) h.add(n-i-1,scost[i],mxrgt[i]); for(int i=m-1;i>=l;--i) tmp[i]=h.query(n-i-1,scost[i]+cost[i])+mxlft[i]; FOR(i,l+1,m) tmp[i]=max(tmp[i-1],tmp[i]); FOR(i,l,m) mxwth[i]=max(mxwth[i],tmp[i]); if(l<=m-1) dconq(l,m-1); if(m+1<=r) dconq(m+1,r); } void precalc() { pcost[0]=0; REP(i,n-1) pcost[i+1]=pcost[i]+cost[i]; scost[n-1]=0; for(int i=n-1;i>=1;--i) scost[i-1]=scost[i]+cost[i]; h.clear(); mxlft[0]=0; REP(i,n-1) { h.add(i,pcost[i],mxlft[i]); mxlft[i+1]=max(mxlft[i],h.query(i,pcost[i]+cost[i])); } h.clear(); mxrgt[n-1]=0; for(int i=n-1;i>=1;--i) { h.add(n-i-1,scost[i],mxrgt[i]); mxrgt[i-1]=max(mxrgt[i],h.query(n-i-1,scost[i]+cost[i])); } REP(i,n) mxwth[i]=LLONG_MIN; dconq(0,n-1); } void run() { scanf("%d",&n); REP(i,n) scanf("%d",&cost[i]); precalc(); scanf("%d",&nq); REP(i,nq) { int idx,ncost; scanf("%d%d",&idx,&ncost); --idx; ll res=max(mxlft[idx]+mxrgt[idx],mxwth[idx]+cost[idx]-ncost); printf("%lld\n",res); } } int main() { run(); return 0; }
a.cc: In function 'void precalc()': a.cc:55:27: error: 'LLONG_MIN' was not declared in this scope 55 | REP(i,n) mxwth[i]=LLONG_MIN; | ^~~~~~~~~ a.cc:2:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 1 | #include <algorithm> +++ |+#include <climits> 2 | using namespace std; a.cc: In function 'void run()': a.cc:60:9: error: 'scanf' was not declared in this scope 60 | scanf("%d",&n); REP(i,n) scanf("%d",&cost[i]); | ^~~~~ a.cc:66:17: error: 'printf' was not declared in this scope 66 | printf("%lld\n",res); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include <algorithm> +++ |+#include <cstdio> 2 | using namespace std;
s017370638
p03852
C++
#include <iostream> int main() { std::string c, res; std::cin >> c; if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o" ) { res = "vowel"; } else { res = "consonant" } std::cout << res << std::endl; }
a.cc: In function 'int main()': a.cc:11:22: error: expected ';' before '}' token 11 | res = "consonant" | ^ | ; 12 | } | ~
s591168651
p03852
C++
#include <iostream> int main() { string c, res; std::cin >> c; if (c=="a" || c=="i" || c=="u" || c=="e" || c=="o" ) { res = "vowel"; } else { res = "consonant" } std::cout << res << std::endl; }
a.cc: In function 'int main()': a.cc:4:9: error: 'string' was not declared in this scope 4 | string c, res; | ^~~~~~ a.cc:4:9: 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:6:21: error: 'c' was not declared in this scope 6 | std::cin >> c; | ^ a.cc:9:9: error: 'res' was not declared in this scope 9 | res = "vowel"; | ^~~ a.cc:11:5: error: 'res' was not declared in this scope 11 | res = "consonant" | ^~~ a.cc:14:16: error: 'res' was not declared in this scope 14 | std::cout << res << std::endl; | ^~~
s074395373
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ | ~~^~~~~~ a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ | ~~^~~~~~ a.cc:7:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ | ~~^~~~~~ a.cc:7:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ | ~~^~~~~~ a.cc:7:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "i" || c == "u" || c == "e" || c == "o"){ | ~~^~~~~~
s140719593
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; char a['a', 'e', 'i', 'o', 'u']; for (int i = 0; i < 5; i++) { if (a[i] == c) { cout << "vowel" << "\n"; exit(0); } } cout << "consonant" << "\n"; }
a.cc: In function 'int main()': a.cc:7:15: error: expected ']' before ',' token 7 | char a['a', 'e', 'i', 'o', 'u']; | ^ | ] a.cc:7:17: error: expected unqualified-id before 'e' 7 | char a['a', 'e', 'i', 'o', 'u']; | ^~~ a.cc:9:13: error: 'a' was not declared in this scope 9 | if (a[i] == c) { | ^
s125045449
p03852
C++
#include <bits.stdc++.h> using namespace std; int main() { char c; cin >> c; char a['a', 'e', 'i', 'o', 'u']; for (int i = 0; i < 5; i++) { if (a[i] == c) { cout << "vowel" << "\n"; exit(0); } } cout << "consonant" << "\n"; }
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory 1 | #include <bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s070231425
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++){ if(S.at(i) == "a" || S.at(i) == "i" || S.at(i) == "u" || S.at(i) == "e" || S.at(i) == "o"){ cout << "vowel" << endl; }else{ cout << "consonant" << endl; } } }
a.cc: In function 'int main()': a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(S.at(i) == "a" || | ~~~~~~~~^~~~~~ a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | S.at(i) == "i" || | ~~~~~~~~^~~~~~ a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | S.at(i) == "u" || | ~~~~~~~~^~~~~~ a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | S.at(i) == "e" || | ~~~~~~~~^~~~~~ a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | S.at(i) == "o"){ | ~~~~~~~~^~~~~~
s370748324
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; for(int i=0;i<S.size();i++){ if(S.at(i) == "a" || S.at(i) == "i" || S.at(i) == "u" || S.at(i) == "e" || S.at(i) == "o"){ cout << "vowel" << endl; }else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(S.at(i) == "a" || | ~~~~~~~~^~~~~~ a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | S.at(i) == "i" || | ~~~~~~~~^~~~~~ a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | S.at(i) == "u" || | ~~~~~~~~^~~~~~ a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | S.at(i) == "e" || | ~~~~~~~~^~~~~~ a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | S.at(i) == "o"){ | ~~~~~~~~^~~~~~ a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s555635201
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { cout << "vowel" << endl; else { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else { | ^~~~ a.cc:8:65: note: to match this '{' 8 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { | ^
s474003152
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { cout << "vowel" << endl; else if { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else if { | ^~~~ a.cc:8:65: note: to match this '{' 8 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { | ^ a.cc:10:11: error: expected '(' before '{' token 10 | else if { | ^ | (
s736474734
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if ((c == 'a') || (c == 'i') || (c == 'u') || (c == 'e') || (c == 'o')) { cout << "vowel" << endl; else { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else { | ^~~~ a.cc:8:75: note: to match this '{' 8 | if ((c == 'a') || (c == 'i') || (c == 'u') || (c == 'e') || (c == 'o')) { | ^
s213316280
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { cout << "vowel" << endl; else { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected '}' before 'else' 10 | else { | ^~~~ a.cc:8:65: note: to match this '{' 8 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { | ^
s455276001
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ string C; cin >> C; if(C == 'a','b','c','d','e'){ cout << vowel << endl; } else{ cout << "consonat" << endl; } }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(C == 'a','b','c','d','e'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if(C == 'a','b','c','d','e'){ | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::__cxx11::basic_string<char>' is not derived from
s727611841
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ string c; cin >> c; if(c == 'a','b','c','d','e'){ cout << vowel << endl; } else{ cout << "consonat" << endl; } }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(c == 'a','b','c','d','e'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ 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:629: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> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::__cxx11::basic_string<char>' is not derived from
s802760997
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ string c; cin >> c; if(c == 'a','b','c','d','e'){ cout << 'vowel' << endl; } else{ cout << 'consonant' << endl; } }
a.cc:9:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 9 | cout << 'vowel' << endl; | ^~~~~~~ a.cc:12:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes 12 | cout << 'consonant' << endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(c == 'a','b','c','d','e'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if(c == 'a','b','c','d','e'){ | ^~~ 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:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_Char
s799336929
p03852
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) rep2(i, 0, n) #define rep2(i, m, n) for (ll i = m; i < (n); i++) using ll = long long; using pii = pair<int, int>; using Vi = vector<int>; int main() { char c; cin << c; if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o'){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:13:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 13 | cin << c; | ~~~ ^~ ~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:13:7: note: candidate: 'operator<<(int, int)' (built-in) 13 | cin << c; | ~~~~^~~~ a.cc:13:7: 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ 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:13:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 13 | cin << c; | ^~~ 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ 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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 13 | cin << c; | ^ /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:13:10: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 13 | cin << c; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const s
s744474179
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string c; cin >> c; if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ cout<<'vowel'<<endl; } else{ cout<<'consonant'<<endl; } }
a.cc:8:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 8 | cout<<'vowel'<<endl; | ^~~~~~~ a.cc:11:11: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes 11 | cout<<'consonant'<<endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:10: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if (c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:10: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if
s029121409
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ string c; cin >> c; if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ cout << "vowel"; }else{ cout << "consonant"; } }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:7:11: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:7:11: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 7 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47,
s291658514
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if( c == 'a'|| c == 'i' || c == 'u'|| c == 'e'|| c == 'o'){ cout << "vowel" << endl; } else if { cout << "consonant " << endl; } }
a.cc: In function 'int main()': a.cc:12:11: error: expected '(' before '{' token 12 | else if { | ^ | (
s496774219
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){ cout << "vowel" << endl; }else{ cout << "consonant" << endl; }
a.cc: In function 'int main()': a.cc:11:4: error: expected '}' at end of input 11 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s272683630
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){ cout << vowel << endl; }else{ cout << consonant << endl; }
a.cc: In function 'int main()': a.cc:8:13: error: 'vowel' was not declared in this scope 8 | cout << vowel << endl; | ^~~~~ a.cc:10:13: error: 'consonant' was not declared in this scope 10 | cout << consonant << endl; | ^~~~~~~~~ a.cc:11:4: error: expected '}' at end of input 11 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s613218776
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c >> endl; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){ cout << vowel << endl; }else{ cout << consonant << endl; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and '<unresolved overloaded function type>') 6 | cin >> c >> endl; | ~~~~~~~~~^~~~~~~ In file included 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/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>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /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>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /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>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /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>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /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>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /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>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /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>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /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>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /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>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /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 '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<cha
s937801332
p03852
C++
#include<bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) cout << ”vowel” << endl; else cout << ” consonant” <<endl; }
a.cc:6:7: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:7: error: extended character ’ is not valid in an identifier a.cc:6:17: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:17: error: extended character ’ is not valid in an identifier a.cc:6:27: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:27: error: extended character ’ is not valid in an identifier a.cc:6:37: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:37: error: extended character ’ is not valid in an identifier a.cc:6:47: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:47: error: extended character ’ is not valid in an identifier a.cc:7:9: error: extended character ” is not valid in an identifier 7 | cout << ”vowel” << endl; | ^ a.cc:7:9: error: extended character ” is not valid in an identifier a.cc:9:9: error: extended character ” is not valid in an identifier 9 | cout << ” consonant” <<endl; | ^ a.cc:9:11: error: extended character ” is not valid in an identifier 9 | cout << ” consonant” <<endl; | ^ a.cc: In function 'int main()': a.cc:6:7: error: '\U00002019a\U00002019' was not declared in this scope 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^~~ a.cc:6:17: error: '\U00002019i\U00002019' was not declared in this scope 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^~~ a.cc:6:27: error: '\U00002019u\U00002019' was not declared in this scope 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^~~ a.cc:6:37: error: '\U00002019e\U00002019' was not declared in this scope 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^~~ a.cc:6:47: error: '\U00002019o\U00002019' was not declared in this scope 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^~~ a.cc:7:9: error: '\U0000201dvowel\U0000201d' was not declared in this scope 7 | cout << ”vowel” << endl; | ^~~~~~~ a.cc:9:9: error: '\U0000201d' was not declared in this scope 9 | cout << ” consonant” <<endl; | ^
s858443992
p03852
C++
#include<bits/stdc++.h> using namespace std; int main(){ char c; cin >> c if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) cout << ”vowel” << endl; else cout << ” consonant” <<endl; }
a.cc:6:7: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:7: error: extended character ’ is not valid in an identifier a.cc:6:17: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:17: error: extended character ’ is not valid in an identifier a.cc:6:27: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:27: error: extended character ’ is not valid in an identifier a.cc:6:37: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:37: error: extended character ’ is not valid in an identifier a.cc:6:47: error: extended character ’ is not valid in an identifier 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ^ a.cc:6:47: error: extended character ’ is not valid in an identifier a.cc:7:9: error: extended character ” is not valid in an identifier 7 | cout << ”vowel” << endl; | ^ a.cc:7:9: error: extended character ” is not valid in an identifier a.cc:9:9: error: extended character ” is not valid in an identifier 9 | cout << ” consonant” <<endl; | ^ a.cc:9:11: error: extended character ” is not valid in an identifier 9 | cout << ” consonant” <<endl; | ^ a.cc: In function 'int main()': a.cc:5:9: error: expected ';' before 'if' 5 | cin >> c | ^ | ; 6 | if(c==’a’ || c==’i’ || c==’u’ || c==’e’ || c==’o’) | ~~ a.cc:8:1: error: 'else' without a previous 'if' 8 | else | ^~~~ a.cc:9:9: error: '\U0000201d' was not declared in this scope 9 | cout << ” consonant” <<endl; | ^
s107289420
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s >> endl; if ( s == a || i || e || u || o){ cout >> "vowel" >> endl; } else { cout >> "consonant" >> endl }
a.cc: In function 'int main()': a.cc:5:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and '<unresolved overloaded function type>') 5 | cin >> s >> endl; | ~~~~~~~~~^~~~~~~ In file included 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/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>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /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>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /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>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /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>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /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>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /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>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /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>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /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>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /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>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /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 '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<cha
s802383958
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { cout << vowel << endl; } else { cout << consonant << endl; } }
a.cc: In function 'int main()': a.cc:9:17: error: 'vowel' was not declared in this scope 9 | cout << vowel << endl; | ^~~~~ a.cc:11:17: error: 'consonant' was not declared in this scope 11 | cout << consonant << endl; | ^~~~~~~~~
s388887252
p03852
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i= 0; i < (n); i++) using ll= long long int; using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } ll mod= 1e9 + 7; int main() { char c; cin >> c; if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){cout << "vowel" << endl;}else{cout << consonaut << endl;} }
a.cc: In function 'int main()': a.cc:14:92: error: 'consonaut' was not declared in this scope 14 | if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o'){cout << "vowel" << endl;}else{cout << consonaut << endl;} | ^~~~~~~~~
s745654350
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; bool s=false; vector<char> vec{'a','i','u','e','o'}; for (int i=0;i<5;i++){ if(c==vec.at(i)){ s=true; break; } } while(s){ cout << "vowel" <<endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:18:3: error: 'else' without a previous 'if' 18 | else{ | ^~~~
s486627612
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; bool s=false; vector<char> vec{"a","i","u","e","o"}; for (int i=0;i<5;i++){ if(c==vec.at(i)){ s=true; break; } } while(s){ cout << "vowel" <<endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:8:39: error: no matching function for call to 'std::vector<char>::vector(<brace-enclosed initializer list>)' 8 | vector<char> vec{"a","i","u","e","o"}; | ^ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>]' (near match) 678 | vector(initializer_list<value_type> __l, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:678:7: note: conversion of argument 1 would be ill-formed: a.cc:8:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:24: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:32: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:36: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = char; _Alloc = std::allocator<char>]' 707 | vector(_InputIterator __first, _InputIterator __last, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>; std::__type_identity_t<_Alloc> = std::allocator<char>]' 659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>; std::false_type = std::false_type]' 640 | vector(vector&& __rv, const allocator_type& __m, false_type) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>; std::true_type = std::true_type]' 635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>; std::__type_identity_t<_Alloc> = std::allocator<char>]' 624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]' 620 | vector(vector&&) noexcept = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]' 601 | vector(const vector& __x) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int; value_type = char; allocator_type = std::allocator<char>]' 569 | vector(size_type __n, const value_type& __value, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int; allocator_type = std::allocator<char>]' 556 | vector(size_type __n, const allocator_type& __a = allocator_type()) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>]' 542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = char; _Alloc = std::allocator<char>]' 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 5 provided a.cc:18:3: error: 'else' without a previous 'if' 18 | else{ | ^~~~
s784437128
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; bool s=false; vector<char> vec{"a","i","u","e","o"}; for (int i=0;i<5;i++){ if(c==vec[i]){ s=true; break; } } while(s){ cout << "vowel" <<endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:8:39: error: no matching function for call to 'std::vector<char>::vector(<brace-enclosed initializer list>)' 8 | vector<char> vec{"a","i","u","e","o"}; | ^ In file included from /usr/include/c++/14/vector:66, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53, from a.cc:1: /usr/include/c++/14/bits/stl_vector.h:678:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>]' (near match) 678 | vector(initializer_list<value_type> __l, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:678:7: note: conversion of argument 1 would be ill-formed: a.cc:8:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:24: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:28: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:32: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* a.cc:8:36: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 8 | vector<char> vec{"a","i","u","e","o"}; | ^~~ | | | const char* /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate: 'template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with <template-parameter-2-2> = _InputIterator; _Tp = char; _Alloc = std::allocator<char>]' 707 | vector(_InputIterator __first, _InputIterator __last, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:707:9: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, std::__type_identity_t<_Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>; std::__type_identity_t<_Alloc> = std::allocator<char>]' 659 | vector(vector&& __rv, const __type_identity_t<allocator_type>& __m) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:659:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::false_type) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>; std::false_type = std::false_type]' 640 | vector(vector&& __rv, const allocator_type& __m, false_type) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:640:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&, const allocator_type&, std::true_type) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>; std::true_type = std::true_type]' 635 | vector(vector&& __rv, const allocator_type& __m, true_type) noexcept | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:635:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&, std::__type_identity_t<_Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>; std::__type_identity_t<_Alloc> = std::allocator<char>]' 624 | vector(const vector& __x, const __type_identity_t<allocator_type>& __a) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:624:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = char; _Alloc = std::allocator<char>]' 620 | vector(vector&&) noexcept = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:620:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = char; _Alloc = std::allocator<char>]' 601 | vector(const vector& __x) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:601:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int; value_type = char; allocator_type = std::allocator<char>]' 569 | vector(size_type __n, const value_type& __value, | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate expects 3 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int; allocator_type = std::allocator<char>]' 556 | vector(size_type __n, const allocator_type& __a = allocator_type()) | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate expects 2 arguments, 5 provided /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = char; _Alloc = std::allocator<char>; allocator_type = std::allocator<char>]' 542 | vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:542:7: note: candidate expects 1 argument, 5 provided /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector() [with _Tp = char; _Alloc = std::allocator<char>]' 531 | vector() = default; | ^~~~~~ /usr/include/c++/14/bits/stl_vector.h:531:7: note: candidate expects 0 arguments, 5 provided a.cc:18:3: error: 'else' without a previous 'if' 18 | else{ | ^~~~
s508706426
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c == 'e' || c == 'o' || c == 'u') cout << vowel << endl; else cout << consonant << endl; }
a.cc: In function 'int main()': a.cc:8:13: error: 'vowel' was not declared in this scope 8 | cout << vowel << endl; | ^~~~~ a.cc:10:13: error: 'consonant' was not declared in this scope 10 | cout << consonant << endl; | ^~~~~~~~~
s557077464
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str = "aeiou"; cin >> char c; for(int i = 0; i < 5; i++){ if (char c == str.at(i)){ cout << "vowel"<< endl; } else{ cout << "consonant"<< endl; } } }
a.cc: In function 'int main()': a.cc:6:10: error: expected primary-expression before 'char' 6 | cin >> char c; | ^~~~ a.cc:8:14: error: expected initializer before '==' token 8 | if (char c == str.at(i)){ | ^~ a.cc:8:13: error: expected ')' before '==' token 8 | if (char c == str.at(i)){ | ~ ^~~ | )
s963614966
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str = "aeiou"; cin >> char c; for(int i = 0; i < 6; i++){ if (char c == str.at(i)){ cout << "vowel"<< endl; } else{ cout << "consonant"<< endl; } } }
a.cc: In function 'int main()': a.cc:6:10: error: expected primary-expression before 'char' 6 | cin >> char c; | ^~~~ a.cc:8:14: error: expected initializer before '==' token 8 | if (char c == str.at(i)){ | ^~ a.cc:8:13: error: expected ')' before '==' token 8 | if (char c == str.at(i)){ | ~ ^~~ | )
s847156728
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str = "aeiou"; cin >> char 'c'; for(int i = 0; i < 6; i++){ if (c == str.at(i)){ cout << "vowel"<< endl; } else{ cout << "consonant"<< endl; } } }
a.cc: In function 'int main()': a.cc:6:10: error: expected primary-expression before 'char' 6 | cin >> char 'c'; | ^~~~ a.cc:8:7: error: 'c' was not declared in this scope 8 | if (c == str.at(i)){ | ^
s523025655
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str = 'aeiou'; cin >> char c; for(int i = 0; i < 6; i++){ if (c == str.at(i)){ cout << 'vowel'<< endl; } else{ cout << 'consonant'<< endl; } } }
a.cc:5:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 5 | string str = 'aeiou'; | ^~~~~~~ a.cc:9:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 9 | cout << 'vowel'<< endl; | ^~~~~~~ a.cc:12:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes 12 | cout << 'consonant'<< endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:5:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested 5 | string str = 'aeiou'; | ^~~~~~~ a.cc:6:10: error: expected primary-expression before 'char' 6 | cin >> char c; | ^~~~ a.cc:8:7: error: 'c' was not declared in this scope 8 | if (c == str.at(i)){ | ^
s973996783
p03852
C++
#include <bits/stddc++.h> using namespace std; int main(){ char c; cin >> c; if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc:1:10: fatal error: bits/stddc++.h: No such file or directory 1 | #include <bits/stddc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s012883161
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if(c == 'a' || c == 'i' || c=='u'|| c=='e'||c==='o'){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:8:50: error: expected primary-expression before '=' token 8 | if(c == 'a' || c == 'i' || c=='u'|| c=='e'||c==='o'){ | ^
s325651066
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if (c== "a"){ cout << "vowel" << endl; } else if (c== "i"){ cout << "vowel" << endl; } else if (c== "u"){ cout << "vowel" << endl; } else if (c== "e"){ cout << "vowel" << endl; } else if (c== "o"){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c== "a"){ | ~^~~~~~ a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if (c== "i"){ | ~^~~~~~ a.cc:13:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if (c== "u"){ | ~^~~~~~ a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 16 | else if (c== "e"){ | ~^~~~~~ a.cc:19:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | else if (c== "o"){ | ~^~~~~~
s875532985
p03852
C++
#include <bits/stdc++.h> using namespace std; int main(){ char c; cin >> c; if (c=="a"){ cout << "vowel" << endl; } else if (c=="i"){ cout << "vowel" << endl; } else if (c=="u"){ cout << "vowel" << endl; } else if (c=="e"){ cout << "vowel" << endl; } else if (c=="o"){ cout << "vowel" << endl; } else{ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c=="a"){ | ~^~~~~ a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | else if (c=="i"){ | ~^~~~~ a.cc:13:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | else if (c=="u"){ | ~^~~~~ a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 16 | else if (c=="e"){ | ~^~~~~ a.cc:19:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | else if (c=="o"){ | ~^~~~~
s446897075
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin>>c; if(c==a || c==i || c==u || c==e || c==o){ cout<<"vowel"<<'\n'; }else{ cout<<"consonant"<<'\n'; } return(0); }
a.cc: In function 'int main()': a.cc:6:9: error: 'a' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:17: error: 'i' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:25: error: 'u' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:33: error: 'e' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:41: error: 'o' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^
s260780754
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin>>c; if(c==a || c==i || c==u || c==e || c==o){ cout<<vowel<<'\n'; }else{ cout<<consonant<<'\n'; } return(0); }
a.cc: In function 'int main()': a.cc:6:9: error: 'a' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:17: error: 'i' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:25: error: 'u' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:33: error: 'e' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:41: error: 'o' was not declared in this scope 6 | if(c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:7:11: error: 'vowel' was not declared in this scope 7 | cout<<vowel<<'\n'; | ^~~~~ a.cc:9:11: error: 'consonant' was not declared in this scope 9 | cout<<consonant<<'\n'; | ^~~~~~~~~
s010093335
p03852
C++
#include<bits/stdc++.h> using namespace std; int main(){ string c; cin>>c; if( c==a || c==i || c==u || c==e || c==o){ cout<<vowel<<'\n'; }else{ cout<<consonant<<'\n'; } return(0); }
a.cc: In function 'int main()': a.cc:6:12: error: 'a' was not declared in this scope 6 | if( c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:20: error: 'i' was not declared in this scope 6 | if( c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:28: error: 'u' was not declared in this scope 6 | if( c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:36: error: 'e' was not declared in this scope 6 | if( c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:6:44: error: 'o' was not declared in this scope 6 | if( c==a || c==i || c==u || c==e || c==o){ | ^ a.cc:7:15: error: 'vowel' was not declared in this scope 7 | cout<<vowel<<'\n'; | ^~~~~ a.cc:9:15: error: 'consonant' was not declared in this scope 9 | cout<<consonant<<'\n'; | ^~~~~~~~~
s640912866
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string c; cin >> c; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') { cout << "vowel" << endl; } else { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:9:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:9:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'char' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:9:14: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>' 9 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') |
s938658262
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string C; cin >> C; string answer; for (int i = 0; i < C.size(); i++) { if (C.at(i) == 'a') { answer = "vowel"; break; } else if (C.at(i) == 'e') { answer = "vowel"; break; } else if (C.at(i) == 'i') { answer = "vowel"; break; } else if (C.at(i) == 'o') { answer = "vowel"; break; } else if (C.at(i) == 'u') { answer = "vowel"; break; } else { answer = "consonant"; } i++; } cout << answer << endl; } }
a.cc:41:1: error: expected declaration before '}' token 41 | } | ^
s236309966
p03852
C++
include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; if (a == "a" || a == "i" || a == "u" || a == "e" || a == "o") { cout << "vowel" << endl; } else cout << "consonant" << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/char_traits.h:50: /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared 2086 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope 2087 | struct remove_extent<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid 2087 | struct remove_extent<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared 2099 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope 2100 | struct remove_all_extents<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid 2100 | struct remove_all_extents<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared 2171 | template<std::size_t _Len> | ^~~ /usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope 2176 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared 2194 | template<std::size_t _Len, std::size_t _Align = | ^~~ /usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^~~~ /usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid 2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)> | ^ /usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope 2202 | unsigned char __data[_Len]; | ^~~~ /usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope 2203 | struct __attribute__((__aligned__((_Align)))) { } __align; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:144:61: error: 'std::size_t' has not been declared 144 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:146:40: error: 'size_t' in namespace 'std' does not name a type 146 | static _GLIBCXX14_CONSTEXPR std::size_t | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:150:34: error: 'std::size_t' has not been declared 150 | find(const char_type* __s, std::size_t __n, const char_type& __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:153:52: error: 'std::size_t' has not been declared 153 | move(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:156:52: error: 'std::size_t' has not been declared 156 | copy(char_type* __s1, const char_type* __s2, std::size_t __n); | ^~~ /usr/include/c++/14/bits/char_traits.h:159:30: error: 'std::size_t' has not been declared 159 | assign(char_type* __s, std::size_t __n, char_type __a); | ^~~ /usr/include/c++/14/bits/char_traits.h:187:59: error: 'std::size_t' has not been declared 187 | compare(const char_type* __s1, const char_type* __s2, std::size_t __n) | ^~~ /usr/include/c++/14/bits/char_traits.h: In static member function 'static constexpr int __gnu_cxx::char_traits<_CharT>::compare(const char_type*, const char_type*, int)': /usr/include/c++/14/bits/char_traits.h:189:17: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/bits/char_traits.h:189:33: error: '__i' was not declared in this scope; did you mean '__n'? 189 | for (std::size_t __i = 0; __i < __n; ++__i) | ^~~ | __n /usr/include/c++/14/bits/char_traits.h: At global scope: /usr/include/c++/14/bits/char_traits.h:198:31: error: 'size_t' in namespace 'std' does not name a type 198 | _GLIBCXX14_CONSTEXPR std::size_t |
s061901423
p03852
C++
include "pch.h" #include <iostream> #include <string> using namespace std; int main() { string a; cin >> a; if (a == "a" || a == "i" || a == "u" || a == "e" || a == "o") { cout << "vowel" << endl; } else cout << "consonant" << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include "pch.h" | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NO
s354426076
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (s=="a"||s=="i"||s=="u"||s=="e"||s=="o"){cout << "vowel" << endl;} else {cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:9:5: error: 's' was not declared in this scope 9 | if (s=="a"||s=="i"||s=="u"||s=="e"||s=="o"){cout << "vowel" << endl;} | ^
s806860531
p03852
C++
#include <bits/stdc++.h> using namespace std; #define ll long long signed main() { char c; cin >> c; if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") {cout << "vowel" << endl;} else{cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") | ~^~~~~ a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") | ~^~~~~ a.cc:9:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") | ~^~~~~ a.cc:9:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") | ~^~~~~ a.cc:9:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(c=="a"||c=="i"||c=="u"||c=="e"||c=="o") | ~^~~~~
s926446387
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char S[] = ['a','i','u','e','o']; char c; int x=0; cin >> c; for(int i = 0; i < 5; i++){ if(c == S[i]){ x++ } } if(x == 0){ cout << "consonant" << endl; } else{ cout << "vowel" << endl; } }
a.cc: In function 'int main()': a.cc:5:15: error: expected identifier before 'a' 5 | char S[] = ['a','i','u','e','o']; | ^~~ a.cc:5:18: error: expected ']' before ',' token 5 | char S[] = ['a','i','u','e','o']; | ^ | ] a.cc: In lambda function: a.cc:5:18: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:5:14: error: initializer fails to determine size of 'S' 5 | char S[] = ['a','i','u','e','o']; | ^~~~ a.cc:5:14: error: array must be initialized with a brace-enclosed initializer a.cc:5:19: error: expected unqualified-id before 'i' 5 | char S[] = ['a','i','u','e','o']; | ^~~ a.cc:11:10: error: expected ';' before '}' token 11 | x++ | ^ | ; 12 | } | ~
s284809925
p03852
C++
#include <iostream> using namespace std; int main(void){ // Your code here! char a; cin>>a; if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ cout<<"vowel"<<endl; } else{ cout<<"consonant"<<endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: 'c' was not declared in this scope 7 | if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^
s714336572
p03852
C
#include<stdio.h> int main() { char ch; scanf ("%c", &ch); if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u' || ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U') { printf("vowel", ch); } else { printf("consonant", ch); } return; }
main.c: In function 'main': main.c:14:1: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 14 | return; | ^~~~~~ main.c:2:5: note: declared here 2 | int main() | ^~~~
s827479826
p03852
C
#include<stdio.h> int main() { char c; scanf ("%c", &ch); if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || c=='A' || c=='E' || c=='I' || c=='O' || c=='U') { printf("vowel", c); } else { printf("consonant", c); } return 0; }
main.c: In function 'main': main.c:9:17: error: 'ch' undeclared (first use in this function); did you mean 'c'? 9 | scanf ("%c", &ch); | ^~ | c main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
s138158078
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){ cout << "vowel" << endl; } else if(){ cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:12:11: error: expected primary-expression before ')' token 12 | else if(){ | ^
s483256912
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; int >> c; if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'){ cout << 'vowel' << endl; } else if{ cout << 'consonant' << endl; } }
a.cc:9:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 9 | cout << 'vowel' << endl; | ^~~~~~~ a.cc:13:13: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes 13 | cout << 'consonant' << endl; | ^~~~~~~~~~~ a.cc: In function 'int main()': a.cc:6:7: error: expected unqualified-id before '>>' token 6 | int >> c; | ^~ a.cc:12:10: error: expected '(' before '{' token 12 | else if{ | ^ | (
s718910240
p03852
C++
#include<bits/stdc++.h> using namespace std; int main(){ char s; cin >> s; bool Is = false; string str1="aiueo"; for (int a=0; a<5; a++){ if (str1.at(a) == s){ cout << "vowel" << endl; Is = true; break; } } if (Is == false){ cout << "constant" << endl; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s245158264
p03852
C++
#include<bits/stdc++.h> using namespace std; int main(){ char s; cin >> s; bool Is = false; for (int a=0; a<5; a++){ if ("aiueo".at(a) == s){ cout << "vowel" << endl; Is = ture; break; } } if (Is == false){ cout << "constant" << endl; }
a.cc: In function 'int main()': a.cc:9:17: error: request for member 'at' in '"aiueo"', which is of non-class type 'const char [6]' 9 | if ("aiueo".at(a) == s){ | ^~ a.cc:11:12: error: 'ture' was not declared in this scope 11 | Is = ture; | ^~~~ a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s452356214
p03852
C++
#include<bits/stdc++.h> using namespace std; int main{ char s; cin >> s; bool Is = false; for (int a=0; a<5; a++){ if ("aiueo".at(a) == s){ cout << "vowel" << endl; Is = ture; break; } } if (Is == false){ cout << "constant" << endl; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main{ | ^~~~ a.cc:5:3: error: expected primary-expression before 'char' 5 | char s; | ^~~~ a.cc:5:3: error: expected '}' before 'char' a.cc:4:9: note: to match this '{' 4 | int main{ | ^ a.cc:6:3: error: 'cin' does not name a type 6 | cin >> s; | ^~~ a.cc:8:3: error: expected unqualified-id before 'for' 8 | for (int a=0; a<5; a++){ | ^~~ a.cc:8:17: error: 'a' does not name a type 8 | for (int a=0; a<5; a++){ | ^ a.cc:8:22: error: 'a' does not name a type 8 | for (int a=0; a<5; a++){ | ^ a.cc:15:3: error: expected unqualified-id before 'if' 15 | if (Is == false){ | ^~
s608165568
p03852
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ bool isVowel=false; char c; cin>>c; if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'){ isVowel=true; } if(isVowel){ cout<"vowel"<<endl; }else{ cout<<"consonant"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:16:17: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<' 16 | cout<"vowel"<<endl; | ~~~~~~~^~~~~~
s646982674
p03852
C
#include<stdio.h> int main(){ char c; scanf("%c\n",&c) if(c=='a' ||c=='e' ||c=='i' ||c=='o' ||c=='u'){ printf("vowel\n");} else printf("consonant\n"); return 0; }
main.c: In function 'main': main.c:4:19: error: expected ';' before 'if' 4 | scanf("%c\n",&c) | ^ | ; 5 | if(c=='a' ||c=='e' ||c=='i' ||c=='o' ||c=='u'){ | ~~
s244468060
p03852
C++
#include<bits/stdc++.h> using namespace std; char c; void imput() { cin >> c; } void judge(char c) { if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') cout<<"vowel\n"; else cout<<"consonant\n"; return; } int main{ imput(); judge(c); return 0; }
a.cc:12:5: error: cannot declare '::main' to be a global variable 12 | int main{ | ^~~~ a.cc:13:10: error: expected '}' before ';' token 13 | imput(); | ^ a.cc:12:9: note: to match this '{' 12 | int main{ | ^ a.cc:13:8: error: void value not ignored as it ought to be 13 | imput(); | ~~~~~^~ a.cc:14:8: error: expected constructor, destructor, or type conversion before '(' token 14 | judge(c); | ^ a.cc:15:3: error: expected unqualified-id before 'return' 15 | return 0; | ^~~~~~ a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s129465022
p03852
C++
include<bits/stdc++.h> using namespace std; char c; void imput() { cin >> c; } void judge(char c) { if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') cout<<"vowel\n"; else cout<<"consonant\n"; return; } int main{ imput(); judge(c); return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'void imput()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> c; | ^~~ a.cc: In function 'void judge(char)': a.cc:8:46: error: 'cout' was not declared in this scope 8 | if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') cout<<"vowel\n"; | ^~~~ a.cc:9:8: error: 'cout' was not declared in this scope 9 | else cout<<"consonant\n"; | ^~~~ a.cc: At global scope: a.cc:12:5: error: cannot declare '::main' to be a global variable 12 | int main{ | ^~~~ a.cc:13:10: error: expected '}' before ';' token 13 | imput(); | ^ a.cc:12:9: note: to match this '{' 12 | int main{ | ^ a.cc:13:8: error: void value not ignored as it ought to be 13 | imput(); | ~~~~~^~ a.cc:14:8: error: expected constructor, destructor, or type conversion before '(' token 14 | judge(c); | ^ a.cc:15:3: error: expected unqualified-id before 'return' 15 | return 0; | ^~~~~~ a.cc:16:1: error: expected declaration before '}' token 16 | } | ^
s100211129
p03852
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main(){ int a,b,i,j; cin>>a>>b; vector <char>c; for(i=0;i<a;i++){ string s; cin>>s; for(j=0;j<b;j++) c[i][j]=s[j]; } for(i=0;i<a;i++) for(j=0;j<b;j++){ cout<<c[i][j]; } cout<<endl;
a.cc: In function 'int main()': a.cc:13:19: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript 13 | c[i][j]=s[j]; | ^ a.cc:17:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript 17 | cout<<c[i][j]; | ^ a.cc:19:22: error: expected '}' at end of input 19 | cout<<endl; | ^ a.cc:5:19: note: to match this '{' 5 | int main(){ | ^
s952834910
p03852
C++
#include<iostream> #include<vector> #include<string> int main(){ int a,b,i; cin>>a>>b; vector <char>c; for(i=0;i<a;i++){ string s; cin>>s; for(j=0;j<b;j++0) c[i][j]=s[j]; } for(i=0;i<a;i++) for(j=0;j<b;j++){ cout<<c[i][j]; } cout<<endl; for(j=0;j<b;j++){ cout<<c[i][j]; } cout<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>a>>b; | ^~~ | 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:7: error: 'vector' was not declared in this scope 7 | vector <char>c; | ^~~~~~ a.cc:7:7: note: suggested alternatives: In file included from /usr/include/c++/14/vector:66, from a.cc:2: /usr/include/c++/14/bits/stl_vector.h:428:11: note: 'std::vector' 428 | class vector : protected _Vector_base<_Tp, _Alloc> | ^~~~~~ /usr/include/c++/14/vector:93:13: note: 'std::pmr::vector' 93 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>; | ^~~~~~ a.cc:7:15: error: expected primary-expression before 'char' 7 | vector <char>c; | ^~~~ a.cc:9:9: error: 'string' was not declared in this scope 9 | string s; | ^~~~~~ a.cc:9:9: 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: /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:10:14: error: 's' was not declared in this scope 10 | cin>>s; | ^ a.cc:11:13: error: 'j' was not declared in this scope 11 | for(j=0;j<b;j++0) | ^ a.cc:11:24: error: expected ')' before numeric constant 11 | for(j=0;j<b;j++0) | ~ ^ | ) a.cc:11:25: error: expected ';' before ')' token 11 | for(j=0;j<b;j++0) | ^ | ; a.cc:15:13: error: 'j' was not declared in this scope 15 | for(j=0;j<b;j++){ | ^ a.cc:16:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 16 | cout<<c[i][j]; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:16:17: error: 'c' was not declared in this scope 16 | cout<<c[i][j]; | ^ a.cc:18:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout<<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:18:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:19:11: error: 'j' was not declared in this scope 19 | for(j=0;j<b;j++){ | ^ a.cc:20:17: error: 'c' was not declared in this scope 20 | cout<<c[i][j]; | ^ a.cc: At global scope: a.cc:24:5: error: expected unqualified-id before 'return' 24 | return 0; | ^~~~~~ a.cc:25:5: error: expected declaration before '}' token 25 | } | ^
s062354318
p03852
C++
#include <iostream> #include <string> #include<vector> using namespace std; int main() { int a,b,i; cin>>a>>b; vector <string> c; for(i=0;i<a;i++) cin>>c; for(i=0;i<a;i++) cout<<c<<endl<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:20: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin>>c; | ~~~^~~ | | | | | std::vector<std::__cxx11::basic_string<char> > | 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>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /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>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /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>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /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>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /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>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /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>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /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>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /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>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /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>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /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 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb);
s295725819
p03852
C++
#include <iostream> #include <string> using namespace std; int main() { int a,b,i; cin>>a>>b; vector <string> c; for(i=0;i<a;i++) cin>>c; for(i=0;i<a;i++) cout<<c<<endl<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:11: error: 'vector' was not declared in this scope 10 | vector <string> c; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include <iostream> +++ |+#include <vector> 3 | #include <string> a.cc:10:25: error: expected primary-expression before '>' token 10 | vector <string> c; | ^ a.cc:10:27: error: 'c' was not declared in this scope 10 | vector <string> c; | ^
s751490963
p03852
C++
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { int a,b,i; cin>>a>>b; vector <string> c; for(i=0;i<a;i++) cin>>c; for(i=0;i<a;i++) cout<<c<<endl<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<std::__cxx11::basic_string<char> >') 13 | cin>>c; | ~~~^~~ | | | | | std::vector<std::__cxx11::basic_string<char> > | std::istream {aka std::basic_istream<char>} In file included 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/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>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /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>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /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>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /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>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /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>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /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>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /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>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /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>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /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>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' 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 'std::vector<std::__cxx11::basic_string<char> >' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /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 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _C
s571070033
p03852
C++
#include <bits/stdc++.h> #include <iostream> #include <string> using namespace std; int main() { int a,b,i; cin>>a>>b; vector <char> c; for(i=0;i<a;i++) cin>>c; for(i=0;i<a;i++) cout<<c<<endl<<c<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<char>') 13 | cin>>c; | ~~~^~~ | | | | | std::vector<char> | std::istream {aka std::basic_istream<char>} In file included 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/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>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /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>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /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>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<char>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /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>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<char>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /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>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /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>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<char>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /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>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<char>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /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>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /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>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<char>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /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 'std::vector<char>' 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 'std::vector<char>' 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 'std::vector<char>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /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>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<char>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /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 'std::vector<char>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<char>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41: /usr/includ
s077817083
p03852
C++
#include<iostream> #include<string> using namespace std; int main() { int a,b,i; cin>>a>>b; for(i=0;i<a;i++) string c[i]; for(i=0;i<a;i++){ cin<<c[i]<<\n<<c[i]<<endl; } return 0; }
a.cc:12:28: error: stray '\' in program 12 | cin<<c[i]<<\n<<c[i]<<endl; | ^ a.cc: In function 'int main()': a.cc:12:22: error: 'c' was not declared in this scope 12 | cin<<c[i]<<\n<<c[i]<<endl; | ^ a.cc:12:29: error: 'n' was not declared in this scope 12 | cin<<c[i]<<\n<<c[i]<<endl; | ^
s976682391
p03852
C++
#include <iostream> using namespace std; int main(){ char c; cin>>c; if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel"<<endl; else cout<<"consonant"<<endl; return 0; } include <iostream> using namespace std; int main(){ char c; cin>>c; if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel"<<endl; else cout<<"consonant"<<endl; return 0; }
a.cc:15:1: error: 'include' does not name a type 15 | include <iostream> | ^~~~~~~ a.cc:18:5: error: redefinition of 'int main()' 18 | int main(){ | ^~~~ a.cc:4:9: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s642770259
p03852
C++
include <iostream> using namespace std; int main(){ char c; cin>>c; if(c=='a'||c=='i'||c=='u'||c=='e'||c=='o') cout<<"vowel"<<endl; else cout<<"consonant"<<endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:3: error: 'cin' was not declared in this scope 7 | cin>>c; | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope 9 | cout<<"vowel"<<endl; | ^~~~ a.cc:9:20: error: 'endl' was not declared in this scope 9 | cout<<"vowel"<<endl; | ^~~~ a.cc:11:5: error: 'cout' was not declared in this scope 11 | cout<<"consonant"<<endl; | ^~~~ a.cc:11:24: error: 'endl' was not declared in this scope 11 | cout<<"consonant"<<endl; | ^~~~
s819990801
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { cout << "vowel" << endl; } else { cout << "consonant" << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { | ~~^~~~~~ a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { | ~~^~~~~~ a.cc:7:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { | ~~^~~~~~ a.cc:7:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { | ~~^~~~~~ a.cc:7:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" || c == "e" || c == "i" || c == "o" || c == "u") { | ~~^~~~~~
s010957539
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { cout << "vowel" << endl; } else { cout << "consonant" << endl; }
a.cc: In function 'int main()': a.cc:7:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { | ~~^~~~~~ a.cc:7:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { | ~~^~~~~~ a.cc:7:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { | ~~^~~~~~ a.cc:7:42: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { | ~~^~~~~~ a.cc:7:53: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if (c == "a" | c == "e" | c == "i" | c == "o" | c == "u") { | ~~^~~~~~ a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s021980503
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string st; cin >> st; string tg = "aeuio"; bool t = false; for (int i=0; i < 5;i++){ if (tg.at(i) == st){ t=true; break} } if (t){cout << "vowel" << endl;} else{cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:10:16: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | if (tg.at(i) == st){ | ~~~~~~~~ ^~ ~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == st){ | ^~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::valu
s612359248
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; string tg = "aeuio"; bool t = false; for (int i=0; i < 5;i++){ if (tg.at(i) == str){ t=true; break} } if (t){cout << "vowel" << endl;} else{cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:10:16: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | if (tg.at(i) == str){ | ~~~~~~~~ ^~ ~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std
s215660656
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; string tg = "aeuio"; bool t = false; for (int i=0; i < 5;i++){ if (tg.at(i) == str){ t=true; break} } if (t){cout << "vowel" << endl;} else{cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:10:16: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | if (tg.at(i) == str){ | ~~~~~~~~ ^~ ~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:10:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i) == str){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:19: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std
s871193912
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; string tg = "aeuio"; bool t = false; for (int i=0; i < tg.size();i++){ if (tg.at(i)==str){ t=true; break} } if (t){cout << "vowel" << endl;} else{cout << "consonant" << endl;} }
a.cc: In function 'int main()': a.cc:10:15: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 10 | if (tg.at(i)==str){ | ~~~~~~~~^~~~~ | | | | | std::string {aka std::__cxx11::basic_string<char>} | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char} 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1199: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>&)' 1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1274: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>&)' 1274 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1441 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed: a.cc:10:17: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>' 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1613 | operator==(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)' 2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ 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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if (tg.at(i)==str){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:10:17: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} 10 | if
s806843088
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'i' || c =='u' || c =='e' || c = 'o') cout << "vowel" << endl; else cout << "consonant" << endl; }
a.cc: In function 'int main()': a.cc:7:50: error: lvalue required as left operand of assignment 7 | if (c == 'a' || c == 'i' || c =='u' || c =='e' || c = 'o') | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
s123324425
p03852
C++
#include<iostream> using namespace std; int main() { char letter; cin>>letter; if(letter=='a'||letter=='i'||letter=='u'||letter=='e'||letter=='o'){ cout<<"vowel"<<endl; } else{ cout<<"consonant"<<endl } }
a.cc: In function 'int main()': a.cc:11:28: error: expected ';' before '}' token 11 | cout<<"consonant"<<endl | ^ | ; 12 | } | ~
s969468284
p03852
C++
#include<iostream> using namespace std; int main() { char letter; cin>>c; if(letter=='a'||letter=='i'||letter=='u'||letter=='e'||letter=='o'){ cout<<"vowel"<<endl; } else{ cout<<"consonant"<<endl } }
a.cc: In function 'int main()': a.cc:6:8: error: 'c' was not declared in this scope 6 | cin>>c; | ^ a.cc:11:28: error: expected ';' before '}' token 11 | cout<<"consonant"<<endl | ^ | ; 12 | } | ~
s843655887
p03852
C++
#include<iostream> using namespace std; int main() { char letter; cin>>c; if(letter=='a'||letter=='i'||letter='u'||letter='e'||letter='o'){ cout<<"vowel"<<endl; } else{ cout<<"consonant"<<endl } }
a.cc: In function 'int main()': a.cc:6:8: error: 'c' was not declared in this scope 6 | cin>>c; | ^ a.cc:7:54: error: lvalue required as left operand of assignment 7 | if(letter=='a'||letter=='i'||letter='u'||letter='e'||letter='o'){ | ~~~^~~~~~~~ a.cc:11:28: error: expected ';' before '}' token 11 | cout<<"consonant"<<endl | ^ | ; 12 | } | ~
s023186074
p03852
C++
#include<iostrema> using namespace std; int main(){ char c; cin>>c; if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') { cout<<"vowel"; } else{ cout<<"consonant"; } }
a.cc:1:9: fatal error: iostrema: No such file or directory 1 | #include<iostrema> | ^~~~~~~~~~ compilation terminated.
s824993677
p03852
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { char C; cin >> C; if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ cout << "vowel" <<endl; }else{ cout << "consonant" <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'c' was not declared in this scope 8 | if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ | ^
s859507736
p03852
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e3+5,M=2e4+5,inf=0x3f3f3f3f,mod=1e9+7; #define mst(a,b) memset(a,b,sizeof a) #define lx x<<1 #define rx x<<1|1 #define reg register #define PII pair<int,int> #define fi first #define se second #define pb push_back #define il inline char s[5]="aeiou"; int main(){ char c;cin>>c; int f=0; for(int i=0;i<5;i++) if(c==s[i]) f=1; puts(f?"vowel":"consonant"); return 0; }
a.cc:14:11: error: initializer-string for 'char [5]' is too long [-fpermissive] 14 | char s[5]="aeiou"; | ^~~~~~~
s648876201
p03852
C++
#include <bits/stdc++.h> using namespace std; int main() { char x; cin >> x; if (x=='a' || x=='e' || x=='i' || x=='o' || x=='u') cout << vowel << endl; else cout << consonant << endl; }
a.cc: In function 'int main()': a.cc:9:13: error: 'vowel' was not declared in this scope 9 | cout << vowel << endl; | ^~~~~ a.cc:11:13: error: 'consonant' was not declared in this scope 11 | cout << consonant << endl; | ^~~~~~~~~
s784648596
p03852
C++
#include <bits/stdc++.h> uisng namespace std; int main() { char c; cin >> c; if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') { cout << "vowel" << endl; } else { cout << "consonant" << endl; } }
a.cc:2:1: error: 'uisng' does not name a type 2 | uisng namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> c; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, 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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | cout << "vowel" << 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:9:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | cout << "vowel" << endl; | ^~~~ | std::endl 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:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << "consonant" << 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:12:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout << "consonant" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s431969547
p03852
C++
#include<iostream> using namespace std; int main () { char x; cin >> x; string x = "aeiou"; if ( x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u'){ cout << "vowel\n"; } else { cout << "consonant\n"; } }
a.cc: In function 'int main()': a.cc:7:10: error: conflicting declaration 'std::string x' 7 | string x = "aeiou"; | ^ a.cc:5:8: note: previous declaration as 'char x' 5 | char x; | ^
s278289281
p03852
C++
#include<iostream> using namespace std; int main () { char x; cin >> x; string n = "aeiou"; for (int i = 0; i < x.length() - 1; i ++){ if (x == n[i]){ cout << "vowel\n"; } else { cout << "consonant\n"; } } }
a.cc: In function 'int main()': a.cc:8:25: error: request for member 'length' in 'x', which is of non-class type 'char' 8 | for (int i = 0; i < x.length() - 1; i ++){ | ^~~~~~
s300929050
p03852
C++
#include<iostream> using namespace std; int main(){ char c; cin>>c; if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ cout<<"vowel"; } else{ cout<<"consonant"; } }
a.cc: In function 'int main()': a.cc:7:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ | ~^~~~~ a.cc:7:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ | ~^~~~~ a.cc:7:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ | ~^~~~~ a.cc:7:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ | ~^~~~~ a.cc:7:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(c=="a"||c=="e"||c=="i"||c=="o"||c=="u"){ | ~^~~~~
s607442209
p03852
C++
#include<iostream> using namespace std; int main(){ char c; cin >> c; string s = "aeiou"; if(s.find()>=0){ cout << "vowel\n"; }else{ cout << "consonant\n"; } }
a.cc: In function 'int main()': a.cc:8:14: error: no matching function for call to 'std::__cxx11::basic_string<char>::find()' 8 | if(s.find()>=0){ | ~~~~~~^~ In file included 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/bits/basic_string.h:2720:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_CharT>::other>::size_type> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(const _Tp&, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' 2720 | find(const _Tp& __svt, size_type __pos = 0) const | ^~~~ /usr/include/c++/14/bits/basic_string.h:2720:9: note: candidate expects 1 argument, 0 provided /usr/include/c++/14/bits/basic_string.h:2691:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(const _CharT*, size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2691 | find(const _CharT* __s, size_type __pos, size_type __n) const | ^~~~ /usr/include/c++/14/bits/basic_string.h:2691:7: note: candidate expects 3 arguments, 0 provided /usr/include/c++/14/bits/basic_string.h:2706:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2706 | find(const basic_string& __str, size_type __pos = 0) const | ^~~~ /usr/include/c++/14/bits/basic_string.h:2706:7: note: candidate expects 2 arguments, 0 provided /usr/include/c++/14/bits/basic_string.h:2740:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(const _CharT*, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2740 | find(const _CharT* __s, size_type __pos = 0) const _GLIBCXX_NOEXCEPT | ^~~~ /usr/include/c++/14/bits/basic_string.h:2740:7: note: candidate expects 2 arguments, 0 provided /usr/include/c++/14/bits/basic_string.h:2758:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::find(_CharT, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' 2758 | find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; | ^~~~ /usr/include/c++/14/bits/basic_string.h:2758:7: note: candidate expects 2 arguments, 0 provided