submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s621275413 | p00433 | C++ | #include<iostream>
using namespace std;
int main {
int S,T,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
S>T ? cout << S : cout << T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
5 | int S,T,a,b,i;
| ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:5: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:13: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:17: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:5: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:13: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:17: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:5: error: 'S' does not name a type
14 | S>T ? cout << S : cout << T;
| ^
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s258123276 | p00433 | C++ | #include<iostream>
using namespace std;
int main {
int S=0,T=0,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
S>T ? cout << S : cout << T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
5 | int S=0,T=0,a,b,i;
| ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:5: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:13: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:17: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:5: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:13: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:17: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:5: error: 'S' does not name a type
14 | S>T ? cout << S : cout << T;
| ^
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s069896081 | p00433 | C++ | #include<iostream>
using namespace std;
int main {
int S=0,T=0,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
S>T ? (cout << S : cout << T);
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
5 | int S=0,T=0,a,b,i;
| ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:6: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:14: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:18: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:6: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:14: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:18: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:6: error: 'S' does not name a type
14 | S>T ? (cout << S : cout << T);
| ^
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s331003487 | p00433 | C++ | #include<iostream>
using namespace std;
int main {
int S=0,T=0,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
cout << S>T?S:T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
5 | int S=0,T=0,a,b,i;
| ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:6: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:14: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:18: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:6: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:14: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:18: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:6: error: 'cout' does not name a type
14 | cout << S>T?S:T;
| ^~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s500676178 | p00433 | C++ | #include <iostream>
using namespace std;
int main {
int S=0,T=0,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
cout << S>T?S:T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:1: error: expected primary-expression before 'int'
5 | int S=0,T=0,a,b,i;
| ^~~
a.cc:5:1: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:6: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:14: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:18: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:6: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:14: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:18: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:6: error: 'cout' does not name a type
14 | cout << S>T?S:T;
| ^~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s347491267 | p00433 | C++ | #include <iostream>
using namespace std;
int main {
int S=0,T=0,a,b,i;
for(i=0;i<4;i++) {
cin >> a;
S += a;
}
for(i=0;i<4;i++) {
cin >> b;
T += b;
}
cout << S>T?S:T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
5 | int S=0,T=0,a,b,i;
| ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:6: error: expected unqualified-id before 'for'
6 | for(i=0;i<4;i++) {
| ^~~
a.cc:6:14: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:6:18: error: 'i' does not name a type
6 | for(i=0;i<4;i++) {
| ^
a.cc:10:6: error: expected unqualified-id before 'for'
10 | for(i=0;i<4;i++) {
| ^~~
a.cc:10:14: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:10:18: error: 'i' does not name a type
10 | for(i=0;i<4;i++) {
| ^
a.cc:14:6: error: 'cout' does not name a type
14 | cout << S>T?S:T;
| ^~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s645624417 | p00433 | C++ | #include <iostream>
using namespace std;
int main {
int S=0, T=0, a, b, i;
for(i=0; i<4; i++) {
cin >> a;
S += a;
}
for(i=0; i<4; i++) {
cin >> b;
T += b;
}
cout << S > T ? S : T;
} | a.cc:4:5: error: cannot declare '::main' to be a global variable
4 | int main {
| ^~~~
a.cc:5:5: error: expected primary-expression before 'int'
5 | int S=0, T=0, a, b, i;
| ^~~
a.cc:5:5: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
4 | int main {
| ^
a.cc:6:6: error: expected unqualified-id before 'for'
6 | for(i=0; i<4; i++) {
| ^~~
a.cc:6:15: error: 'i' does not name a type
6 | for(i=0; i<4; i++) {
| ^
a.cc:6:20: error: 'i' does not name a type
6 | for(i=0; i<4; i++) {
| ^
a.cc:10:6: error: expected unqualified-id before 'for'
10 | for(i=0; i<4; i++) {
| ^~~
a.cc:10:15: error: 'i' does not name a type
10 | for(i=0; i<4; i++) {
| ^
a.cc:10:20: error: 'i' does not name a type
10 | for(i=0; i<4; i++) {
| ^
a.cc:14:6: error: 'cout' does not name a type
14 | cout << S > T ? S : T;
| ^~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s514820853 | p00433 | C++ | #include <iostream>
using namespace std;
int main () {
int S=0, T=0, a, b, i;
for(i=0; i<4; i++) {
cin >> a;
S += a;
}
for(i=0; i<4; i++) {
cin >> b;
T += b;
}
cout << S > T ? S : T;
} | a.cc: In function 'int main()':
a.cc:14:16: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
14 | cout << S > T ? S : T;
| ~~~~~~~~~ ^ ~
| | |
| | int
| std::basic_ostream<char>
a.cc:14:16: note: candidate: 'operator>(int, int)' (built-in)
14 | cout << S > T ? S : T;
| ~~~~~~~~~~^~~
a.cc:14:16: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
14 | cout << S > T ? S : T;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
14 | cout << S > T ? S : T;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
14 | cout << S > T ? S : T;
| ^
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
14 | cout << S > T ? S : T;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:14:18: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
14 | cout << S > T ? S : T;
| ^
|
s374636926 | p00433 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
int Aa,Ab,Ac,Ab;
int ba,bb,bc,bd;
int p,q;
cin>> Aa>>Ab>>Ac>>Ab;
cin>> ba>>bb>>bc>>bd;
p=Aa+Ab+Ac+Ab;
q=ba+bb+bc+bd;
if(p<q)
cout<<q<<endl;
else if(p>q)
cout<<p<<endl;
else
cout<<p<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: redeclaration of 'int Ab'
8 | int Aa,Ab,Ac,Ab;
| ^~
a.cc:8:16: note: 'int Ab' previously declared here
8 | int Aa,Ab,Ac,Ab;
| ^~
|
s763937622 | p00433 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <windows.h>
#include <iostream>
#include <algorithm>
#include <set>
#include <queue>
#include <functional>
using namespace std;
typedef unsigned int uint;
typedef long long int llint;
typedef pair<llint,llint> pii;
#define mpq(T) priority_queue<T,vector<T>,greater<T> >
#define FOR(i,a,b) for(int i = (a),i < (b); i++)
#define REP(i,a) for(int i = 0; i < (a); i++)
class BIT
{
private:
int s;
llint* d;
public:
BIT(int size)
{
s = size;
d = (llint*)malloc(sizeof(llint) * s);
for(int i = 0; i < s; i++)
{
d[i] = 0;
}
}
void add(int b,int x)
{
for(int i = b + 1; i <= s; i += (i & -i))
{
d[i - 1] += x;
}
}
llint sum(int b)
{
llint all = 0;
for(int i = b + 1; i > 0; i -= (i & -i))
{
all += d[i - 1];
}
return all;
}
~BIT()
{
free(d);
}
};
class unionfind
{
private:
int s;
int* o;
int* r;
public:
unionfind(int dsize)
{
s = dsize;
o = (int*)malloc(sizeof(int) * s);
r = (int*)malloc(sizeof(int) * s);
for(int i = 0; i < s; i++)
{
o[i] = i;
r[i] = 0;
}
}
int mfind(int b)
{
if(o[b] != b)
{
o[b] = mfind(o[b]);
}
return o[b];
}
void munion(int a,int b)
{
int aw = mfind(a);
int bw = mfind(b);
if(aw == bw)
{
return;
}
if(r[aw] > r[bw])
{
o[bw] = a;
}
else if(r[aw] < r[bw])
{
o[aw] = bw;
}
else
{
o[bw] = aw;
r[aw]++;
}
s--;
}
int size()
{
return s;
}
~unionfind()
{
free(o);
free(r);
}
};
template<class T> int lbound(T* d,T key,int s,int e)
{
s--;
while(e - s > 1)
{
int m = (s + e) / 2;
if(d[m] < key)
{
s = m;
}
else
{
e = m;
}
}
return e;
}
template<class T> int ubound(T* d,T key,int s,int e)
{
s--;
while(e - s > 1)
{
int m = (s + e) / 2;
if(key < d[m])
{
e = m;
}
else
{
s = m;
}
}
return e;
}
class zpress
{
private:
int ms;
pii* md;
int n;
int s;
llint* d;
int* t;
public:
zpress(int dsize = 1000000)
{
int ms = dsize;
md = (pii*)malloc(sizeof(pii) * ms);
d = (llint*)malloc(sizeof(llint) * ms);
t = (int*)malloc(sizeof(int) * ms);
n = 0;
}
void in(llint x)
{
in2(x,n);
n++;
}
void in2(llint x,int b)
{
md[b] = make_pair(x,b);
}
void syori()
{
syori2(n);
}
void syori2(int k)
{
sort(md,md + k);
llint mae = LLONG_MIN;
s = 0;
REP(i,k)
{
if(md[i].first != mae)
{
d[s] = md[i].first;
s++;
mae = md[i].first;
}
t[md[i].second] = s - 1;
}
}
llint iti(int b)
{
return t[b];
}
int size()
{
return s;
}
int first(llint x)
{
return lbound(d,x,0,s);
}
int end(llint x)
{
return ubound(d,x,0,s);;
}
~zpress()
{
free(md);
free(d);
free(t);
}
};
class xorshift
{
private:
unsigned int a,b,c,d;
public:
xorshift(unsigned int aw = 123456789,unsigned int bw = 362436069,unsigned int cw = 521288629,unsigned int dw = 88675123,unsigned int e = 97)
{
a = aw;
b = bw;
c = cw;
d = dw;
for(unsigned int i = 0; i < e; i++)
{
operator()();
}
}
unsigned int operator()()
{
unsigned int w = a ^ (a << 11);
a = b;
b = c;
c = d;
d = (d ^ (d >> 19)) ^ (w ^ (w >> 8));
return d;
}
};
llint gcd(llint a,llint b)
{
while(1)
{
llint w = a % b;
if(w == 0)
{
return b;
}
a = b;
b = w;
}
}
llint sei(llint d,llint p)
{
if(d < 0)
{
d -= ((d + 1) / p - 1) * p;
}
else
{
d %= p;
}
return d;
}
llint inv(llint a,llint p)
{
llint r0 = sei(a,p);
llint r1 = p;
llint a0 = 1;
llint b0 = 0;
llint a1 = 0;
llint b1 = 1;
while(1)
{
llint q = r0 / r1;
llint w = r0 - q * r1;
if(w == 0)
{
break;
}
r0 = r1;
r1 = w;
w = a0 - q * a1;
a0 = a1;
a1 = w;
}
return sei(a1,p);
}
template <llint P> class mod
{
private:
llint d;
public:
mod(llint a = 0)
{
d = a;
d = sei(d,P);
}
mod operator-() const
{
return mod(P - d);
}
mod operator+=(const mod& a)
{
d = d + a.d;
d = sei(d,P);
return *this;
}
mod operator-=(const mod& a)
{
return operator+=(-a);
}
mod operator*=(const mod& a)
{
d = d * a.d;
d = sei(d,P);
return *this;
}
mod operator/=(const mod& a)
{
return a * mod(inv(d,P));
}
mod operator+(const mod& a) const
{
mod w = *this;
return (w += a);
}
mod operator-(const mod& a) const
{
mod w = *this;
return (w -= a);
}
mod operator*(const mod& a) const
{
mod w = *this;
return (w *= a);
}
mod operator/(const mod& a) const
{
mod w = *this;
return (w /= a);
}
bool operator==(const mod& a) const
{
return (d == a.d);
}
bool operator!=(const mod& a) const
{
return (d != a.d);
}
operator llint() const
{
return d;
}
};
/////////////////////////////////////////////////////
FILE* fi;
FILE* fo;
void err(char* a)
{
printf("%s\n",a);
getchar();
}
llint in()
{
llint w;
fscanf_s(fi,"%lld",&w);
return w;
}
void ins(char* a)
{
fscanf_s(fi,"%s",a);
}
void out(llint a)
{
fprintf_s(fo,"%lld\n",a);
}
void outs(char* a)
{
fprintf_s(fo,"%s\n",a);
}
void func();
int main()
{
func();
return 0;
}
void func()
{
int a = 0;
REP(i,4)
{
a += in();
}
int b = 0;
REP(i,4)
{
b += in();
}
out(max(a,b));
} | a.cc:6:10: fatal error: windows.h: No such file or directory
6 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s841523139 | p00433 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
//#include <windows.h>
#include <iostream>
#include <algorithm>
#include <set>
#include <queue>
#include <functional>
using namespace std;
typedef unsigned int uint;
typedef long long int llint;
typedef pair<llint,llint> pii;
#define mpq(T) priority_queue<T,vector<T>,greater<T> >
#define FOR(i,a,b) for(int i = (a),i < (b); i++)
#define REP(i,a) for(int i = 0; i < (a); i++)
class BIT
{
private:
int s;
llint* d;
public:
BIT(int size)
{
s = size;
d = (llint*)malloc(sizeof(llint) * s);
for(int i = 0; i < s; i++)
{
d[i] = 0;
}
}
void add(int b,int x)
{
for(int i = b + 1; i <= s; i += (i & -i))
{
d[i - 1] += x;
}
}
llint sum(int b)
{
llint all = 0;
for(int i = b + 1; i > 0; i -= (i & -i))
{
all += d[i - 1];
}
return all;
}
~BIT()
{
free(d);
}
};
class unionfind
{
private:
int s;
int* o;
int* r;
public:
unionfind(int dsize)
{
s = dsize;
o = (int*)malloc(sizeof(int) * s);
r = (int*)malloc(sizeof(int) * s);
for(int i = 0; i < s; i++)
{
o[i] = i;
r[i] = 0;
}
}
int mfind(int b)
{
if(o[b] != b)
{
o[b] = mfind(o[b]);
}
return o[b];
}
void munion(int a,int b)
{
int aw = mfind(a);
int bw = mfind(b);
if(aw == bw)
{
return;
}
if(r[aw] > r[bw])
{
o[bw] = a;
}
else if(r[aw] < r[bw])
{
o[aw] = bw;
}
else
{
o[bw] = aw;
r[aw]++;
}
s--;
}
int size()
{
return s;
}
~unionfind()
{
free(o);
free(r);
}
};
template<class T> int lbound(T* d,T key,int s,int e)
{
s--;
while(e - s > 1)
{
int m = (s + e) / 2;
if(d[m] < key)
{
s = m;
}
else
{
e = m;
}
}
return e;
}
template<class T> int ubound(T* d,T key,int s,int e)
{
s--;
while(e - s > 1)
{
int m = (s + e) / 2;
if(key < d[m])
{
e = m;
}
else
{
s = m;
}
}
return e;
}
class zpress
{
private:
int ms;
pii* md;
int n;
int s;
llint* d;
int* t;
public:
zpress(int dsize = 1000000)
{
int ms = dsize;
md = (pii*)malloc(sizeof(pii) * ms);
d = (llint*)malloc(sizeof(llint) * ms);
t = (int*)malloc(sizeof(int) * ms);
n = 0;
}
void in(llint x)
{
in2(x,n);
n++;
}
void in2(llint x,int b)
{
md[b] = make_pair(x,b);
}
void syori()
{
syori2(n);
}
void syori2(int k)
{
sort(md,md + k);
llint mae = LLONG_MIN;
s = 0;
REP(i,k)
{
if(md[i].first != mae)
{
d[s] = md[i].first;
s++;
mae = md[i].first;
}
t[md[i].second] = s - 1;
}
}
llint iti(int b)
{
return t[b];
}
int size()
{
return s;
}
int first(llint x)
{
return lbound(d,x,0,s);
}
int end(llint x)
{
return ubound(d,x,0,s);;
}
~zpress()
{
free(md);
free(d);
free(t);
}
};
class xorshift
{
private:
unsigned int a,b,c,d;
public:
xorshift(unsigned int aw = 123456789,unsigned int bw = 362436069,unsigned int cw = 521288629,unsigned int dw = 88675123,unsigned int e = 97)
{
a = aw;
b = bw;
c = cw;
d = dw;
for(unsigned int i = 0; i < e; i++)
{
operator()();
}
}
unsigned int operator()()
{
unsigned int w = a ^ (a << 11);
a = b;
b = c;
c = d;
d = (d ^ (d >> 19)) ^ (w ^ (w >> 8));
return d;
}
};
llint gcd(llint a,llint b)
{
while(1)
{
llint w = a % b;
if(w == 0)
{
return b;
}
a = b;
b = w;
}
}
llint sei(llint d,llint p)
{
if(d < 0)
{
d -= ((d + 1) / p - 1) * p;
}
else
{
d %= p;
}
return d;
}
llint inv(llint a,llint p)
{
llint r0 = sei(a,p);
llint r1 = p;
llint a0 = 1;
llint b0 = 0;
llint a1 = 0;
llint b1 = 1;
while(1)
{
llint q = r0 / r1;
llint w = r0 - q * r1;
if(w == 0)
{
break;
}
r0 = r1;
r1 = w;
w = a0 - q * a1;
a0 = a1;
a1 = w;
}
return sei(a1,p);
}
template <llint P> class mod
{
private:
llint d;
public:
mod(llint a = 0)
{
d = a;
d = sei(d,P);
}
mod operator-() const
{
return mod(P - d);
}
mod operator+=(const mod& a)
{
d = d + a.d;
d = sei(d,P);
return *this;
}
mod operator-=(const mod& a)
{
return operator+=(-a);
}
mod operator*=(const mod& a)
{
d = d * a.d;
d = sei(d,P);
return *this;
}
mod operator/=(const mod& a)
{
return a * mod(inv(d,P));
}
mod operator+(const mod& a) const
{
mod w = *this;
return (w += a);
}
mod operator-(const mod& a) const
{
mod w = *this;
return (w -= a);
}
mod operator*(const mod& a) const
{
mod w = *this;
return (w *= a);
}
mod operator/(const mod& a) const
{
mod w = *this;
return (w /= a);
}
bool operator==(const mod& a) const
{
return (d == a.d);
}
bool operator!=(const mod& a) const
{
return (d != a.d);
}
operator llint() const
{
return d;
}
};
/////////////////////////////////////////////////////
FILE* fi;
FILE* fo;
void err(char* a)
{
printf("%s\n",a);
getchar();
}
llint in()
{
llint w;
fscanf_s(fi,"%lld",&w);
return w;
}
void ins(char* a)
{
fscanf_s(fi,"%s",a);
}
void out(llint a)
{
fprintf_s(fo,"%lld\n",a);
}
void outs(char* a)
{
fprintf_s(fo,"%s\n",a);
}
void func();
int main()
{
func();
return 0;
}
void func()
{
int a = 0;
REP(i,4)
{
a += in();
}
int b = 0;
REP(i,4)
{
b += in();
}
out(max(a,b));
} | a.cc: In member function 'void zpress::syori2(int)':
a.cc:201:29: error: 'LLONG_MIN' was not declared in this scope
201 | llint mae = LLONG_MIN;
| ^~~~~~~~~
a.cc:12:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
11 | #include <functional>
+++ |+#include <climits>
12 |
a.cc: In function 'llint in()':
a.cc:417:9: error: 'fscanf_s' was not declared in this scope; did you mean 'fscanf'?
417 | fscanf_s(fi,"%lld",&w);
| ^~~~~~~~
| fscanf
a.cc: In function 'void ins(char*)':
a.cc:423:9: error: 'fscanf_s' was not declared in this scope; did you mean 'fscanf'?
423 | fscanf_s(fi,"%s",a);
| ^~~~~~~~
| fscanf
a.cc: In function 'void out(llint)':
a.cc:428:9: error: 'fprintf_s' was not declared in this scope; did you mean 'fprintf'?
428 | fprintf_s(fo,"%lld\n",a);
| ^~~~~~~~~
| fprintf
a.cc: In function 'void outs(char*)':
a.cc:433:9: error: 'fprintf_s' was not declared in this scope; did you mean 'fprintf'?
433 | fprintf_s(fo,"%s\n",a);
| ^~~~~~~~~
| fprintf
|
s880856682 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int sum1 = 0, sum2 = 0;
int n;
for(int i = 0; i< 4; i++){
cin >> n;
sum1 += n;
}
for(int i = 0; i< 4; i++){
cin >> n;
sum2 += n;
}
if(sum1 > sum2) coout << sum1;
else cout << sum2;
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:19: error: 'coout' was not declared in this scope
17 | if(sum1 > sum2) coout << sum1;
| ^~~~~
|
s218926649 | p00433 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int[] a = new int[4];
int[] b = new int[4];
int sumA = 0, sumB = 0;
for(int i = 0; i < 4; i++){
a[i] = in.nextInt();
sumA += a[i];
}
for(int i = 0; i < 4; i++){
b[i] = in.nextInt();
sumB += b[i];
}
if(sumA < sumB){
System.out.println(sumB);
}
else{
System.out.println(sumA);
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s370642051 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int a;int b;
int i = 1;
int s;int d;int j;int k;
cin >> s >> d >> j >> k;
a = s+d+j+k;
int w;int ww;int www;int wwww;
cin >>w >> ww >> www >> wwww;
b = w + ww + www + wwww;
if(a >= b){
cout >> a >>endl;
}
else{
cout >> b >> endl;
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
14 | cout >> a >>endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:14:6: note: candidate: 'operator>>(int, int)' (built-in)
14 | cout >> a >>endl;
| ~~~~~^~~~
a.cc:14:6: 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/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> a >>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:14:9: required from here
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:17:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
17 | cout >> b >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:17:6: note: candidate: 'operator>>(int, int)' (built-in)
17 | cout >> b >> endl;
| ~~~~~^~~~
a.cc:17:6: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | cout >> b >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| |
s021853755 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int a;int b;
int i = 1;
int s;int d;int j;int k;
cin >> s >> d >> j >> k;
a = s+d+j+k;
int w;int ww;int www;int wwww;
cin >>w >> ww >> www >> wwww;
b = w + ww + www + wwww;
if(a >= b){
cout >> a >>endl;
}
else{
cout >> b >> endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
14 | cout >> a >>endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:14:6: note: candidate: 'operator>>(int, int)' (built-in)
14 | cout >> a >>endl;
| ~~~~~^~~~
a.cc:14:6: 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/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:14:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
14 | cout >> a >>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:14:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:14:9: required from here
14 | cout >> a >>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:17:6: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
17 | cout >> b >> endl;
| ~~~~ ^~ ~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:17:6: note: candidate: 'operator>>(int, int)' (built-in)
17 | cout >> b >> endl;
| ~~~~~^~~~
a.cc:17:6: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:1: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | cout >> b >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:9: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | cout >> b >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| |
s027566085 | p00433 | C++ | #include <iostream.h>
using namespace std;
int main (){
int A,B,ma,i,s,e;
cin>>ma>>i>>s>>e;
A=ma+i+s+e;
cin>>ma>>i>>s>>e;
B=ma+i+s+e;
if(A>B){
return A;
}
else if(A<B){
return B;
}
else {return A;
}
return m;
}
int main(){
int n;
cin >> n;
cout << solve(n) << endl;
return 0;
} | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s295093939 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int W,X,Y,Z,w,x,y,z;
cin W,X,Y,Z,w,x,y,z;
if( (W + X + Y + Z) > (w + x + y + z)){
cout << W + X + Y + Z << endl;
}
else if( W + X + Y + Z) < (w + x + y + z)){
cout << w + x + y + z << endl;
}
else{
cout << w + x + y + z << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:4: error: expected ';' before 'W'
6 | cin W,X,Y,Z,w,x,y,z;
| ^~
| ;
a.cc:11:25: error: expected primary-expression before '<' token
11 | else if( W + X + Y + Z) < (w + x + y + z)){
| ^
|
s058506666 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int W,X,Y,Z,w,x,y,z;
cin >> W >>X >> Y >> Z >> w >> x >>y >> z;
if( (W + X + Y + Z) > (w + x + y + z)){
cout << W + X + Y + Z << endl;
}
else if( W + X + Y + Z) < (w + x + y + z)){
cout << w + x + y + z << endl;
}
else{
cout << w + x + y + z << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:25: error: expected primary-expression before '<' token
11 | else if( W + X + Y + Z) < (w + x + y + z)){
| ^
|
s247253409 | p00433 | C++ | 111 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 111
| ^~~
|
s210583190 | p00433 | C++ | import java.util.*;
class Score {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int res = 0;
for(int i = 0; i < 2; i++) {
int sum = 0;
for(int j = 0; j < 4; j++) {
int tmp;
tmp = sc.nextInt();
sum = sum + tmp;
}
if(res < sum)
res = sum;
}
System.out.println(res);
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
4 | public static void main(String args[]) {
| ^~~~~~~
| :
a.cc:4:33: error: 'String' has not been declared
4 | public static void main(String args[]) {
| ^~~~~~
a.cc:19:2: error: expected ';' after class definition
19 | }
| ^
| ;
a.cc: In static member function 'static void Score::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
5 | Scanner sc = new Scanner(System.in);
| ^~~~~~~
a.cc:11:39: error: 'sc' was not declared in this scope
11 | tmp = sc.nextInt();
| ^~
a.cc:17:17: error: 'System' was not declared in this scope
17 | System.out.println(res);
| ^~~~~~
|
s459295294 | p00433 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <map>
#include <string>
#include <functional>
#include <math.h>
#include <utility>
using namespace System;
using namespace std;
int main()
{
int a=0,b=0,t;
for(int i=0;i<4;i++){cin>>t;a+=t;}
for(int i=0;i<4;i++){cin>>t;b+=t;}
cout<<max(a,b)<<endl;
} | a.cc:10:17: error: 'System' is not a namespace-name
10 | using namespace System;
| ^~~~~~
|
s070932493 | p00433 | C++ | int main()
{
int i,a[4],b[4],a_total=0,b_total=0,put;
for(i=0;i<4;i++)
{
scanf("%d",&a[i]);
a_total+=a[i];
}
for(i=0;i<4;i++)
{
scanf("%d",&b[i]);
b_total+=b[i];
}
put=a_total<b_total?b_total:a_total;
printf("%d\n",put);
//Sleep(1000);
} | a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
6 | scanf("%d",&a[i]);
| ^~~~~
a.cc:11:17: error: 'scanf' was not declared in this scope
11 | scanf("%d",&b[i]);
| ^~~~~
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf("%d\n",put);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main()
|
s897719383 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int aa,ab,ac,ad,ba,bb,bc,bd,sum_a,sum_b;
cin>>aa>ab>>ac>>ad;
cin>>ba>>bb>bc>>bd;
sum_a=aa+ab+ac+ad;
sum_b=ba+bb+bc+bd;
if(sum_a>=sum_b){
cout<<sum_a<<endl;
}else{
cout<<sum_b<<endl
}
} | a.cc: In function 'int main()':
a.cc:5:8: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:5:8: note: candidate: 'operator>(int, int)' (built-in)
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
a.cc:5:8: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
a.cc:6:12: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:12: note: candidate: 'operator>(int, int)' (built-in)
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
a.cc:6:12: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterat |
s047362386 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int aa,ab,ac,ad,ba,bb,bc,bd,sum_a,sum_b;
cin>>aa>ab>>ac>>ad;
cin>>ba>>bb>bc>>bd;
sum_a=aa+ab+ac+ad;
sum_b=ba+bb+bc+bd;
if(sum_a>=sum_b){
cout<<sum_a<<endl;
}else{
cout<<sum_b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:8: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:5:8: note: candidate: 'operator>(int, int)' (built-in)
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
a.cc:5:8: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
a.cc:6:12: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:12: note: candidate: 'operator>(int, int)' (built-in)
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
a.cc:6:12: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterat |
s198912643 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int aa,ab,ac,ad,ba,bb,bc,bd,sum_a,sum_b;
cin>>aa>ab>>ac>>ad;
cin>>ba>>bb>bc>>bd;
sum_a=aa+ab+ac+ad;
sum_b=ba+bb+bc+bd;
if(sum_a>=sum_b){
cout<<sum_a<<endl;
}else{
cout<<sum_b<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:8: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:5:8: note: candidate: 'operator>(int, int)' (built-in)
5 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
a.cc:5:8: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:5:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
5 | cin>>aa>ab>>ac>>ad;
| ^~
a.cc:6:12: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:12: note: candidate: 'operator>(int, int)' (built-in)
6 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
a.cc:6:12: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterat |
s882956230 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int aa,ab,ac,ad,ba,bb,bc,bd,sum_a,sum_b;
cin>>aa>ab>>ac>>ad>>endl;
cin>>ba>>bb>bc>>bd>>endl;
sum_a=aa+ab+ac+ad;
sum_b=ba+bb+bc+bd;
if(sum_a>=sum_b){
cout<<sum_a<<endl;
}else{
cout<<sum_b<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>'
6 | cin>>aa>ab>>ac>>ad>>endl;
| ~~~~~~~~~~^~~~~~
a.cc:7:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>'
7 | cin>>ba>>bb>bc>>bd>>endl;
| ~~~~~~^~~~~~
|
s386720840 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int aa,ab,ac,ad,ba,bb,bc,bd,sum_a,sum_b;
cin>>aa>ab>>ac>>ad;
cin>>ba>>bb>bc>>bd;
sum_a=aa+ab+ac+ad;
sum_b=ba+bb+bc+bd;
if(sum_a>=sum_b){
cout<<sum_a<<endl;
}else{
cout<<sum_b<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:8: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
6 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:6:8: note: candidate: 'operator>(int, int)' (built-in)
6 | cin>>aa>ab>>ac>>ad;
| ~~~~~~~^~~~~~~~~~~
a.cc:6:8: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:702: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> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/string_view:710: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>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3915: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>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3942 | operator>(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2619 | operator>(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed:
a.cc:6:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
6 | cin>>aa>ab>>ac>>ad;
| ^~
a.cc:7:12: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
7 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
| | |
| | int
| std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}
a.cc:7:12: note: candidate: 'operator>(int, int)' (built-in)
7 | cin>>ba>>bb>bc>>bd;
| ~~~~~~~~~~~^~~~~~~
a.cc:7:12: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int'
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:7:17: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
7 | cin>>ba>>bb>bc>>bd;
| ^~
/usr/include/c++/14/bits/stl_iterat |
s624037034 | p00433 | C++ | // Example program
#include <iostream>
#include <string>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int s=(a+b+c+d);
int t=(e+f+g+h);
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
cin >> g;
cin >> h;
if(s>t){
cout << s << endl;
}else{
cout << t << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:8: error: 'a' was not declared in this scope
11 | int s=(a+b+c+d);
| ^
a.cc:11:10: error: 'b' was not declared in this scope
11 | int s=(a+b+c+d);
| ^
a.cc:11:12: error: 'c' was not declared in this scope
11 | int s=(a+b+c+d);
| ^
a.cc:11:14: error: 'd' was not declared in this scope
11 | int s=(a+b+c+d);
| ^
a.cc:12:8: error: 'e' was not declared in this scope
12 | int t=(e+f+g+h);
| ^
a.cc:12:10: error: 'f' was not declared in this scope
12 | int t=(e+f+g+h);
| ^
a.cc:12:12: error: 'g' was not declared in this scope
12 | int t=(e+f+g+h);
| ^
a.cc:12:14: error: 'h' was not declared in this scope
12 | int t=(e+f+g+h);
| ^
|
s660123972 | p00433 | C++ | // Example program
#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
cin >> g;
cin >> h;
int s;
int t;
s=a+b+c+d;
t=e+f+g+h;
if(s<t){cout << t << endl};
if(t<s){cout << s << endl};
if(s==t){cout << t << endl};
} | a.cc: In function 'int main()':
a.cc:30:27: error: expected ';' before '}' token
30 | if(s<t){cout << t << endl};
| ^
| ;
a.cc:31:27: error: expected ';' before '}' token
31 | if(t<s){cout << s << endl};
| ^
| ;
a.cc:32:28: error: expected ';' before '}' token
32 | if(s==t){cout << t << endl};
| ^
| ;
|
s850542109 | p00433 | C++ | // Example program
#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
cin >> g;
cin >> h;
int s;
int t;
s=a+b+c+d;
t=e+f+g+h;
if(s<t){cout << t << endl};
if(t<s){cout << s << endl};
if(s==t){cout << t << endl};
} | a.cc: In function 'int main()':
a.cc:30:27: error: expected ';' before '}' token
30 | if(s<t){cout << t << endl};
| ^
| ;
a.cc:31:27: error: expected ';' before '}' token
31 | if(t<s){cout << s << endl};
| ^
| ;
a.cc:32:28: error: expected ';' before '}' token
32 | if(s==t){cout << t << endl};
| ^
| ;
|
s116168561 | p00433 | C++ | // Example program
#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
cin >> g;
cin >> h;
int s;
int t;
s=a+b+c+d;
t=e+f+g+h;
if(s<t){cout << t << endl};
if(t<s){cout << s << endl};
if(s==t){cout << t << endl};
} | a.cc: In function 'int main()':
a.cc:30:27: error: expected ';' before '}' token
30 | if(s<t){cout << t << endl};
| ^
| ;
a.cc:31:27: error: expected ';' before '}' token
31 | if(t<s){cout << s << endl};
| ^
| ;
a.cc:32:28: error: expected ';' before '}' token
32 | if(s==t){cout << t << endl};
| ^
| ;
|
s015305261 | p00433 | C++ | // Example program
#include <iostream>
#include <vector>
#include<algorithm>
using namespace std;
int main()
{
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cin >> f;
cin >> g;
cin >> h;
int s;
int t;
s=(a+b+c+d);
t=(e+f+g+h);
if(s<t){cout << "t" << endl};
if(t<s){cout << "s" << endl};
if(s==t){cout << "t" << endl};
} | a.cc: In function 'int main()':
a.cc:30:29: error: expected ';' before '}' token
30 | if(s<t){cout << "t" << endl};
| ^
| ;
a.cc:31:29: error: expected ';' before '}' token
31 | if(t<s){cout << "s" << endl};
| ^
| ;
a.cc:32:30: error: expected ';' before '}' token
32 | if(s==t){cout << "t" << endl};
| ^
| ;
|
s826783038 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int sa[3], sb[3];
cin >> sa[0] >> sa[1] >> sa[2] >> sa[3];
cin >> sb[0] >> sb[1] >> sb[2] >> sb[3];
if ((sa[0] + sa[1] + sa[2] + sa[3]) > (sb[0] + sb[1] + sb[2] + sb[3]){
cout << sa[0] + sa[1] + sa[2] + sa[3] << endl;
}
else{
cout << sb[0] + sb[1] + sb[2] + sb[3] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:78: error: expected ';' before '{' token
7 | if ((sa[0] + sa[1] + sa[2] + sa[3]) > (sb[0] + sb[1] + sb[2] + sb[3]){
| ^
| ;
a.cc:10:9: error: expected primary-expression before 'else'
10 | else{
| ^~~~
a.cc:9:10: error: expected ')' before 'else'
9 | }
| ^
| )
10 | else{
| ~~~~
a.cc:7:12: note: to match this '('
7 | if ((sa[0] + sa[1] + sa[2] + sa[3]) > (sb[0] + sb[1] + sb[2] + sb[3]){
| ^
|
s225399752 | p00433 | C++ | include <iostream>
using namespace std;
int main(void)
{
int a1, a2, a3, a4, a;
int b1, b2, b3, b4, b;
cin >> a1 >> a2 >> a3 >> a4;
cin >> b1 >> b2 >> b3 >> b4;
a = a1 + a2 + a3 + a4;
b = b1 + b2 + b3 + b4;
if(a < b)
cout << b << endl;
else if(a > b)
cout << a << endl;
else
cout << a << endl;
return (0);
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
8 | cin >> a1 >> a2 >> a3 >> a4;
| ^~~
a.cc:14:17: error: 'cout' was not declared in this scope
14 | cout << b << endl;
| ^~~~
a.cc:14:30: error: 'endl' was not declared in this scope
14 | cout << b << endl;
| ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope
16 | cout << a << endl;
| ^~~~
a.cc:16:30: error: 'endl' was not declared in this scope
16 | cout << a << endl;
| ^~~~
a.cc:18:17: error: 'cout' was not declared in this scope
18 | cout << a << endl;
| ^~~~
a.cc:18:30: error: 'endl' was not declared in this scope
18 | cout << a << endl;
| ^~~~
|
s856572670 | p00433 | C++ | #include <cstdio>
using namespace std;
int main()
{
int a,b,x;
for(int i=0;i<8;i++){scanf("%d",&x); if(i<=3) a+=x; else b+=x;}
printf("&d",max(a,b));
} | a.cc: In function 'int main()':
a.cc:7:13: error: 'max' was not declared in this scope
7 | printf("&d",max(a,b));
| ^~~
|
s754370462 | p00433 | C++ | #include <cstdio>
using namespace std;
int main()
{
int a,b,x;
for(int i=0;i<8;i++){scanf("%d",&x); if(i<=3) a+=x; else b+=x;}
printf("%d\n",max(a,b));
} | a.cc: In function 'int main()':
a.cc:7:15: error: 'max' was not declared in this scope
7 | printf("%d\n",max(a,b));
| ^~~
|
s523788123 | p00433 | C++ | #include<iostream>
using namespace std;
int score[2][4];
int T[2]
int main()
{
for(int i=0;i<2;i++)
{
for(int j=0;j<4;j++)
{
cin >>score[i][j];
T[i]+=score[i][j];
}
}
if(T[1]>T[2])
{
cout<<T[1];
}
else
{
cout<<T[2];
}
} | a.cc:6:1: error: expected initializer before 'int'
6 | int main()
| ^~~
|
s986273202 | p00433 | C++ | #include<iostream>
using namespace std;
int score[2][4];
int T[2]
int main()
{
for(int i=0;i<2;i++)
{
for(int j=0;j<4;j++)
{
cin >>score[i][j];
T[i]+=score[i][j];
}
}
if(T[1]>T[2])
{
cout<<T[1];
}
else
{
cout<<T[2];
}
} | a.cc:6:1: error: expected initializer before 'int'
6 | int main()
| ^~~
|
s526966135 | p00433 | C++ | #include <stdio.h>
#include <algorithm>
#include<iomanip>
using namespace std;
int main() {
int S = 0, T = 0, a;
for (int i = 0; i < 4; i++)
{
scanf_s("%d", &a);
S += a;
}
for (int i = 0; i < 4; i++)
{
scanf_s("%d", &a);
T += a;
}
printf_s("%d", max(S, T));
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
a.cc:16:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
16 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
a.cc:19:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
19 | printf_s("%d", max(S, T));
| ^~~~~~~~
| printf
|
s889232968 | p00433 | C++ | #include <stdio.h>
#include <algorithm>
#include<iomanip>
using namespace std;
int main() {
int S = 0, T = 0, a;
for (int i = 0; i < 4; i++)
{
scanf_s("%d", &a);
S += a;
}
for (int i = 0; i < 4; i++)
{
scanf_s("%d", &a);
T += a;
}
printf_s("%d\n", max(S, T));
return 0;
} | a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
11 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
a.cc:16:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
16 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
a.cc:19:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
19 | printf_s("%d\n", max(S, T));
| ^~~~~~~~
| printf
|
s091192268 | p00433 | C++ |
#include<iostream>
#include<vector>
#include <map>
#include <utility>
#include <algorithm>
#include <functional>
#include<string>
using namespace std;
int main() {
int a, s, d, f, g, h, , j, k;
cin >> a, s, d, f, g, h, j, k;
if (a + s + d + f > g + h + j + k) {
cout << a + s + d + f << endl;
}
else {
cout << g + h + j + k << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:31: error: expected unqualified-id before ',' token
13 | int a, s, d, f, g, h, , j, k;
| ^
|
s050908620 | p00433 | C++ | #include <iostream>
#include <algorithm>
#define for(int i=0;i<n;i++) loop(i,n)
using namespace std;
int main(){
int a=0, b=0, temp;
loop(i,4){
cin>>temp;
a+=temp;
}
loop(i,4){
cin>>temp;
b+=temp;
}
cout<<max(a,b)<<endl;
return 0;
} | a.cc:3:17: error: expected ',' or ')', found "i"
3 | #define for(int i=0;i<n;i++) loop(i,n)
| ^
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
8 | loop(i,4){
| ^
a.cc:8:3: error: 'loop' was not declared in this scope
8 | loop(i,4){
| ^~~~
|
s384704923 | p00433 | C++ | #include <iostream>
#define MAX ((a)>(b)?(a):(b))
using namespace std;
int main(void){
int a,b,c,d,e,f,g,h;
cin>>a>>b>>c>>d>>e>>f>>g>>h;
cout<<MAX(a+b+c+d,e+f+g+h)<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: expression cannot be used as a function
8 | cout<<MAX(a+b+c+d,e+f+g+h)<<endl;
| ^
|
s619405170 | p00433 | C++ | #include "stdafx.h"
#include <iostream>
#include<algorithm>
using namespace std;
int main()
{
int sum=0, summ=0;
for (int i = 0; i < 4; i++)
{
int s; cin >> s; sum += s;
}
for (size_t i = 0; i < 4; i++)
{
int s; cin >> s; summ += s;
}
if (sum >= summ) { cout << sum<<endl; }
else { cout << summ<<endl; }
} | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s304150897 | p00433 | C++ | #include<iostream>
using namespace std;
int main(){
int a[8];
for(int i=0;i<8;i++){
cin >> a[1][i];
}
for(int i=0;i=0;i++){
cin >> a[2][i];
}
if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
cout << a[0][0]+a[0][1]+a[0][2]+a[0][3] << endl;
}
else{
cout << a[1][0]+a[1][1]+a[1][2]+a[1][3] << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:16: error: invalid types 'int[int]' for array subscript
8 | cin >> a[1][i];
| ^
a.cc:11:16: error: invalid types 'int[int]' for array subscript
11 | cin >> a[2][i];
| ^
a.cc:13:11: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:19: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:27: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:35: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:47: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:55: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:63: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:13:71: error: invalid types 'int[int]' for array subscript
13 | if((a[0][0]+a[0][1]+a[0][2]+a[0][3]) > (a[1][0]+a[1][1]+a[1][2]+a[1][3])){
| ^
a.cc:14:17: error: invalid types 'int[int]' for array subscript
14 | cout << a[0][0]+a[0][1]+a[0][2]+a[0][3] << endl;
| ^
a.cc:14:25: error: invalid types 'int[int]' for array subscript
14 | cout << a[0][0]+a[0][1]+a[0][2]+a[0][3] << endl;
| ^
a.cc:14:33: error: invalid types 'int[int]' for array subscript
14 | cout << a[0][0]+a[0][1]+a[0][2]+a[0][3] << endl;
| ^
a.cc:14:41: error: invalid types 'int[int]' for array subscript
14 | cout << a[0][0]+a[0][1]+a[0][2]+a[0][3] << endl;
| ^
a.cc:17:17: error: invalid types 'int[int]' for array subscript
17 | cout << a[1][0]+a[1][1]+a[1][2]+a[1][3] << endl;
| ^
a.cc:17:25: error: invalid types 'int[int]' for array subscript
17 | cout << a[1][0]+a[1][1]+a[1][2]+a[1][3] << endl;
| ^
a.cc:17:33: error: invalid types 'int[int]' for array subscript
17 | cout << a[1][0]+a[1][1]+a[1][2]+a[1][3] << endl;
| ^
a.cc:17:41: error: invalid types 'int[int]' for array subscript
17 | cout << a[1][0]+a[1][1]+a[1][2]+a[1][3] << endl;
| ^
|
s877715787 | p00433 | C++ | include<iostream>
using namespace std;
int main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
int gotiusa=a+b+c+d;
cin>>a>>b>>c>>d;
int ujimatu=a+b+c+d;
cout<<(gotiusa>ujimatu ?gotiusa:ujimatu )<<endl;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin>>a>>b>>c>>d;
| ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
9 | cout<<(gotiusa>ujimatu ?gotiusa:ujimatu )<<endl;
| ^~~~
a.cc:9:46: error: 'endl' was not declared in this scope
9 | cout<<(gotiusa>ujimatu ?gotiusa:ujimatu )<<endl;
| ^~~~
|
s117841014 | p00433 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,j,s,t,a[4],b[4];
for(j=0;j<2;j++)
{
for(i=0;i<4;i++)
{
if(j==0)
{
cin>>a[i];
s=a[i]+s;
}
else
{
cin>>b[i];
t=b[i]+t;
}
}
}
if(t<s)
{
cout>>s>>endl;
}
else
{
cout>>t>>endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:24:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
24 | cout>>s>>endl;
| ~~~~^~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:24:14: note: candidate: 'operator>>(int, int)' (built-in)
24 | cout>>s>>endl;
| ~~~~^~~
a.cc:24:14: 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/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout>>s>>endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:24:10: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
24 | cout>>s>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:24:16: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:24:9: required from here
24 | cout>>s>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:28:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
28 | cout>>t>>endl;
| ~~~~^~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:28:13: note: candidate: 'operator>>(int, int)' (built-in)
28 | cout>>t>>endl;
| ~~~~^~~
a.cc:28:13: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:28:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
28 | cout>>t>>endl;
| ^
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:28:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
28 | cout>>t>>endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:28:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
28 | cout>>t>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:28:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
28 | cout>>t>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:28:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
28 | cout>>t>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:28:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
28 | cout>>t>>endl;
|
s531319305 | p00433 | C++ |
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
using namespace std;
int main (void)
{
int a[3],b[3],A,B;
for (int i = 0; i < 4; i++)
{
cin >> a[i];
A += a[i];
}
for (int i = 0; i < 4; i++)
{
cin >> b[i];
B += b[i];
}
if (A <= B)
{
cout << B << endl;
}
else if (A > B)
{
cout << A << endl;
}
} | a.cc: In function 'int main()':
a.cc:19:17: error: 'cin' was not declared in this scope
19 | cin >> a[i];
| ^~~
a.cc:10:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
9 | #include <time.h>
+++ |+#include <iostream>
10 |
a.cc:25:17: error: 'cin' was not declared in this scope
25 | cin >> b[i];
| ^~~
a.cc:25:17: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:17: error: 'cout' was not declared in this scope
31 | cout << B << endl;
| ^~~~
a.cc:31:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:30: error: 'endl' was not declared in this scope
31 | cout << B << endl;
| ^~~~
a.cc:10:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
9 | #include <time.h>
+++ |+#include <ostream>
10 |
a.cc:35:17: error: 'cout' was not declared in this scope
35 | cout << A << endl;
| ^~~~
a.cc:35:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:30: error: 'endl' was not declared in this scope
35 | cout << A << endl;
| ^~~~
a.cc:35:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s743532269 | p00433 | C++ | #include<cstdio>
#include<iostream>
using namespace std;
int main()
{
int i,j,n,s=0,t=0;
for(i=1;i<=4;i++)
{
cin>>n;
s+=n;
}
for(i=1;i<=4;i++)
{
cin>>n;
t+=n;
}
if(s>=t)cout<<s;
else cout<<t;
}vvvvvvvvvvvvvvv | a.cc:19:2: error: 'vvvvvvvvvvvvvvv' does not name a type
19 | }vvvvvvvvvvvvvvv
| ^~~~~~~~~~~~~~~
|
s018890086 | p00433 | C++ | include <iostream>
#include <numeric>
int main() {
int a[4],b[4];
for(int i=0;i<4;i++) scanf("%d",&a[i]);
for(int i=0;i<4;i++) scanf("%d",&b[i]);
int as=std::accumulate(a,a+4, 0), bs=std::accumulate(b,b+4, 0);
as < bs ? std::cout << as : std::cout << bs;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_types.h:67,
from /usr/include/c++/14/numeric:61,
from a.cc:2:
/usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared
295 | template <typename _Tp, size_t = sizeof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared
984 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope
1451 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
63 | #include <bits/version.h>
+++ |+#include <cstddef>
64 |
/usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid
1451 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared
1453 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope
1454 | struct extent<_Tp[_Size], 0>
| ^~~~~
/usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid
1454 | struct extent<_Tp[_Size], 0>
| ^
/usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~
/usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid
1455 | : public integral_constant<size_t, _Size> { };
| ^
/usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid
/usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared
1457 | template<typename _Tp, unsigned _Uint, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope
1458 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid
1458 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope
1463 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid
1463 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type
1857 | { static constexpr size_t __size = sizeof(_Tp); };
| ^~~~~~
/usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~~~~
/usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~
/usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp'
1860 | struct __select;
| ^~~~~~~~
/usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared
1862 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^~~
/usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^
/usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared
1866 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^~~
/usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^
/usr/include/c++/14/type_traits:1868:18: error: '_Sz' was not declared in this scope
1868 | : __select<_Sz, _List<_UInts...>>
| ^~~
/usr/include/c++/14/type_traits:1868:38: error: template argument 1 is invalid
1868 | : __select<_Sz, _List<_UInts...>>
| ^~
/usr/include/c++/14/type_traits:1859:60: error: '__size' is not a member of 'std::__make_unsigned_selector_base::_List<unsigned char, short unsigned int, unsigned int, long unsigned int, long long unsigned int>'
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| |
s891487165 | p00433 | C++ | include <iostream>
#include <numeric>
int main() {
int a[4],b[4];
for(int i=0;i<4;i++) scanf("%d",&a[i]);
for(int i=0;i<4;i++) scanf("%d",&b[i]);
int as=std::accumulate(a,a+4, 0), bs=std::accumulate(b,b+4, 0);
as < bs ? std::cout << as : std::cout << bs;
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_iterator_base_types.h:67,
from /usr/include/c++/14/numeric:61,
from a.cc:2:
/usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared
295 | template <typename _Tp, size_t = sizeof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared
984 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid
985 | struct __is_array_known_bounds<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope
1451 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
63 | #include <bits/version.h>
+++ |+#include <cstddef>
64 |
/usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid
1451 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared
1453 | template<typename _Tp, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope
1454 | struct extent<_Tp[_Size], 0>
| ^~~~~
/usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid
1454 | struct extent<_Tp[_Size], 0>
| ^
/usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope
1455 | : public integral_constant<size_t, _Size> { };
| ^~~~~
/usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid
1455 | : public integral_constant<size_t, _Size> { };
| ^
/usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid
/usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared
1457 | template<typename _Tp, unsigned _Uint, size_t _Size>
| ^~~~~~
/usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope
1458 | struct extent<_Tp[_Size], _Uint>
| ^~~~~
/usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid
1458 | struct extent<_Tp[_Size], _Uint>
| ^
/usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope
1463 | : public integral_constant<size_t, 0> { };
| ^~~~~~
/usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid
1463 | : public integral_constant<size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type
1857 | { static constexpr size_t __size = sizeof(_Tp); };
| ^~~~~~
/usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~~~~
/usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| ^~~
/usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp'
1860 | struct __select;
| ^~~~~~~~
/usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared
1862 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^~~
/usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid
1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true>
| ^
/usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared
1866 | template<size_t _Sz, typename _Uint, typename... _UInts>
| ^~~~~~
/usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^~~
/usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid
1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
| ^
/usr/include/c++/14/type_traits:1868:18: error: '_Sz' was not declared in this scope
1868 | : __select<_Sz, _List<_UInts...>>
| ^~~
/usr/include/c++/14/type_traits:1868:38: error: template argument 1 is invalid
1868 | : __select<_Sz, _List<_UInts...>>
| ^~
/usr/include/c++/14/type_traits:1859:60: error: '__size' is not a member of 'std::__make_unsigned_selector_base::_List<unsigned char, short unsigned int, unsigned int, long unsigned int, long long unsigned int>'
1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)>
| |
s856825530 | p00433 | C++ | #include <iostream>
using namaspace std;
int main(void)
{
int a,b=0;
for (int c=0;c<4;c++){
cin>>a;
b=b+a;
}
c=0;
for (int d=0;d<4;d++){
cin>>a;
c=c+a;
}
if (a>b) cout<<a<<endl;
else cout<<b<<endl;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
2 | using namaspace std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:9: error: 'c' was not declared in this scope
10 | c=0;
| ^
a.cc:12:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | cin>>a;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | if (a>b) cout<<a<<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:15:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | if (a>b) cout<<a<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:16:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | else cout<<b<<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:16:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | else cout<<b<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s412445106 | p00433 | C++ | #include <iostream>
using namaspace std;
int main(void)
{
int a,b=0;
for (int c=0;c<4;c++){
cin>>a;
b=b+a;
}
c=0;
for (int d=0;d<4;d++){
cin>>a;
c=c+a;
}
if (c>b) cout<<c<<endl;
else cout<<b<<endl;
return 0;
}
| a.cc:2:7: error: expected nested-name-specifier before 'namaspace'
2 | using namaspace std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>a;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:9: error: 'c' was not declared in this scope
10 | c=0;
| ^
a.cc:12:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | cin>>a;
| ^~~
| std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | if (c>b) cout<<c<<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:15:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | if (c>b) cout<<c<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:16:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | else cout<<b<<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:16:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | else cout<<b<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s467788909 | p00433 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int a,b=0;
for (int c=0;c<4;c++){
cin>>a;
b=b+a;
}
c=0;
for (int d=0;d<4;d++){
cin>>a;
c=c+a;
}
if (c>b) cout<<c<<endl;
else cout<<b<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:9: error: 'c' was not declared in this scope
10 | c=0;
| ^
|
s971172926 | p00433 | C++ | #include<iostream>
using namespace std;
int i, p, sumA=0, sumB=0;
int main () {
for (i=1; i<=4; i++) {
cin >> p;
sumA += p;
}
for (i=1; i<=4; i++) {
cin >> p;
sumB += p;
}
cout < max(sumA,sumB) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:27: error: invalid operands of types 'const int' and '<unresolved overloaded function type>' to binary 'operator<<'
13 | cout < max(sumA,sumB) << endl;
| ~~~~~~~~~~~~~~~^~~~~~~
|
s771259362 | p00433 | C++ | #include <stdio.h>
int main(void){
int a,b,c,d;
int e,f,g,h;
scanf("%d %d %d %d",&a,&b,&c,&d);
scanf("%d %d %d %d",&e,&f,&g,&h);
if((a+b+c+d)>(e+f+g+h)){
printf("%d\n",a+b+c+d);
}else if((a+b+c+d)<(e+f+g+h)){
printf("%d\n",e+f+g+h);
}else if((a+b+c+d)==(e+f+g+h)){
printf("%d\n",a+b+c+d);
return 0;
}
| a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
19 | }
| ^
a.cc:3:15: note: to match this '{'
3 | int main(void){
| ^
|
s834836115 | p00433 | C++ | #include<iostream>
#using namespase std;
int main(
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
)
| a.cc:2:2: error: invalid preprocessing directive #using
2 | #using namespase std;
| ^~~~~
a.cc:5:16: error: 'b' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:19: error: 'c' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:22: error: 'd' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:25: error: 'e' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:28: error: 'f' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:31: error: 'g' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:34: error: 'h' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:37: error: 's' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:40: error: 't' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:41: error: expected ')' before ';' token
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
| )
a.cc:4:9: note: to match this '('
4 | int main(
| ^
a.cc:4:5: warning: second argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should be 'char **' [-Wmain]
4 | int main(
| ^~~~
a.cc:4:5: warning: third argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should probably be 'char **' [-Wmain]
a.cc:4:5: warning: 'int main(int, int, int, int, int, int, int, int, int, int)' takes only zero or two arguments [-Wmain]
a.cc:6:1: error: 'cin' does not name a type
6 | cin >> a >> b >> c >> d >> e >> f >> g >> h;
| ^~~
a.cc:8:1: error: 's' does not name a type
8 | s = a + b + c + d;
| ^
a.cc:9:1: error: 't' does not name a type; did you mean 'tm'?
9 | t = e + f + g + h;
| ^
| tm
a.cc:11:1: error: expected unqualified-id before 'if'
11 | if (s > t) {
| ^~
a.cc:14:1: error: expected unqualified-id before 'else'
14 | else {
| ^~~~
a.cc:18:9: error: expected unqualified-id before 'return'
18 | return 0;
| ^~~~~~
a.cc:19:1: error: expected unqualified-id before ')' token
19 | )
| ^
|
s432714087 | p00433 | C++ | #include<iostream>
#using namespase std;
int main(
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d;
cin >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
)
| a.cc:2:2: error: invalid preprocessing directive #using
2 | #using namespase std;
| ^~~~~
a.cc:5:16: error: 'b' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:19: error: 'c' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:22: error: 'd' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:25: error: 'e' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:28: error: 'f' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:31: error: 'g' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:34: error: 'h' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:37: error: 's' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:40: error: 't' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:41: error: expected ')' before ';' token
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
| )
a.cc:4:9: note: to match this '('
4 | int main(
| ^
a.cc:4:5: warning: second argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should be 'char **' [-Wmain]
4 | int main(
| ^~~~
a.cc:4:5: warning: third argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should probably be 'char **' [-Wmain]
a.cc:4:5: warning: 'int main(int, int, int, int, int, int, int, int, int, int)' takes only zero or two arguments [-Wmain]
a.cc:6:1: error: 'cin' does not name a type
6 | cin >> a >> b >> c >> d;
| ^~~
a.cc:7:1: error: 'cin' does not name a type
7 | cin >> e >> f >> g >> h;
| ^~~
a.cc:9:1: error: 's' does not name a type
9 | s = a + b + c + d;
| ^
a.cc:10:1: error: 't' does not name a type; did you mean 'tm'?
10 | t = e + f + g + h;
| ^
| tm
a.cc:12:1: error: expected unqualified-id before 'if'
12 | if (s > t) {
| ^~
a.cc:15:1: error: expected unqualified-id before 'else'
15 | else {
| ^~~~
a.cc:19:9: error: expected unqualified-id before 'return'
19 | return 0;
| ^~~~~~
a.cc:20:1: error: expected unqualified-id before ')' token
20 | )
| ^
|
s156123114 | p00433 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s685794752 | p00433 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s852280453 | p00433 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s314453270 | p00433 | C++ | #include<iostream>
using namespase std;
int main(
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d;
cin >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
)
| a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc:5:16: error: 'b' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:19: error: 'c' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:22: error: 'd' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:25: error: 'e' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:28: error: 'f' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:31: error: 'g' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:34: error: 'h' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:37: error: 's' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:40: error: 't' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:41: error: expected ')' before ';' token
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
| )
a.cc:4:9: note: to match this '('
4 | int main(
| ^
a.cc:4:5: warning: second argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should be 'char **' [-Wmain]
4 | int main(
| ^~~~
a.cc:4:5: warning: third argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should probably be 'char **' [-Wmain]
a.cc:4:5: warning: 'int main(int, int, int, int, int, int, int, int, int, int)' takes only zero or two arguments [-Wmain]
a.cc:6:1: error: 'cin' does not name a type
6 | cin >> a >> b >> c >> d;
| ^~~
a.cc:7:1: error: 'cin' does not name a type
7 | cin >> e >> f >> g >> h;
| ^~~
a.cc:9:1: error: 's' does not name a type
9 | s = a + b + c + d;
| ^
a.cc:10:1: error: 't' does not name a type; did you mean 'tm'?
10 | t = e + f + g + h;
| ^
| tm
a.cc:12:1: error: expected unqualified-id before 'if'
12 | if (s > t) {
| ^~
a.cc:15:1: error: expected unqualified-id before 'else'
15 | else {
| ^~~~
a.cc:19:9: error: expected unqualified-id before 'return'
19 | return 0;
| ^~~~~~
a.cc:20:1: error: expected unqualified-id before ')' token
20 | )
| ^
|
s002725030 | p00433 | C++ | #include<iostream>
usingnamespase std;
int main(
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d;
cin >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
)
| a.cc:2:1: error: 'usingnamespase' does not name a type
2 | usingnamespase std;
| ^~~~~~~~~~~~~~
a.cc:5:16: error: 'b' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:19: error: 'c' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:22: error: 'd' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:25: error: 'e' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:28: error: 'f' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:31: error: 'g' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:34: error: 'h' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:37: error: 's' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:40: error: 't' has not been declared
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
a.cc:5:41: error: expected ')' before ';' token
5 | int a, b, c, d, e, f, g, h, s, t;
| ^
| )
a.cc:4:9: note: to match this '('
4 | int main(
| ^
a.cc:4:5: warning: second argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should be 'char **' [-Wmain]
4 | int main(
| ^~~~
a.cc:4:5: warning: third argument of 'int main(int, int, int, int, int, int, int, int, int, int)' should probably be 'char **' [-Wmain]
a.cc:4:5: warning: 'int main(int, int, int, int, int, int, int, int, int, int)' takes only zero or two arguments [-Wmain]
a.cc:6:1: error: 'cin' does not name a type
6 | cin >> a >> b >> c >> d;
| ^~~
a.cc:7:1: error: 'cin' does not name a type
7 | cin >> e >> f >> g >> h;
| ^~~
a.cc:9:1: error: 's' does not name a type
9 | s = a + b + c + d;
| ^
a.cc:10:1: error: 't' does not name a type; did you mean 'tm'?
10 | t = e + f + g + h;
| ^
| tm
a.cc:12:1: error: expected unqualified-id before 'if'
12 | if (s > t) {
| ^~
a.cc:15:1: error: expected unqualified-id before 'else'
15 | else {
| ^~~~
a.cc:19:9: error: expected unqualified-id before 'return'
19 | return 0;
| ^~~~~~
a.cc:20:1: error: expected unqualified-id before ')' token
20 | )
| ^
|
s103858859 | p00433 | C++ | #include<iostream>
using namespase std;
int main() {
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d;
cin >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
}
| a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b >> c >> d;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:13:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout << s << 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:13:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
13 | cout << s << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:16:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
16 | cout << t << 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:16:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | cout << t << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s028554919 | p00433 | C++ | #include<iostream>
using namespase std;
int main() {
int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d >> e >> f >> g >> h;
s = a + b + c + d;
t = e + f + g + h;
if (s > t) {
cout << s << endl;
}
else {
cout << t << endl;
}
return 0;
}
| a.cc:2:7: error: expected nested-name-specifier before 'namespase'
2 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin >> a >> b >> c >> d >> e >> f >> g >> h;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:12:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout << s << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:12:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout << s << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:15:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
15 | cout << t << 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:15:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
15 | cout << t << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s565286905 | p00433 | C++ | using namespace std;
int p[7];
int main(){
for(int i=0;i<8;i++)cin>>p[i],p[i]+=(i>1&&i%4?p[i-1]:0);
cout<<(p[3]>?p[7])<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:29: error: 'cin' was not declared in this scope
4 | for(int i=0;i<8;i++)cin>>p[i],p[i]+=(i>1&&i%4?p[i-1]:0);
| ^~~
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:5:9: error: 'cout' was not declared in this scope
5 | cout<<(p[3]>?p[7])<<endl;
| ^~~~
a.cc:5:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:5:21: error: expected primary-expression before '?' token
5 | cout<<(p[3]>?p[7])<<endl;
| ^
a.cc:5:26: error: expected ':' before ')' token
5 | cout<<(p[3]>?p[7])<<endl;
| ^
| :
a.cc:5:26: error: expected primary-expression before ')' token
a.cc:5:29: error: 'endl' was not declared in this scope
5 | cout<<(p[3]>?p[7])<<endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
|
s356939778 | p00433 | C++ | #include<iostream>
int main() {
int a[4],b[4];
std::cin>>a[0]>>a[1]>>a[2]>>a[3];
std::cin>>b[0]>>b[1]>>b[2]>>b[3];
int i,j;
if((i=a[0]+a[1]+a[2]+a[3]) >= (j=b[0]+b[1]+b[2]+b[3])) {
std::cout<<i;
}else{
std::cout<<j<<endl;
}
} | a.cc: In function 'int main()':
a.cc:10:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | std::cout<<j<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s606062565 | p00433 | C++ | a,b,c;main(i)
{
scanf("%d",&c);
(i<5?a:b)+=c;
i-8?main(i+1):printf("%d\n",a>b?a:b);
} | a.cc:1:1: error: 'a' does not name a type
1 | a,b,c;main(i)
| ^
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
1 | a,b,c;main(i)
| ^
|
s658075484 | p00433 | C++ | #include<iostram>
#include<algorithm>
using namespace std;
int main(){
int a[2][4];
for(int i=0;i<2;i++)for(int j=0;j<4;j++)
scanf("%d",&a[i][j]);
for(int i=1;i<4;i++){
a[0][0]+=a[0][i];
a[1][0]+=a[1][i];
}
printf("%d\n",max(a[0][0],a[1][0]));
} | a.cc:1:9: fatal error: iostram: No such file or directory
1 | #include<iostram>
| ^~~~~~~~~
compilation terminated.
|
s153164393 | p00433 | C++ | #include<iostream>
using std::cout;
using std::cin;
int main(){
int tmp,S=0,T=0;
for(int i9; i<4; i++){
cin >> tmp;
S+=tmp;
}
for(int i9; i<4; i++){
cin >> tmp;
T+=tmp;
}
if(S>T)
cout << S << endl;
else
cout << T << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:21: error: 'i' was not declared in this scope; did you mean 'i9'?
7 | for(int i9; i<4; i++){
| ^
| i9
a.cc:11:21: error: 'i' was not declared in this scope; did you mean 'i9'?
11 | for(int i9; i<4; i++){
| ^
| i9
a.cc:16:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
16 | cout << S << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:18:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
18 | cout << T << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s127591513 | p00433 | C++ | #include<iostream>
using std::cout;
using std::cin;
using std::endl;
int main(){
int tmp,S=0,T=0;
for(int i9; i<4; i++){
cin >> tmp;
S+=tmp;
}
for(int i9; i<4; i++){
cin >> tmp;
T+=tmp;
}
if(S>T)
cout << S << endl;
else
cout << T << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:21: error: 'i' was not declared in this scope; did you mean 'i9'?
8 | for(int i9; i<4; i++){
| ^
| i9
a.cc:12:21: error: 'i' was not declared in this scope; did you mean 'i9'?
12 | for(int i9; i<4; i++){
| ^
| i9
|
s608867424 | p00433 | C++ | #include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
int main() {
int a, b, c, d;
int max = 0;
for (int i = 0; i < 2; ++i) {
cin >> a >> b >> c >> d;
int sum = a + b + c + d;
if (sum > max) sum = max;
}
cout << sum << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:17: error: 'sum' was not declared in this scope
15 | cout << sum << endl;
| ^~~
|
s306869970 | p00433 | C++ | #include <iostream>
using namespace std;
int main() {
cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
atot = a1 + a2 + a3 + a4;
btot = b1 + b2 + b3 + b4;
if( atot > btot)
cout << atot << endl;
else
cout << btot << endl;
} | a.cc: In function 'int main()':
a.cc:5:10: error: 'a1' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:16: error: 'a2' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:22: error: 'a3' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:28: error: 'a4' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:34: error: 'b1' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:40: error: 'b2' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:46: error: 'b3' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:5:52: error: 'b4' was not declared in this scope
5 | cin >> a1 >> a2 >> a3 >> a4 >> b1 >> b2 >> b3 >> b4;
| ^~
a.cc:6:3: error: 'atot' was not declared in this scope; did you mean 'atol'?
6 | atot = a1 + a2 + a3 + a4;
| ^~~~
| atol
a.cc:7:3: error: 'btot' was not declared in this scope
7 | btot = b1 + b2 + b3 + b4;
| ^~~~
|
s506851542 | p00433 | C++ | ////////////////////////////
//情報オリンピック過去問////
//Score ////
//AOJ 0510 ////
////////////////////////////
/*
*設問解説
*情報・数学・理科・英語のAさんBさんの合計得点
*のうち大きい方を出力
*同点の場合は、どちらか片方を出力
*/
include<cstdio>
using namespace std;
int main(){
int aa,ab,ac,ad;
int ba,bb,bc,bd;
int asum,bsum,abmax;
scanf("%d %d %d %d",&aa,&ab,&ac,&ad);
scanf("%d %d %d %d",&ba,&bb,&bc,&bd);
asum=aa+ab+ac+ad; bsum=ba+bb+bc+bd;
if(asum>=bsum){
abmax=asum;
}else{
abmax=bsum;
}
printf("%d",abmax);
return 0;
}
//end
/////////////////////////////////////////////
//解き方 //
// intで四科目おく //
// intでaとbの得点を置く //
// intで最高点を置く //
// ifでabの大小を考えて //
// 最高点に代入 //
// 最高点をprintfで出力 //
// 簡単! //
///////////////////////////////////////////// | a.cc:14:1: error: 'include' does not name a type
14 | include<cstdio>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:22:9: error: 'scanf' was not declared in this scope
22 | scanf("%d %d %d %d",&aa,&ab,&ac,&ad);
| ^~~~~
a.cc:33:9: error: 'printf' was not declared in this scope
33 | printf("%d",abmax);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | ////////////////////////////
|
s816029065 | p00433 | C++ | ////////////////////////////
//情報オリンピック過去問////
//Score ////
//AOJ 0510 ////
////////////////////////////
/*
*設問解説
*情報・数学・理科・英語のAさんBさんの合計得点
*のうち大きい方を出力
*同点の場合は、どちらか片方を出力
*/
#include<cstdio>
using namespace std;
int main(){
int aa,ab,ac,ad;
int ba,bb,bc,bd;
int asum,bsum,abmax;
scanf("%d %d %d %d",&aa,&ab,&ac,&ad);
scanf("%d %d %d %d",&ba,&bb,&bc,&bd);
asum=aa+ab+ac+ad; bsum=ba+bb+bc+bd;
if(asum => bsum){
abmax=asum;
}else{
abmax=bsum;
}
printf("%d",abmax);
return 0;
}
//end
/////////////////////////////////////////////
//解き方 //
// intで四科目おく //
// intでaとbの得点を置く //
// intで最高点を置く //
// ifでabの大小を考えて //
// 最高点に代入 //
// 最高点をprintfで出力 //
// 簡単! //
///////////////////////////////////////////// | a.cc: In function 'int main()':
a.cc:27:18: error: expected primary-expression before '>' token
27 | if(asum => bsum){
| ^
|
s309959655 | p00433 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>
using namespace std;
inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1 << 30;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
bool leap(int y)
{
return ((y%4==0&&y%100!=0)||y%400==0);
}
#define debug(a, b, c) for(int i = 0; i < b; i++){for(int j = 0; j < c; j++){printf("%3d", a[i][j]);}puts("");}puts("-----------------------------------------");
int main()
{
int a = 0, b = 0, wk;
while(cin >> wk)
{
a += wk;
for(int i = 0; i < 4; i++)
{
cin >> wk;
a += wk;
}
for(int j = 0; j < 4; j++)
{
cin >> wk;
b += wk;
}
if(a == b)
printf("S");
else
printf("%d", (a > b)? a: b);
wk = 0
}
} | a.cc: In function 'int main()':
a.cc:62:31: error: expected ';' before '}' token
62 | wk = 0
| ^
| ;
63 | }
| ~
|
s464300553 | p00433 | C++ | #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>
using namespace std;
inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}
typedef pair<int, int> P;
typedef long long ll;
const int INF = 1 << 30;
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int month[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
bool leap(int y)
{
return ((y%4==0&&y%100!=0)||y%400==0);
}
#define debug(a, b, c) for(int i = 0; i < b; i++){for(int j = 0; j < c; j++){printf("%3d", a[i][j]);}puts("");}puts("-----------------------------------------");
int main()
{
int a = 0, b = 0, wk;
while(cin >> wk)
{
a += wk;
for(int i = 0; i < 4; i++)
{
cin >> wk;
a += wk;
}
for(int j = 0; j < 4; j++)
{
cin >> wk;
b += wk;
}
if(a == b)
printf("S");
else
printf("%d", (a > b)? a: b);
wk = 0
}
} | a.cc: In function 'int main()':
a.cc:62:31: error: expected ';' before '}' token
62 | wk = 0
| ^
| ;
63 | }
| ~
|
s536684621 | p00433 | C++ | #include<cstdio>
#include<algorithm>
#include<iostream>
#include<cstring>
using namespace std;
int point,a,b;
int main (){
a=0;
b=0;
for(int i=0;i<4;i++){
scanf("%d"&point);
a = a + point;
}
for(int i=0;i<4;i++){
scanf("%d"&point);
b = b + point;
}
if(a>b){
printf("%d",a)
}
else{
printf("%d",b)
}
} | a.cc: In function 'int main()':
a.cc:13:13: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
13 | scanf("%d"&point);
| ~~~~^~~~~~
| | |
| | int
| const char [3]
a.cc:18:15: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
18 | scanf("%d"&point);
| ~~~~^~~~~~
| | |
| | int
| const char [3]
a.cc:23:19: error: expected ';' before '}' token
23 | printf("%d",a)
| ^
| ;
24 | }
| ~
a.cc:26:19: error: expected ';' before '}' token
26 | printf("%d",b)
| ^
| ;
27 | }
| ~
|
s633444474 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cin >>a[0]>>a[1]>>a[2]>>a[3];
cin >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high=asum;
if (bsum>asum) high = bsum;
cout<<high<<\n;
return 0;
} | a.cc:39:21: error: stray '\' in program
39 | cout<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cin' was not declared in this scope
30 | cin >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~
a.cc:17:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:39:9: error: 'cout' was not declared in this scope
39 | cout<<high<<\n;
| ^~~~
a.cc:39:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:22: error: 'n' was not declared in this scope
39 | cout<<high<<\n;
| ^
|
s541679047 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cout >>a[0]>>a[1]>>a[2]>>a[3];
cout >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high=asum;
if (bsum>asum) high = bsum;
cin<<high<<\n;
return 0;
} | a.cc:39:20: error: stray '\' in program
39 | cin<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cout' was not declared in this scope
30 | cout >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:39:9: error: 'cin' was not declared in this scope
39 | cin<<high<<\n;
| ^~~
a.cc:39:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:21: error: 'n' was not declared in this scope
39 | cin<<high<<\n;
| ^
|
s969249132 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cout >>a[0]>>a[1]>>a[2]>>a[3];
cout >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high=asum;
if (bsum>asum) {high = bsum;}
cin<<high<<\n;
return 0;
} | a.cc:39:20: error: stray '\' in program
39 | cin<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cout' was not declared in this scope
30 | cout >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:39:9: error: 'cin' was not declared in this scope
39 | cin<<high<<\n;
| ^~~
a.cc:39:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:21: error: 'n' was not declared in this scope
39 | cin<<high<<\n;
| ^
|
s809934225 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cout >>a[0]>>a[1]>>a[2]>>a[3];
cout >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high
high=asum;
if (bsum>asum) {high = bsum;}
cin<<high<<\n;
return 0;
} | a.cc:41:20: error: stray '\' in program
41 | cin<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cout' was not declared in this scope
30 | cout >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:38:9: error: expected initializer before 'high'
38 | high=asum;
| ^~~~
a.cc:39:25: error: 'high' was not declared in this scope
39 | if (bsum>asum) {high = bsum;}
| ^~~~
a.cc:41:9: error: 'cin' was not declared in this scope
41 | cin<<high<<\n;
| ^~~
a.cc:41:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:14: error: 'high' was not declared in this scope
41 | cin<<high<<\n;
| ^~~~
a.cc:41:21: error: 'n' was not declared in this scope
41 | cin<<high<<\n;
| ^
|
s999495432 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cin >>a[0]>>a[1]>>a[2]>>a[3];
cin >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high
high=asum;
if (bsum>asum) {high = bsum;}
cout<<high<<\n;
return 0;
} | a.cc:41:21: error: stray '\' in program
41 | cout<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cin' was not declared in this scope
30 | cin >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~
a.cc:17:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:38:9: error: expected initializer before 'high'
38 | high=asum;
| ^~~~
a.cc:39:25: error: 'high' was not declared in this scope
39 | if (bsum>asum) {high = bsum;}
| ^~~~
a.cc:41:9: error: 'cout' was not declared in this scope
41 | cout<<high<<\n;
| ^~~~
a.cc:41:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:15: error: 'high' was not declared in this scope
41 | cout<<high<<\n;
| ^~~~
a.cc:41:22: error: 'n' was not declared in this scope
41 | cout<<high<<\n;
| ^
|
s464122685 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cin >>a[0]>>a[1]>>a[2]>>a[3];
cin >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high;
high=asum;
if (bsum>asum) {high = bsum;}
cout<<high<<\n;
return 0;
} | a.cc:41:21: error: stray '\' in program
41 | cout<<high<<\n;
| ^
a.cc:20:9: error: 'paair' does not name a type
20 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:30:9: error: 'cin' was not declared in this scope
30 | cin >>a[0]>>a[1]>>a[2]>>a[3];
| ^~~
a.cc:17:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
16 | #include<cstdio>
+++ |+#include <iostream>
17 | #include<vector>
a.cc:41:9: error: 'cout' was not declared in this scope
41 | cout<<high<<\n;
| ^~~~
a.cc:41:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:41:22: error: 'n' was not declared in this scope
41 | cout<<high<<\n;
| ^
|
s843321381 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef paair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cin >>a[0]>>a[1]>>a[2]>>a[3];
cin >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high;
high=asum;
if (bsum>asum) {high = bsum;}
cout<<high<<\n;
return 0;
} | a.cc:42:21: error: stray '\' in program
42 | cout<<high<<\n;
| ^
a.cc:21:9: error: 'paair' does not name a type
21 | typedef paair<int,int> P;
| ^~~~~
a.cc: In function 'int main()':
a.cc:42:22: error: 'n' was not declared in this scope
42 | cout<<high<<\n;
| ^
|
s720306800 | p00433 | C++ | /*
AOJ 0510 JOI yo 2005 2006 1 Score
*/
//ミスを防ぐためにまずは基本のIncludeをすべて格納する
#include<fstream>
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<vector>
#define INF (1<<21)
using namespace std;
typedef pair<int,int> P;
//ここまで基本型、多少の変更はあるけどまあいける
int main()
{
int a[4],b[4];
int asum,bsum;
cin >>a[0]>>a[1]>>a[2]>>a[3];
cin >>b[0]>>b[1]>>b[2]>>b[3];
asum=a[0]+a[1]+a[2]+a[3];
bsum=b[0]+b[1]+b[2]+b[3];
int high;
high=asum;
if (bsum>asum) {high = bsum;}
cout<<high<<\n;
return 0;
} | a.cc:42:21: error: stray '\' in program
42 | cout<<high<<\n;
| ^
a.cc: In function 'int main()':
a.cc:42:22: error: 'n' was not declared in this scope
42 | cout<<high<<\n;
| ^
|
s873910430 | p00433 | C++ | #include <cstdio>
int main()
{
int s = 0, t = 0, temp;
for(int i = 0; i < 4; ++i) {
scanf("%d", &temp);
s += temp;
}
for(int i = 0; i < 4; ++i) {
scanf("%d", &temp);
t += temp;
printf("%d\n", max(s, t));
return 0;
} | a.cc: In function 'int main()':
a.cc:13:16: error: 'max' was not declared in this scope
13 | printf("%d\n", max(s, t));
| ^~~
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s500430717 | p00433 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int main(){int s = 0, t = 0, temp;for(int i = 0; i < 4; ++i) {scanf("%d", &temp);s += temp;}for(int i = 0; i < 4; ++i) {scanf("%d", &temp);t += temp;printf("%d\n", max(s, t));return 0;} | a.cc: In function 'int main()':
a.cc:5:186: error: expected '}' at end of input
5 | int main(){int s = 0, t = 0, temp;for(int i = 0; i < 4; ++i) {scanf("%d", &temp);s += temp;}for(int i = 0; i < 4; ++i) {scanf("%d", &temp);t += temp;printf("%d\n", max(s, t));return 0;}
| ~ ^
|
s706517500 | p00433 | C++ | #include<stdio.h>
#include<math.h>
int a,b,c;main(){for(;scanf("%d",&a);b+=a);for(;scanf("%d",&a);c+=a);printf("%d",max(b,c));} | a.cc:3:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | int a,b,c;main(){for(;scanf("%d",&a);b+=a);for(;scanf("%d",&a);c+=a);printf("%d",max(b,c));}
| ^~~~
a.cc: In function 'int main()':
a.cc:3:82: error: 'max' was not declared in this scope; did you mean 'std::max'?
3 | int a,b,c;main(){for(;scanf("%d",&a);b+=a);for(;scanf("%d",&a);c+=a);printf("%d",max(b,c));}
| ^~~
| std::max
In file included from /usr/include/c++/14/bits/specfun.h:43,
from /usr/include/c++/14/cmath:3906,
from /usr/include/c++/14/math.h:36,
from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: 'std::max' declared here
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
|
s171237083 | p00433 | C++ | #include <stdio.h>
a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);} | a.cc:2:1: error: 'a' does not name a type
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:21: error: 'i' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:41: error: 'a' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:44: error: 'b' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:68: error: 'a' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:71: error: 'c' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:91: error: 'b' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:93: error: 'c' was not declared in this scope
2 | a,b,c,i;main(){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
|
s896769889 | p00433 | C++ | #include <stdio.h>
main(a,b,c,i){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);} | a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(a,b,c,i){for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
|
s447045510 | p00433 | C++ | #include <stdio.h>
int a,b,c,i;main();{for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);} | a.cc:2:19: error: expected constructor, destructor, or type conversion before ';' token
2 | int a,b,c,i;main();{for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
a.cc:2:20: error: expected unqualified-id before '{' token
2 | int a,b,c,i;main();{for(;i<4;i++,scanf("%d",&a),b+=a);for(;~scanf("%d",&a);c+=a);printf("%d\n",b>c?b:c);}
| ^
|
s676195999 | p00433 | C++ | #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <conio.h>
using namespace std;
int main(){
int tmp1,tmp2;
int a=0,b=0;
for(int i=0; i<4; ++i){
cin >> tmp1;
a += tmp1;
}
for(int i=0; i,4; ++i){
cin >> tmp2;
b += tmp2;
}
if(a >= b){
cout << a << endl;
} else if(b > a){
cout << b << endl;
}
return 0;
} | a.cc:7:10: fatal error: conio.h: No such file or directory
7 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s740269760 | p00433 | C++ | #include <studio.h>
int q,w,e,r,t,y,u,i;
scanf("%d%d%d%d",&q,&w,&e,&r);
scanf("%d%d%d%d",&t,&y,&u,&i);
printf("%d",(q+w+e+r>=t+y+u+i?q+w+e+r:t+y+u+i)); | a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s230397551 | p00433 | C++ | #include <studio.h>
int q,w,e,r,t,y,u,i; | a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s743399071 | p00433 | C++ | #include <studio.h>
int main(){
int q,w,e,r,t,y,u,i;
scanf("%d%d%d%d",&q,&w,&e,&r);
scanf("%d%d%d%d",&t,&y,&u,&i);
printf("%d",(q+w+e+r>=t+y+u+i?q+w+e+r:t+y+u+i));
return 0;
} | a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h>
| ^~~~~~~~~~
compilation terminated.
|
s247212142 | p00433 | C++ | /*#include <studio.h>
int main(){
int q,w,e,r,t,y,u,i;
scanf("%d%d%d%d",&q,&w,&e,&r);
scanf("%d%d%d%d",&t,&y,&u,&i);
printf("%d",(q+w+e+r>=t+y+u+i?q+w+e+r:t+y+u+i));
return 0;
}*/
#include <studio.h> int main() { printf("Hello!"); return 0; } | a.cc:13:21: warning: extra tokens at end of #include directive
13 | #include <studio.h> int main() { printf("Hello!"); return 0; }
| ^~~
a.cc:13:10: fatal error: studio.h: No such file or directory
13 | #include <studio.h> int main() { printf("Hello!"); return 0; }
| ^~~~~~~~~~
compilation terminated.
|
s864746564 | p00433 | C++ | #include <studio.h> int main() { printf("Hello!"); return 0; } | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <studio.h> int main() { printf("Hello!"); return 0; }
| ^~~
a.cc:1:10: fatal error: studio.h: No such file or directory
1 | #include <studio.h> int main() { printf("Hello!"); return 0; }
| ^~~~~~~~~~
compilation terminated.
|
s309549195 | p00433 | C++ | #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main() { printf("Hello!"); return 0; } #include <studio.h> int main |
s268782409 | p00433 | C++ | int main()
{
int a, b, c, d;
int sum = 0;
std::cin >> a >> b >> c >> d;
sum = a + b + c + d;
std::cin >> a >> b >> c >> d;
if(sum < (a + b + c + d)){
std::cout << (a + b + c + d) << std::endl;
}
else{
std::cout << sum << std::endl;
}
} | a.cc: In function 'int main()':
a.cc:5:10: error: 'cin' is not a member of 'std'
5 | std::cin >> a >> b >> c >> d;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | int main()
a.cc:7:10: error: 'cin' is not a member of 'std'
7 | std::cin >> a >> b >> c >> d;
| ^~~
a.cc:7:10: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:14: error: 'cout' is not a member of 'std'
9 | std::cout << (a + b + c + d) << std::endl;
| ^~~~
a.cc:9:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:47: error: 'endl' is not a member of 'std'
9 | std::cout << (a + b + c + d) << std::endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | int main()
a.cc:12:14: error: 'cout' is not a member of 'std'
12 | std::cout << sum << std::endl;
| ^~~~
a.cc:12:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:34: error: 'endl' is not a member of 'std'
12 | std::cout << sum << std::endl;
| ^~~~
a.cc:12:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.