submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s694638477 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;
const ll mod=1e9+7;
const ll inf=1e16;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()
void solve(){
ll a,b;
cin >>a >> b;
a+=b;
cout << (a>=10?"error":a) << endl;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
solve();
}
| a.cc: In function 'void solve()':
a.cc:35:17: error: operands to '?:' have different types 'const char*' and 'll' {aka 'long long int'}
35 | cout << (a>=10?"error":a) << endl;
| ~~~~~^~~~~~~~~~
|
s360085581 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int func(int A){
int A,B;
cin >> A >> B;
if(A+B>=10){
cout << "error" << endl;
}
else{
cout << A+B << endl;
}
} | a.cc: In function 'int func(int)':
a.cc:5:7: error: declaration of 'int A' shadows a parameter
5 | int A,B;
| ^
a.cc:4:14: note: 'int A' previously declared here
4 | int func(int A){
| ~~~~^
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
13 | }
| ^
|
s112003341 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define pii pair<int, int>
void solve(int TC) {
int a, b; cin >> a >> b;
cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
}
signed main() {
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
cout << fixed << setprecision(12);
int T = 1;
//cin >> T;
for(int i=1; i<=T; i++) {
solve(i);
}
return 0;
} | a.cc: In function 'void solve(long long int)':
a.cc:11:21: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'int')
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ~~~~~~~~~~~~~~~ ^~ ~~
| | |
| | int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:11:21: note: candidate: 'operator>=(int, int)' (built-in)
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ~~~~~~~~~~~~~~~~^~~~~
a.cc:11:21: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<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:1165:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1165 | operator>=(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1165:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1248: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>&)'
1248 | operator>=(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1248:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1341: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>&)'
1341 | operator>=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1341:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1415:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1415 | operator>=(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1415:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1509:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1509 | operator>=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1509:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1586:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1586 | operator>=(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1586:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/regex.h:1686:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>=(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1686 | operator>=(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1686:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
476 | operator>=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
520 | operator>=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1724 | operator>=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1781 | operator>=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
739 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << endl;
| ^~
/usr/include/c++/14/string_view:746: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> >)'
746 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed:
a.cc:11:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout << (a + b) >= 10 ? ("error") : (a + b) << |
s479670622 | p03697 | C++ | #include<bits/stdc++.h>
#define ll long long
#define dl long double
#define pb push_back
#define F first
#define S second
#define endl "\n"
#define rep(i,a,b) for(i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define mod 1000000007LL
#define CIN(V,s,n) for(int i=s;i<n;i++){cin >> V[i];}
#define COUT(V,s,n) {for(int i=s;i<n;i++){cout << V[i] << " " ;} cout << endl;}
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define CLEAR(V); for(ll i=0;i<V.size();i++) V[i] = 0;
#define N 101LL
#define tmod 998244353LL
using namespace std;
bool sBs(const pair<int,int> &a,const pair<int,int> &b)
{ return (a.second < b.second); }
ll Powb(ll b,ll n,ll m);
ll BS(vector<pair< ll ,ll > > &PS,ll s,ll e,ll ser);
ll MI(ll a, ll m);
ll P[N+1];
void Sieve(int n=N);
void AA(flag)
{
if(flag) cout << "YES";
}
int main()
{
fast;
ll q=1,t;
//cin >> q; t = q;
while(q--)
{
ll i,j,n,m,k,l=0,r=0,a=1,b=0,c=0,d=0,e,g=1,p,u,v,w,x,y,flag=1;
//n=m=k=i=j=l=r=a=b=c=d=u=v=w=p=x=y=0;
cin >> a >> b;
if(a+b >= 10) cout << "error";
else cout << (a+b);
}
return 0;
}
//*****************************************************************************************************************************************
ll Powb(ll b,ll n,ll m)
{
if(n==0) return 1LL;
if(n==1) return b;
ll temp = Powb(b,n/2,m);
if(n%2==0){return (temp*temp)%m;}
else{return (b*((temp*temp)%m))%m;}
}
ll BS(vector<pair<ll,ll> > &PS,ll s,ll e,ll ser)
{
if(s>e)
return s;
ll mid = (s+e)/2;
if(PS[mid].F==ser)
{
return mid;
}
else if(PS[mid].F > ser)
{
return BS(PS,s,mid-1,ser);
}
else
return BS(PS,mid+1,e,ser);
}
ll MI(ll a, ll m)
{
ll m0 = m;
ll y = 0, x = 1;
if (m == 1)
return 0;
while (a > 1)
{
ll q = a / m;
ll t = m;
m = a % m, a = t;
t = y;
y = x - q * y;
x = t;
}
if (x < 0)
x += m0;
return x;
}
void Sieve(int n)
{
//memset(P,true,sizeof(P));
//P[0] = false;
//P[1]= false;
for(int i=1;i<=n;i++) P[i] = i;
for(ll i=2;i*i<=n;i++)
{
if(P[i]==i)
{
for(ll j=i*i;j<=n;j+=i)
{
if(P[j]==j)
P[j]=i;
}
}
}
}
| a.cc:29:6: error: variable or field 'AA' declared void
29 | void AA(flag)
| ^~
a.cc:29:9: error: 'flag' was not declared in this scope
29 | void AA(flag)
| ^~~~
|
s253190956 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
//定数
const long long MOD1=1000000007;
const long long MOD2=998244353;
const long long INF=1152921504606846976;
const long double PI=3.1415926535897932;
//型名省略
#define ll long long
#define ull unsigned long long
#define ld long double
#define pll pair<long long,long long>
#define vl vector<long long>
#define vvl vector<vector<long long>>
#define vc vector<char>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define umap unordered_map
#define uset unordered_set
#define Lqueue priority_queue<long long>
#define Squeue priority_queue<long long,vector<long long>,greater<long long>>
#define Fi first
#define Se second
//マクロ
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define rbf(a,x) for(auto& a:x)
#define rep(i,n) for(long long i=0;i<(long long)(n);i++)
#define rep2(i,s,n) for(long long i=(s);i<(long long)(n);i++)
#define Maxe(x) *max_element((x).begin(),(x).end())
#define Mine(x) *min_element((x).begin(),(x).end())
#define Size(x) ((long long)(x).size())
//最大公約数
long long gcd(long long a,long long b){return b?gcd(b,a%b):a;}
//最小公倍数
long long lcm(long long a,long long b){return a/gcd(a,b)*b;}
//累乗
template<typename Num>
constexpr Num mypow(Num a,ll b){
if(b==0)return 1;
if(a==0)return 0;
Num x=1;
while(b>0){
if(b&1)x*=a;
a*=a;
b>>=1;
}
return x;
}
//chmin,chmax
template<class T>
inline bool chmin(T& a,T b){
if(a>b){
a=b;
return true;
}
return false;
}
template<class T>
inline bool chmax(T& a,T b){
if(a<b){
a=b;
return true;
}
return false;
}
//MODint
template<int MOD> struct Fp {
long long val;
constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
if (val < 0) val += MOD;
}
constexpr int getmod() { return MOD; }
constexpr Fp operator - () const noexcept {
return val ? MOD - val : 0;
}
constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
constexpr Fp& operator += (const Fp& r) noexcept {
val += r.val;
if (val >= MOD) val -= MOD;
return *this;
}
constexpr Fp& operator -= (const Fp& r) noexcept {
val -= r.val;
if (val < 0) val += MOD;
return *this;
}
constexpr Fp& operator *= (const Fp& r) noexcept {
val = val * r.val % MOD;
return *this;
}
constexpr Fp& operator /= (const Fp& r) noexcept {
long long a = r.val, b = MOD, u = 1, v = 0;
while (b) {
long long t = a / b;
a -= t * b; swap(a, b);
u -= t * v; swap(u, v);
}
val = val * u % MOD;
if (val < 0) val += MOD;
return *this;
}
constexpr bool operator == (const Fp& r) const noexcept {
return this->val == r.val;
}
constexpr bool operator != (const Fp& r) const noexcept {
return this->val != r.val;
}
friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
return os << x.val;
}
friend constexpr istream& operator >> (istream &is, Fp<MOD>& x){
long long t;
is >> t;
x=t;
return (is);
}
friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
if (n == 0) return 1;
auto t = modpow(a, n / 2);
t = t * t;
if (n & 1) t = t * a;
return t;
}
};
using mint = Fp<MOD1>;
//start
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll a,b;
cin>>a>>b;
cout<<(a+b>=10? "error": a+b)<<endl;
} | a.cc: In function 'int main()':
a.cc:151:23: error: operands to '?:' have different types 'const char*' and 'long long int'
151 | cout<<(a+b>=10? "error": a+b)<<endl;
| ~~~~~~~^~~~~~~~~~~~~~
|
s455920366 | p03697 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
int A,B;
cin>>A>>B;
if(A+B<10) cout<<A+B;
else cout<<"error";
cout<<S;
return 0;} | a.cc: In function 'int main()':
a.cc:52:9: error: 'S' was not declared in this scope
52 | cout<<S;
| ^
|
s404905031 | p03697 | C++ | #include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
cout << (n+m>9 ? "error" : n+m);
} | a.cc: In function 'int main()':
a.cc:10:18: error: operands to '?:' have different types 'const char*' and 'int'
10 | cout << (n+m>9 ? "error" : n+m);
| ~~~~~~^~~~~~~~~~~~~~~
|
s653529705 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0)
#define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i];
#define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i];
#define mina(a,b) a=min(a,b);
LL INF = 1e9 + 1;
LL MOD = 1e9+7;
LL a,b,c,d,e,n,m,l,r,ans=1000;
string s,S,t;
int main() {
ios_base::sync_with_stdio(false);
cin >>s;
REP(i,s.size()){
REP(j,s.size()){
(i!=j){
if(s[i]==s[j]){
cout << "no"<<endl;
return 0;
}
}
}
}
cout << "yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:22:17: error: expected ';' before '{' token
22 | (i!=j){
| ^
| ;
|
s935913820 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0)
#define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i];
#define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i];
#define mina(a,b) a=min(a,b);
LL INF = 1e9 + 1;
LL MOD = 1e9+7;
LL a,b,c,d,e,n,m,l,r,ans=1000;
string s,S,t;
int main() {
ios_base::sync_with_stdio(false);
cin >>s;
REP(i,s.size){
REP(j,s.size()){
if(i!=j){
if(s[i]==s[j]){
cout << "no"<<endl;
return 0;
}
}
}
}
cout << "yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:20:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
20 | REP(i,s.size){
| ^
a.cc:4:43: note: in definition of macro 'REP'
4 | #define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
| ^
|
s124945762 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int k=n.size();
vector<char> vec(k+1);
for(int i=0;i<k;i++)
vec[i+1]=n[i];
bool A=true;
int s=1;
count++;
while(s <= k){
for(int i=0;i<k;i++){
if(vec[s] == n[i] &&count >2){
count++;}
else if(vec[s] == n[i] && count >=2){
A=false;
break;
}
else continue;
}
s++;
}
if(A)cout << "yes" <<endl;
else cout << "no" <<endl;
}
| a.cc: In function 'int main()':
a.cc:13:8: error: no post-increment operator for type
13 | count++;
| ^~
a.cc:16:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
16 | if(vec[s] == n[i] &&count >2){
| ~~~~~~^~
a.cc:17:12: error: no post-increment operator for type
17 | count++;}
| ^~
a.cc:18:37: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>='
18 | else if(vec[s] == n[i] && count >=2){
| ~~~~~~^~~
|
s094277007 | p03697 | C++ | #include <bits/stdc++h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a+b<=9){
cout << a+b << endl;
}
else{
cout << "error" << endl;
}
} | a.cc:1:10: fatal error: bits/stdc++h: No such file or directory
1 | #include <bits/stdc++h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s331549802 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define MOD 1000000007ULL;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
ll N,M;
cin>>N>>M;
if(N+M>=10) cout<<"error"<<endl;
else cout<<A+B<<endl;
} | a.cc: In function 'int main()':
a.cc:16:20: error: 'A' was not declared in this scope
16 | else cout<<A+B<<endl;
| ^
a.cc:16:22: error: 'B' was not declared in this scope
16 | else cout<<A+B<<endl;
| ^
|
s995310015 | p03697 | C | #include<stdio.h>
int main()
{
int a,b;
scnaf("%d %d",&a,&b);
if(a+b>=10)printf("error");
else printf("%d",a+b);
return 0;
}
| main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
7 | scnaf("%d %d",&a,&b);
| ^~~~~
| scanf
|
s931097165 | p03697 | C | #include <stdio.h>
int A, B;
int main() {
scanf("%d %d",&A,&B);
int c= A+B;
if(A+B<10);
printf("%d",c);
else
printf("error");
return 0;
} | main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s844854541 | p03697 | C | #include <stdio.h>
int A, B;
int main() {
scanf("%d %d",&A,&B);
int c= A+B;
if(A+B<10);
printf("%d,c");
else
printf("error");
return 0;
} | main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s209084539 | p03697 | C | #include <stdio.h>
int A, B;
int main() {
scanf("%d %d",&A,&B);
int c= A+B;
if(A+B>=10);
printf("error");
else
printf("%d,c");
return 0;
} | main.c: In function 'main':
main.c:9:4: error: 'else' without a previous 'if'
9 | else
| ^~~~
|
s953557487 | p03697 | C++ | main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(a,b){scanf("%d%d",&a,&b);a+b>9?puts("error"):printf("%d",a+b);}
| ^
|
s484198979 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if (a+b < 10){
cout < a+b < endl;
}
else{
cout < "error" <endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:10: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout < a+b < endl;
| ~~~~ ^ ~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:10: note: candidate: 'operator<(int, int)' (built-in)
8 | cout < a+b < endl;
| ~~~~~^~~~~
a.cc:8:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<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:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | cout < a+b < endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | cout < a+b < endl;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout < a+b < endl;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cout < a+b < endl;
| ^
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:8:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_ |
s807061244 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i=0;i<(n);i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
int main() {
int a,b;
cin >> a >> b;
oif(a+b>=10)cout << "error" << endl;
else cout << a+b << endl;
} | a.cc: In function 'int main()':
a.cc:11:5: error: 'oif' was not declared in this scope
11 | oif(a+b>=10)cout << "error" << endl;
| ^~~
a.cc:12:5: error: 'else' without a previous 'if'
12 | else cout << a+b << endl;
| ^~~~
|
s075079883 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
long long MOD = 1000000000 + 7;
long long MAX = 1000000000000000000;
int main(){
cout << setprecision(10);
int A,B;
cin >> A >> B;
cout << (A+B >= 10 ? "error" : A+B) << endl;
}
| a.cc: In function 'int main()':
a.cc:14:22: error: operands to '?:' have different types 'const char*' and 'int'
14 | cout << (A+B >= 10 ? "error" : A+B) << endl;
| ~~~~~~~~~~^~~~~~~~~~~~~~~
|
s542119722 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int a,b;cin>>a>>b;
if(a+b>=10) cout << "error" << endl;
else cout << A+B << endl;
}
| a.cc: In function 'int main()':
a.cc:9:16: error: 'A' was not declared in this scope
9 | else cout << A+B << endl;
| ^
a.cc:9:18: error: 'B' was not declared in this scope
9 | else cout << A+B << endl;
| ^
|
s359830814 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A. B;
cin >> A >> B;
if (A+B <= 9) {
cout << A+B << endl;
}
else {
cout << "error" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
5 | int A. B;
| ^
a.cc:6:10: error: 'A' was not declared in this scope
6 | cin >> A >> B;
| ^
a.cc:6:15: error: 'B' was not declared in this scope
6 | cin >> A >> B;
| ^
|
s330771136 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;
// 最小公倍数を求める
int euqlid (int a, int b){
int temp;
temp = a % b;
if(temp == 0)return b;
return euqlid(b,temp);
}
ll conbination(ll a,ll b){
ll u = 1;
ll d = 1;
while(b != 0){
u *= a;
d *= b;
a--;
b--;
}
return u / d;
}
int strtoint(char s){
return (int(s-'0'));
}
int fact(int n){
if(n == 1)return 1;
return n * fact(n-1);
}
int main(){
int a,b;
cin >> a >> b;
cout << (a+b <= 10?a+b:"error") << endl;
}
| a.cc: In function 'int main()':
a.cc:40:21: error: operands to '?:' have different types 'int' and 'const char*'
40 | cout << (a+b <= 10?a+b:"error") << endl;
| ~~~~~~~~~^~~~~~~~~~~~
|
s632516809 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;
// 最小公倍数を求める
int euqlid (int a, int b){
int temp;
temp = a % b;
if(temp == 0)return b;
return euqlid(b,temp);
}
ll conbination(ll a,ll b){
ll u = 1;
ll d = 1;
while(b != 0){
u *= a;
d *= b;
a--;
b--;
}
return u / d;
}
int strtoint(char s){
return (int(s-'0'));
}
int fact(int n){
if(n == 1)return 1;
return n * fact(n-1);
}
int main(){
int a,b;
cin >> a >> b;
cout << (a+b <= 10?a+b:"error") << endl;
}
| a.cc:39:14: error: extended character is not valid in an identifier
39 | cin >> a >> b;
| ^
a.cc: In function 'int main()':
a.cc:39:14: error: '\U00003000b' was not declared in this scope
39 | cin >> a >> b;
| ^~~
a.cc:40:21: error: operands to '?:' have different types 'int' and 'const char*'
40 | cout << (a+b <= 10?a+b:"error") << endl;
| ~~~~~~~~~^~~~~~~~~~~~
|
s530496934 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
template <typename T> using vec = vector<T>;
int main()
{
int a,b;
cin >> a >> b;
cout << ((a+b>=10) ? a+b : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:10:24: error: operands to '?:' have different types 'int' and 'const char*'
10 | cout << ((a+b>=10) ? a+b : "error") << endl;
| ~~~~~~~~~~^~~~~~~~~~~~~~~
|
s490776455 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int A,B;
main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
| a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
| ^~~~
a.cc: In function 'int main()':
a.cc:4:54: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
4 | main(){cin>>A>>B;string sum=to_string(A+B);puts(A+B>9?"error":sum);}
| ~~~~~^~~~~~~~~~~~
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/string_conversions.h:45,
from /usr/include/c++/14/bits/basic_string.h:4154,
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,
from a.cc:1:
/usr/include/stdio.h:714:30: note: initializing argument 1 of 'int puts(const char*)'
714 | extern int puts (const char *__s);
| ~~~~~~~~~~~~^~~
|
s284373765 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int A,B;
string sum=to_string(A+B);
main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
a.cc: In function 'int main()':
a.cc:5:44: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: couldn't deduce template parameter '_Bi_iter'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: couldn't deduce template parameter '_Bi_iter'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:5:45: note: couldn't deduce template parameter '_CharT'
5 | main(){cin>>A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~~
/usr/include/c++/14/ |
s431835491 | p03697 | C++ | #include <bits/stdc++.h>
int A,B;
string sum=to_string(A+B);
main(){
cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
| a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
3 | string sum=to_string(A+B);
| ^~~~~~
| stdin
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~
| 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:5:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cin >> A>>B;cout<<(A+B>10?"error":sum)<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:5:37: error: 'sum' was not declared in this scope
5 | cin >> A>>B;cout<<(A+B>10?"error":sum)<endl;}
| ^~~
a.cc:5:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cin >> A>>B;cout<<(A+B>10?"error":sum)<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)
| ^~~~
|
s857450667 | p03697 | C++ | #include <bits/stdc++.h>
int A,B;
string s=std::to_string(A+B);
main(){
std::cin >> A>>B;std::cout << (A+B>10 ? "error":s);}
| a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
3 | string s=std::to_string(A+B);
| ^~~~~~
| stdin
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:51: error: 's' was not declared in this scope
5 | std::cin >> A>>B;std::cout << (A+B>10 ? "error":s);}
| ^
|
s206184485 | p03697 | C++ | #include <bits/stdc++.h>
int A,B;
main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
| a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:46: error: operands to '?:' have different types 'const char*' and 'int'
3 | main(){std::cin >> A>>B;std::cout << (A+B>10 ? "error":A+B);}
| ~~~~~~~^~~~~~~~~~~~~
|
s521579216 | p03697 | C++ | #include <bits/stdc++.h>
int A,B;
main(){
std::cin >> A>>B;
std::cout << (A+B>10 ? "error":A+B);
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:5:24: error: operands to '?:' have different types 'const char*' and 'int'
5 | std::cout << (A+B>10 ? "error":A+B);
| ~~~~~~~^~~~~~~~~~~~~
|
s072407815 | p03697 | C++ | #include <bits/stdc++.h>
int A,B;
main(){
int A,B;
std::cin >> A>>B;
std::cout << (A+B>10 ? "error":A+B) << endl;
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:6:24: error: operands to '?:' have different types 'const char*' and 'int'
6 | std::cout << (A+B>10 ? "error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~~
a.cc:6:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | std::cout << (A+B>10 ? "error":A+B) << 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,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s382994593 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl;
}
| a.cc: In function 'int main()':
a.cc:5:39: error: operands to '?:' have different types 'const char*' and 'int'
5 | int A,B;cin >> A>>B;cout << (A+B>10 ? "error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~~
|
s881565775 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A>>B;
cout << (A+B>10 ? "error":A+B) << endl;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (A+B>10 ? "error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~~
|
s081695107 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A>>B;
cout << (A+B>10?"error":A+B) << endl;
}
| a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (A+B>10?"error":A+B) << endl;
| ~~~~~~^~~~~~~~~~~~
|
s876994318 | p03697 | C++ | #include <iostream>
#include <bitset>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
#include <regex>
using namespace std;
using ll = long long int;
using dd = long double;
const ll MOD = 1e9 + 7;
vector<string> dfs(string s, ll depth, vector<char> symbol)
{
vector<string> ret;
if (depth == 0)
{
ret.push_back(s);
return ret;
}
for (ll i = 0; i < symbol.size(); i++)
{
auto vec = dfs(s + symbol[i], depth - 1, symbol);
for (auto &&e : vec)
{
ret.push_back(e);
}
}
return ret;
}
ll gcd(ll a, ll b)
{
if (a % b == 0)
{
return b;
}
return gcd(b, a % b);
}
int main()
{
ll A, B;
cin >> A >> B;
if (A + B >= 10)
{
cout << "error" << endl;
return;
}
cout << A + B << endl;
} | a.cc: In function 'int main()':
a.cc:52:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
52 | return;
| ^~~~~~
|
s174341724 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (a + b < 10) cout << a + b << endl;
else cout << "error" << endl;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'a' was not declared in this scope
8 | if (a + b < 10) cout << a + b << endl;
| ^
a.cc:8:11: error: 'b' was not declared in this scope
8 | if (a + b < 10) cout << a + b << endl;
| ^
|
s637176202 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int A,B;
cin >>A>>B;
if(A+B>=10) cout <<"error" <<endl;
elsecout <<A+B << endl;
}
| a.cc: In function 'int main()':
a.cc:19:5: error: 'elsecout' was not declared in this scope
19 | elsecout <<A+B << endl;
| ^~~~~~~~
|
s889896196 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
long a,b;
cin >> a >> b;
cout << ((a + b > 9)? "error" : ltoa(a + b)) << endl;
} | a.cc: In function 'int main()':
a.cc:10:41: error: 'ltoa' was not declared in this scope
10 | cout << ((a + b > 9)? "error" : ltoa(a + b)) << endl;
| ^~~~
|
s721036410 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i, z, n) for(int i = z; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
//const int INF = 1<<29;
//const int MODINF = 1000000007;
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if (A + B >= 10) cout << "error" << endl;
else cout << A + B << endl;
}#include <bits/stdc++.h>
#define rep(i, z, n) for(int i = z; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
//const int INF = 1<<29;
//const int MODINF = 1000000007;
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if (A + B >= 10) cout << "error" << endl;
else cout << A + B << endl;
} | a.cc:14:2: error: stray '#' in program
14 | }#include <bits/stdc++.h>
| ^
a.cc:14:3: error: 'include' does not name a type
14 | }#include <bits/stdc++.h>
| ^~~~~~~
a.cc:22:5: error: redefinition of 'int main()'
22 | int main(){
| ^~~~
a.cc:9:5: note: 'int main()' previously defined here
9 | int main(){
| ^~~~
|
s732116878 | p03697 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a + b >= 10){
System.out.println("error");
} else {
System.out.println(a + b);
}
} | Main.java:13: error: reached end of file while parsing
}
^
1 error
|
s701234610 | p03697 | C++ | #include <iostream>
#include <numeric>
#include <iomanip>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int A, B;
cin >> A >> B;
if (A + B > 9) {
cout << "error" << endl;
}
else
cout << A + B << endl;
}
} | a.cc:37:1: error: expected declaration before '}' token
37 | }
| ^
|
s517474946 | p03697 | C++ | #include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
string alphabet = "abcdefghijklmnopqrstuvwxyz";
string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
int a , b;
cin >> a >> b;
int k = a + b;
if(k < 10)cout << k << endl;
else << "error" << endl;
}
| a.cc: In function 'int main()':
a.cc:13:8: error: expected primary-expression before '<<' token
13 | else << "error" << endl;
| ^~
|
s636857640 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (ll i=0; i<(n); i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
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; }
int main(){
int A,B; cin >> A >> B;
if (A+B>=10) cout << "error" << endl;
else cout << A+B << endl;
retrun 0;
} | a.cc: In function 'int main()':
a.cc:15:5: error: 'retrun' was not declared in this scope
15 | retrun 0;
| ^~~~~~
|
s996223308 | p03697 | C++ | #include <cstdio>
int a,b;
scanf("%d %d",&a,&b);
if(a+b >= 10)
{
printf("error");
}
else
{
printf("%d",a+b);
} | a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token
5 | scanf("%d %d",&a,&b);
| ^
a.cc:7:1: error: expected unqualified-id before 'if'
7 | if(a+b >= 10)
| ^~
a.cc:11:1: error: expected unqualified-id before 'else'
11 | else
| ^~~~
|
s756490721 | p03697 | C++ | #include <cstdio>
int a,b;
scanf("%d %d",&a,&b);
if(a+b == 10)
{
printf("error");
}
else
{
printf("%d+%d",a,b);
} | a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token
5 | scanf("%d %d",&a,&b);
| ^
a.cc:7:1: error: expected unqualified-id before 'if'
7 | if(a+b == 10)
| ^~
a.cc:11:1: error: expected unqualified-id before 'else'
11 | else
| ^~~~
|
s523889089 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
cout << (A + B >= 10 ? "error" : A + B) << endl;
} | a.cc: In function 'int main()':
a.cc:7:24: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (A + B >= 10 ? "error" : A + B) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s752142023 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if ( a + b < 10 ){
cout << a + b << endl:
}else{
cout << "error" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:26: error: expected ';' before ':' token
10 | cout << a + b << endl:
| ^
| ;
|
s046337032 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A+B>=10)
{
cout<<"error"<<endl:
}
else{
cout<<A+B<<endl;
}
} | a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ':' token
8 | cout<<"error"<<endl:
| ^
| ;
|
s633731119 | p03697 | C++ | a,b=map(int,input().split())
ans=a+b if a+b<10 else "error"
print(ans) | a.cc:1:1: error: 'a' does not name a type
1 | a,b=map(int,input().split())
| ^
|
s111386174 | p03697 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
int a, b;
cin >> a >> b;
cout << ((a + b < 10) ? a + b : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:12:27: error: operands to '?:' have different types 'int' and 'const char*'
12 | cout << ((a + b < 10) ? a + b : "error") << endl;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s612459957 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << (a+b >= 10 ? "error" : a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:7:24: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (a+b >= 10 ? "error" : a+b) << endl;
| ~~~~~~~~~~^~~~~~~~~~~~~~~
|
s131927605 | p03697 | C++ | #include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define IO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout)
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count());
int a, b;
int main(){
//IO("input.txt", "output.txt");
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> a >> b;
cout << ((a + b >= 10) ? "error\n" : a + b);
return 0;
} | a.cc: In function 'int main()':
a.cc:18:32: error: operands to '?:' have different types 'const char*' and 'int'
18 | cout << ((a + b >= 10) ? "error\n" : a + b);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
|
s017049037 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a+b>=10){
cout << "error" << endl;
}else{
cout << a+b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s606893417 | p03697 | C++ | // Copyright 2020 yaito3014
#include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(nullptr); ios::sync_with_stdio(false);
int A, B;
cin >> A >> B;
cout << (A + B >= 10 ? "error" : A + B) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:24: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << (A + B >= 10 ? "error" : A + B) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s992871598 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main(){
int a,b;
cin>>a>>b;
if(a+b>=10)cout<"error";
else cout<<a+b;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:20: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
8 | if(a+b>=10)cout<"error";
| ~~~~^~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<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:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [6]'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [6]'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:8:21: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*'
8 | if(a+b>=10)cout<"error";
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template ar |
s683622029 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
string s; cin >> s;
int n = s.size();
bool flag = false
for(int i = 0; i < n; i++){
for(int j = i+1; j < n; j++){
if(s[i]==s[j]){
flag = true;
break;
}
}
if(flag){
break;
}
}
if(flag){
cout << "no" << endl;
}else{
cout << "yes" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'for'
8 | for(int i = 0; i < n; i++){
| ^~~
a.cc:8:20: error: 'i' was not declared in this scope
8 | for(int i = 0; i < n; i++){
| ^
|
s583313532 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
sum = A + B;
if (sum >= 10) {
cout << "error" << endl;
} else {
cout << sum << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:3: error: 'sum' was not declared in this scope
7 | sum = A + B;
| ^~~
|
s059932370 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int grouping(int n) {
int A, B;
cin >> A >> B;
sum = A + B;
if (sum >= 10) {
cout << "error" << endl;
} else {
cout << sum << endl;
}
} | a.cc: In function 'int grouping(int)':
a.cc:7:3: error: 'sum' was not declared in this scope
7 | sum = A + B;
| ^~~
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
13 | }
| ^
|
s269290130 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int a,b;cin>>a>>b;
cout << (a+b>9) ? "error" : a+b;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (a+b>9) ? "error" : a+b;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
|
s727582230 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define endl '\n'
#define ll long long
#define ld long double
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<long long, long long>
#define mod (ll) (1e9 + 7)
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define all(v) v.begin(), v.end()
#define dvec(v) for(auto i: v) cout<< i<< " "; cout<< '\n';
#define gcd(a,b) __gcd(a, b)
#define lcm(a,b) ((a)*((b)/gcd(a,b)))
#define darr(a,n) for(int i=0; i<n;i++) cout<< a[i]<< " "; cout<< '\n';
#define what_is(x) cerr<< #x<< " : "<< x<< '\n';
int32_t main() {
fast;
int a, b;
cin >> a >> b;
cout << (a + b > 9 ? "error" : a + b) << endl;
return 0;
}
| a.cc: In function 'int32_t main()':
a.cc:26:28: error: operands to '?:' have different types 'const char*' and 'int'
26 | cout << (a + b > 9 ? "error" : a + b) << endl;
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s982375723 | p03697 | C++ | using namespace std;
int main(){
int a,b;
cin>>a>>b;
int c=a+b;
if(c>=10){
cout<<"error";
}else{
cout<<c;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
4 | cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:5: error: 'cout' was not declared in this scope
7 | cout<<"error";
| ^~~~
a.cc:7:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:5: error: 'cout' was not declared in this scope
9 | cout<<c;
| ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s341877784 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,;
cin>> a >> b;
if(a+b<10) cout << a+b << endl;
else cout << "error" << endl;
} | a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before ';' token
5 | int a,b,;
| ^
|
s655108106 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<((a+b<10)?a+b:"error")<<endl;}
| a.cc: In function 'int main()':
a.cc:6:18: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<((a+b<10)?a+b:"error")<<endl;}
| ~~~~~~~~^~~~~~~~~~~~
|
s942944270 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b<10?a+b:"error")<<endl;} | a.cc: In function 'int main()':
a.cc:6:16: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b<10?a+b:"error")<<endl;}
| ~~~~~~^~~~~~~~~~~~
|
s613666607 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
using ll = long long;
int main() {
int a,b; cin >> a >> b;
int sum = a+b;
cout << ((sum>=10) ? "error" : sum) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:22: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << ((sum>=10) ? "error" : sum) << endl;
| ~~~~~~~~~~^~~~~~~~~~~~~~~
|
s459007425 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define debug(var) cerr << #var << " = " << var << endl;
#else
#define debug(var)
#endif
void init() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
}
void solve() {
int a, b; cin >> a >> b;
if (a+b >= 10) cout << "error"
else cout << a+b;
}
int main() {
init();
int t = 1; //scanf("%d", &t);
while (t--) {
solve();
}
return 0;
}
| a.cc: In function 'void solve()':
a.cc:17:39: error: expected ';' before 'else'
17 | if (a+b >= 10) cout << "error"
| ^
| ;
18 | else cout << a+b;
| ~~~~
|
s104278458 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
int main()
{
int A,B;
cin >> A>>B;
cout << (A+B>=10?"error":A+B) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:21: error: operands to '?:' have different types 'const char*' and 'int'
10 | cout << (A+B>=10?"error":A+B) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s319337332 | p03697 | C | #include <stdio.h>
int main(void){
int x,y;
scanf("%d%d",&x,&y);
x+y<10 ? printf("%d",x+y); : printf("error");
return 0;
} | main.c: In function 'main':
main.c:5:34: error: expected ':' before ';' token
5 | x+y<10 ? printf("%d",x+y); : printf("error");
| ^
| :
main.c:5:36: error: expected expression before ':' token
5 | x+y<10 ? printf("%d",x+y); : printf("error");
| ^
|
s874957418 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
cout << ((a+b<10) ? a+b:"error") << endl;
} | a.cc: In function 'int main()':
a.cc:6:21: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout << ((a+b<10) ? a+b:"error") << endl;
| ~~~~~~~~~^~~~~~~~~~~~~
|
s466285717 | p03697 | C++ | #include<cstdio>
using namespace std;
int pd(int a,int b)
{
if(a+b>=10)
return 0;
return 1;
}
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(pd(a,b))
printf("%d%d,a+b);
else
printf("%d%d",0);
return 0;
} | a.cc:14:16: warning: missing terminating " character
14 | printf("%d%d,a+b);
| ^
a.cc:14:16: error: missing terminating " character
14 | printf("%d%d,a+b);
| ^~~~~~~~~~~
a.cc: In function 'int pd(int, int)':
a.cc:6:16: error: unable to find numeric literal operator 'operator""\U0000ff1b'
6 | return 0;
| ^~~
a.cc:6:19: error: expected ';' before 'return'
6 | return 0;
| ^
| ;
7 | return 1;
| ~~~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: expected primary-expression before 'else'
15 | else
| ^~~~
|
s755093918 | p03697 | C++ | #include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;
int main(){
int a,b;cin>>a>>b;
cout<<(a+b<10 ? a+b : "error");
}
| a.cc: In function 'int main()':
a.cc:34:21: error: operands to '?:' have different types 'int' and 'const char*'
34 | cout<<(a+b<10 ? a+b : "error");
| ~~~~~~~^~~~~~~~~~~~~~~
|
s722340305 | p03697 | C++ | include <bits/stdc++.h>
using namespace std;
int main() {
int A=0, B=0;
cin >> A >> B;
int sum = A+B;
if(10<=sum) {
cout << "error" << endl;
} else {
cout << sum << endl;
}
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin >> A >> B;
| ^~~
a.cc:14:5: error: 'cout' was not declared in this scope
14 | cout << "error" << endl;
| ^~~~
a.cc:14:24: error: 'endl' was not declared in this scope
14 | cout << "error" << endl;
| ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
18 | cout << sum << endl;
| ^~~~
a.cc:18:20: error: 'endl' was not declared in this scope
18 | cout << sum << endl;
| ^~~~
|
s590473337 | p03697 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#define ALL(x) (x).begin(), (x).end()
#define sz(a) int(a.size())
#define rep(i,x,n) for(int i=x;i<n;i++)
#define repd(i,x,n) for(int i=x;i<=n;i++)
#define pii pair<int,int>
#define pll pair<long long ,long long>
#define gbtb ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MSC0(X) memset((X), '\0', sizeof((X)))
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define eps 1e-6
#define chu(x) cout<<"["<<#x<<" "<<(x)<<"]"<<endl
#define du3(a,b,c) scanf("%d %d %d",&(a),&(b),&(c))
#define du2(a,b) scanf("%d %d",&(a),&(b))
#define du1(a) scanf("%d",&(a));
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
ll powmod(ll a, ll b, ll MOD) { if (a == 0ll) {return 0ll;} a %= MOD; ll ans = 1; while (b) {if (b & 1) {ans = ans * a % MOD;} a = a * a % MOD; b >>= 1;} return ans;}
void Pv(const vector<int> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%d", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
void Pvl(const vector<ll> &V) {int Len = sz(V); for (int i = 0; i < Len; ++i) {printf("%lld", V[i] ); if (i != Len - 1) {printf(" ");} else {printf("\n");}}}
inline long long readll() {long long tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
inline int readint() {int tmp = 0, fh = 1; char c = getchar(); while (c < '0' || c > '9') {if (c == '-') fh = -1; c = getchar();} while (c >= '0' && c <= '9') tmp = tmp * 10 + c - 48, c = getchar(); return tmp * fh;}
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
/*** TEMPLATE CODE * * STARTS HERE ***/
int main()
{
//freopen("D:\\code\\text\\input.txt","r",stdin);
//freopen("D:\\code\\text\\output.txt","w",stdout);
int a, b;
a = readint();
b = readint();
if (a + b + >= 10)
{
printf("error\n");
} else
{
printf("%d\n", a + b );
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:50:17: error: expected primary-expression before '>=' token
50 | if (a + b + >= 10)
| ^~
|
s409966465 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b<=10?a+b:"error")<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:19: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<(a+b<=10?a+b:"error")<<endl;
| ~~~~~~~^~~~~~~~~~~~
|
s021631349 | p03697 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC063A
{
class Program
{
static void Main(string[] args)
{
int a, b, s;
s = 10;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
if (s > (a + b))
{
Console.WriteLine("a+b");
}
else
{
Console.WriteLine("error");
Console.ReadKey();
}
}
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:34: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:43: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:28:10: error: expected ';' after class definition
28 | }
| ^
| ;
a.cc: In static member function 'static void ABC063A::Program::Main(int*)':
a.cc:15:29: error: expected primary-expression before 'int'
15 | a = int.Parse(Console.ReadLine());
| ^~~
a.cc:16:29: error: expected primary-expression before 'int'
16 | b = int.Parse(Console.ReadLine());
| ^~~
a.cc:19:33: error: 'Console' was not declared in this scope
19 | Console.WriteLine("a+b");
| ^~~~~~~
a.cc:23:33: error: 'Console' was not declared in this scope
23 | Console.WriteLine("error");
| ^~~~~~~
|
s400219117 | p03697 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ABC063A
{
class Program
{
static void Main(string[] args)
{
int a, b, s;
s = 10;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
if (s > (a + b))
{
Console.WriteLine("a+b");
}
else
{
Console.WriteLine("error");
Console.ReadKey();
}
}
}
} | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:11:34: error: 'string' has not been declared
11 | static void Main(string[] args)
| ^~~~~~
a.cc:11:43: error: expected ',' or '...' before 'args'
11 | static void Main(string[] args)
| ^~~~
a.cc:28:10: error: expected ';' after class definition
28 | }
| ^
| ;
a.cc: In static member function 'static void ABC063A::Program::Main(int*)':
a.cc:15:29: error: expected primary-expression before 'int'
15 | a = int.Parse(Console.ReadLine());
| ^~~
a.cc:16:29: error: expected primary-expression before 'int'
16 | b = int.Parse(Console.ReadLine());
| ^~~
a.cc:19:33: error: 'Console' was not declared in this scope
19 | Console.WriteLine("a+b");
| ^~~~~~~
a.cc:23:33: error: 'Console' was not declared in this scope
23 | Console.WriteLine("error");
| ^~~~~~~
|
s322153171 | p03697 | C++ | #include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<limits>
#include<set>
#include<queue>
using namespace std;
#define int long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
typedef pair<int, int>P;
const int INF = 1e15;
signed main() {
int A, B;
cin >> A >> B;
if (A + B >= 10)cout << "error";
else cout << A + B;
| a.cc: In function 'int main()':
a.cc:24:28: error: expected '}' at end of input
24 | else cout << A + B;
| ^
a.cc:20:15: note: to match this '{'
20 | signed main() {
| ^
|
s931219488 | p03697 | C++ | #include <iostream> // cout, endl, cin
#include <iomanip>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <numeric>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
const int INF = 1001001001;
int main()
{
int a. b;
cin >> a >> b;
if(a + b >= 10)
{
cout << "error" <<endl;
}
else
{
cout << a + b << endl;
}
}
| a.cc: In function 'int main()':
a.cc:29:10: error: expected initializer before '.' token
29 | int a. b;
| ^
a.cc:30:12: error: 'a' was not declared in this scope
30 | cin >> a >> b;
| ^
a.cc:30:17: error: 'b' was not declared in this scope
30 | cin >> a >> b;
| ^
|
s656987895 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int A,B; cin>>A>>B;
cout<<((A+B)<=9?(A+B):"error")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:18: error: operands to '?:' have different types 'int' and 'const char*'
6 | cout<<((A+B)<=9?(A+B):"error")<<endl;
| ~~~~~~~~^~~~~~~~~~~~~~
|
s616289373 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
cout << (A + B <= 10 ? A + B : "error") << endl;
} | a.cc: In function 'int main()':
a.cc:7:24: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (A + B <= 10 ? A + B : "error") << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s507388053 | p03697 | C | x,y=input().split()
print(int(x)+int(y))
#o mor khoda re... 50 er niche naki charachter run hoyna.. ki jana | main.c:1:1: warning: data definition has no type or storage class
1 | x,y=input().split()
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
1 | x,y=input().split()
| ^
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
1 | x,y=input().split()
| ^~~~~
main.c:1:12: error: request for member 'split' in something not a structure or union
1 | x,y=input().split()
| ^
main.c:3:1: error: expected ',' or ';' before 'print'
3 | print(int(x)+int(y))
| ^~~~~
main.c:5:2: error: invalid preprocessing directive #o
5 | #o mor khoda re... 50 er niche naki charachter run hoyna.. ki jana
| ^
|
s716856550 | p03697 | C++ | #include<bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int)n; i++)
#define REPvec(itr, mp) for(auto itr = mp.begin();itr != mp.end(); itr ++)
#define all(x) x.begin(), x.end()
#define MOD 1000000007//1e9+7
using namespace std;
typedef long long ll;
typedef vector<int > vecint;
typedef vector<string > vecstr;
int main()
{
int a, b;
cin >> a >> b;
cout << (((a + b) >= 10)?"error":a+b) << endl;
}
| a.cc: In function 'int main()':
a.cc:14:27: error: operands to '?:' have different types 'const char*' and 'int'
14 | cout << (((a + b) >= 10)?"error":a+b) << endl;
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~
|
s064773485 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << (a+b>=10?"error":a+b) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:25: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << (a+b>=10?"error":a+b) << endl;
| ~~~~~~~^~~~~~~~~~~~
|
s233498565 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << ((a+b>=10)?"error":(a+b)) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:27: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << ((a+b>=10)?"error":(a+b)) << endl;
| ~~~~~~~~~^~~~~~~~~~~~~~
|
s253295070 | p03697 | C++ | A, B = map(int, input().split())
print(A+B if A+B < 10 else 'error')
| a.cc:2:28: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | print(A+B if A+B < 10 else 'error')
| ^~~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A, B = map(int, input().split())
| ^
|
s469336023 | p03697 | C++ | #include "bits/stdc++.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define INF 1e9
using ll = std::int64_t;
template <class T>bool chmax(T &a, const T &b);
template <class T>bool chmin(T &a, const T &b);
//最大公約数
std::int64_t gcd(std::int64_t a, std::int64_t b);
std::int64_t gcd_s(std::int64_t aa, std::int64_t bb);
//ラングレス圧縮
std::vector<std::pair<char, std::int64_t>> rle(std::string str);
//素数判定
bool is_prime(std::int64_t n);
// 約数の列挙
std::vector<std::int64_t> divisor(std::int64_t n);
// 素因数分解
std::map<std::int64_t,std::int64_t> prime_factor(std::int64_t n);
//10^9 + 7
#define yojo 1000000007
#define MAX_NUM 200001
void Main()
{
int a, b;
cin >> a >> b;
std::cout << (a + b >= 10 ? "error" : a + b) << std::endl;
return;
}
int main()
{
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
Main();
return 0;
}
template <class T> bool chmax(T &a, const T &b)
{
if (a < b)
{
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b)
{
if (b < a)
{
a = b;
return true;
}
return false;
}
//最大公約数
std::int64_t gcd(std::int64_t a, std::int64_t b)
{
// a >= b && b != 0
std::int64_t c;
do
{
c = a % b;
a = b;
b = c;
} while (c);
return a;
}
//最大公約数安全版
std::int64_t gcd_s(std::int64_t aa, std::int64_t bb)
{
std::int64_t a = max(aa, bb);
std::int64_t b = min(aa, bb);
std::int64_t c;
if (b == 0)
{
return -1;
}
do
{
c = a % b;
a = b;
b = c;
} while (c);
return a;
}
//ラングレス圧縮
std::vector<std::pair<char, std::int64_t>> rle(std::string str)
{
std::vector<std::pair<char, std::int64_t>> data;
char now = str[0];
std::int64_t count = 0;
for (std::int64_t i = 0; i < str.size() + 1; i++)
{
if (i == str.size())
{
data.push_back(make_pair(str[i - 1], count));
break;
}
else if (now != str[i])
{
data.push_back(make_pair(now, count));
now = str[i];
count = 0;
}
count++;
}
return data;
}
//素数判定
bool is_prime(std::int64_t n)
{
for (std::int64_t i = 0; i * i <= n; i++)
{
if (n % i == 0)
{
return false;
}
}
return n != 1;
}
//約数の列挙
std::vector<std::int64_t> divisor(std::int64_t n)
{
std::vector<std::int64_t> res;
for (int i = 0; i < n; i++)
{
if(n % i == 0){
res.push_back(i);
if (i != n / i) res.push_back(n / i);
}
}
return res;
}
// 素因数分解
std::map<std::int64_t, std::int64_t> prime_factor(std::int64_t n)
{
std::map<std::int64_t, std::int64_t> res;
for (int i = 2; i * i <= n; i++)
{
while (n % i == 0)
{
++res[i];
n /= i;
}
}
if (n != 1)
{
res[n] = 1;
}
return res;
} | a.cc: In function 'void Main()':
a.cc:32:29: error: operands to '?:' have different types 'const char*' and 'int'
32 | std::cout << (a + b >= 10 ? "error" : a + b) << std::endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s097810266 | p03697 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a + b >= 10 ? "error" : a + b) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:26: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (a + b >= 10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s183098608 | p03697 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<(a+b>=10?"error":a+b);
} | a.cc: In function 'int main()':
a.cc:8:17: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout<<(a+b>=10?"error":a+b);
| ~~~~~~~^~~~~~~~~~~~
|
s095158816 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >>b;
if(a+b>=10) cout <<"error" << end;
else cout << a + b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:30: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
6 | if(a+b>=10) cout <<"error" << end;
| ~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/ostream:116:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ostream_type& (*)(__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:116:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)' {aka 'std::basic_ostream<char>& (*)(std::basic_ostream<char>&)'}
116 | operator<<(__ostream_type& (*__pf)(__ostream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:125:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; __ios_type = std::basic_ios<char>]'
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/ostream:125:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
125 | operator<<(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:135:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ^~~~~~~~
/usr/include/c++/14/ostream:135:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
135 | operator<<(ios_base& (*__pf) (ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ostream:174:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
174 | operator<<(long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:174:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int'
174 | operator<<(long __n)
| ~~~~~^~~
/usr/include/c++/14/ostream:178:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
178 | operator<<(unsigned long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:178:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int'
178 | operator<<(unsigned long __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:182:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
182 | operator<<(bool __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:182:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool'
182 | operator<<(bool __n)
| ~~~~~^~~
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:96:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]'
96 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:97:22: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int'
97 | operator<<(short __n)
| ~~~~~~^~~
/usr/include/c++/14/ostream:189:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
189 | operator<<(unsigned short __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:189:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int'
189 | operator<<(unsigned short __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ostream.tcc:110:5: note: candidate: 'std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]'
110 | basic_ostream<_CharT, _Traits>::
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:111:20: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int'
111 | operator<<(int __n)
| ~~~~^~~
/usr/include/c++/14/ostream:200:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
200 | operator<<(unsigned int __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:200:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int'
200 | operator<<(unsigned int __n)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:211:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
211 | operator<<(long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:211:28: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int'
211 | operator<<(long long __n)
| ~~~~~~~~~~^~~
/usr/include/c++/14/ostream:215:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
215 | operator<<(unsigned long long __n)
| ^~~~~~~~
/usr/include/c++/14/ostream:215:37: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int'
215 | operator<<(unsigned long long __n)
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:231:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
231 | operator<<(double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:231:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double'
231 | operator<<(double __f)
| ~~~~~~~^~~
/usr/include/c++/14/ostream:235:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
235 | operator<<(float __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:235:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float'
235 | operator<<(float __f)
| ~~~~~~^~~
/usr/include/c++/14/ostream:243:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
243 | operator<<(long double __f)
| ^~~~~~~~
/usr/include/c++/14/ostream:243:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double'
243 | operator<<(long double __f)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:301:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>]'
301 | operator<<(const void* __p)
| ^~~~~~~~
/usr/include/c++/14/ostream:301:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const void*'
301 | operator<<(const void* __p)
| ~~~~~~~~~~~~^~~
/usr/include/c++/14/ostream:306:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::nullptr_t) [with _CharT = char; _Traits = std::char_traits<char>; __ostream_type = std::basic_ostream<char>; std::nullptr_t = std: |
s542974385 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x , y;
cin >> x >> y;
cout << (x + y >= 10 ? "error" : x + y) << endl ;
}
| a.cc: In function 'int main()':
a.cc:8:24: error: operands to '?:' have different types 'const char*' and 'int'
8 | cout << (x + y >= 10 ? "error" : x + y) << endl ;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s034109486 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
string X = A + B;
cout << (A+B>10?X:"error") << endl;
}
| a.cc: In function 'int main()':
a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
7 | string X = A + B;
| ~~^~~
|
s981182351 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
string X = A + B;
cout << (A+B>10?X:"error") << endl;
}
| a.cc: In function 'int main()':
a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
7 | string X = A + B;
| ~~^~~
|
s547526030 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << (A+B>10?A+B:"error") << endl;
}
| a.cc: In function 'int main()':
a.cc:7:18: error: operands to '?:' have different types 'int' and 'const char*'
7 | cout << (A+B>10?A+B:"error") << endl;
| ~~~~~~^~~~~~~~~~~~
|
s360738548 | p03697 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef long double ld;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a,b;
cin >> a >> b;
cout << (a+b>=10 ? "error" : a+b) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:16:20: error: operands to '?:' have different types 'const char*' and 'int'
16 | cout << (a+b>=10 ? "error" : a+b) << endl;
| ~~~~~~~~^~~~~~~~~~~~~~~
|
s070140312 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if (A+B>=10){
cout <<"error";
else cout << A+B;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:4: error: expected '}' before 'else'
8 | else cout << A+B;
| ^~~~
a.cc:6:14: note: to match this '{'
6 | if (A+B>=10){
| ^
|
s355317176 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
cout << A+B;
if (A+B>=10){
cout <<"error";
else cout << A+B;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:4: error: expected '}' before 'else'
9 | else cout << A+B;
| ^~~~
a.cc:7:14: note: to match this '{'
7 | if (A+B>=10){
| ^
|
s213416646 | p03697 | C++ | using System;
using System.Collections.Generic;
namespace ConsoleApp_CS
{
class Program
{
static void Main(string[] args)
{
var a = CIn.ReadInt();
var b = CIn.ReadInt();
a = a + b;
if (a >= 10)
{
Console.WriteLine("error");
}
else
{
Console.WriteLine(a);
}
}
}
class CIn
{
private static readonly Queue<string> fieldBuffer = new Queue<string>();
public static string Read()
{
if (fieldBuffer.Count == 0)
{
foreach (var field in Console.ReadLine().Split())
{
fieldBuffer.Enqueue(field);
}
}
return fieldBuffer.Dequeue();
}
public static int ReadInt() => int.Parse(Read());
public static long ReadLong() => long.Parse(Read());
public static double ReadDouble() => double.Parse(Read());
public static string[] ReadStringArray(long n)
{
var array = new string[n];
for (var i = 0; i < n; i++)
{
array[i] = Read();
}
return array;
}
public static int[] ReadIntArray(long n)
{
var array = new int[n];
for (var i = 0; i < n; i++)
{
array[i] = ReadInt();
}
return array;
}
public static long[] ReadLongArray(long n)
{
var array = new long[n];
for (var i = 0; i < n; i++)
{
array[i] = ReadLong();
}
return array;
}
public static double[] ReadDoubleArray(long n)
{
var array = new double[n];
for (var i = 0; i < n; i++)
{
array[i] = ReadDouble();
}
return array;
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:9:26: error: 'string' has not been declared
9 | static void Main(string[] args)
| ^~~~~~
a.cc:9:35: error: expected ',' or '...' before 'args'
9 | static void Main(string[] args)
| ^~~~
a.cc:23:6: error: expected ';' after class definition
23 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApp_CS::Program::Main(int*)':
a.cc:11:13: error: 'var' was not declared in this scope
11 | var a = CIn.ReadInt();
| ^~~
a.cc:12:17: error: expected ';' before 'b'
12 | var b = CIn.ReadInt();
| ^
a.cc:13:13: error: 'a' was not declared in this scope
13 | a = a + b;
| ^
a.cc:13:21: error: 'b' was not declared in this scope
13 | a = a + b;
| ^
a.cc:16:17: error: 'Console' was not declared in this scope
16 | Console.WriteLine("error");
| ^~~~~~~
a.cc:20:17: error: 'Console' was not declared in this scope
20 | Console.WriteLine(a);
| ^~~~~~~
a.cc: At global scope:
a.cc:27:16: error: expected ':' before 'static'
27 | private static readonly Queue<string> fieldBuffer = new Queue<string>();
| ^~~~~~~
| :
a.cc:27:24: error: 'readonly' does not name a type
27 | private static readonly Queue<string> fieldBuffer = new Queue<string>();
| ^~~~~~~~
a.cc:29:15: error: expected ':' before 'static'
29 | public static string Read()
| ^~~~~~~
| :
a.cc:29:23: error: 'string' does not name a type
29 | public static string Read()
| ^~~~~~
a.cc:41:15: error: expected ':' before 'static'
41 | public static int ReadInt() => int.Parse(Read());
| ^~~~~~~
| :
a.cc:41:40: error: invalid pure specifier (only '= 0' is allowed) before 'int'
41 | public static int ReadInt() => int.Parse(Read());
| ^~~
a.cc:41:27: error: initializer specified for static member function 'static int ConsoleApp_CS::CIn::ReadInt()'
41 | public static int ReadInt() => int.Parse(Read());
| ^~~~~~~
a.cc:42:15: error: expected ':' before 'static'
42 | public static long ReadLong() => long.Parse(Read());
| ^~~~~~~
| :
a.cc:42:42: error: invalid pure specifier (only '= 0' is allowed) before 'long'
42 | public static long ReadLong() => long.Parse(Read());
| ^~~~
a.cc:42:28: error: initializer specified for static member function 'static long int ConsoleApp_CS::CIn::ReadLong()'
42 | public static long ReadLong() => long.Parse(Read());
| ^~~~~~~~
a.cc:43:15: error: expected ':' before 'static'
43 | public static double ReadDouble() => double.Parse(Read());
| ^~~~~~~
| :
a.cc:43:46: error: invalid pure specifier (only '= 0' is allowed) before 'double'
43 | public static double ReadDouble() => double.Parse(Read());
| ^~~~~~
a.cc:43:30: error: initializer specified for static member function 'static double ConsoleApp_CS::CIn::ReadDouble()'
43 | public static double ReadDouble() => double.Parse(Read());
| ^~~~~~~~~~
a.cc:45:15: error: expected ':' before 'static'
45 | public static string[] ReadStringArray(long n)
| ^~~~~~~
| :
a.cc:45:23: error: 'string' does not name a type
45 | public static string[] ReadStringArray(long n)
| ^~~~~~
a.cc:55:15: error: expected ':' before 'static'
55 | public static int[] ReadIntArray(long n)
| ^~~~~~~
| :
a.cc:55:26: error: expected unqualified-id before '[' token
55 | public static int[] ReadIntArray(long n)
| ^
a.cc:65:15: error: expected ':' before 'static'
65 | public static long[] ReadLongArray(long n)
| ^~~~~~~
| :
a.cc:65:27: error: expected unqualified-id before '[' token
65 | public static long[] ReadLongArray(long n)
| ^
a.cc:75:15: error: expected ':' before 'static'
75 | public static double[] ReadDoubleArray(long n)
| ^~~~~~~
| :
a.cc:75:29: error: expected unqualified-id before '[' token
75 | public static double[] ReadDoubleArray(long n)
| ^
a.cc:84:6: error: expected ';' after class definition
84 | }
| ^
| ;
|
s480411298 | p03697 | Java | import java.util.*;
class Main {
public static void main(String[] args){
Scenner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = a + b;
if(c <= 9){
System.out.println(c);
}else{
System.out.println("error");
}
}
} | Main.java:6: error: cannot find symbol
Scenner sc = new Scanner(System.in);
^
symbol: class Scenner
location: class Main
1 error
|
s571387029 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a + b >=10 ? "error" : a + b) << endl;
} | a.cc: In function 'int main()':
a.cc:6:23: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << (a + b >=10 ? "error" : a + b) << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.