submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s129389893 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
if(A=>2&&B=>2){
if(A>B){
cout << "Alice" << endl;
}
else if(A==B){
cout << "Draw" << endl;
}
else{
cout << "Bob" << endl;
}
}
else if(A==1){
if(B==1){
cout << "Draw" << endl;
}
else{
cout << "Alice" << endl;
}
}
else if(B==1){
if(A!=1){
cout << "Bob" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before '>' token
7 | if(A=>2&&B=>2){
| ^
a.cc:7:14: error: expected primary-expression before '>' token
7 | if(A=>2&&B=>2){
| ^
|
s585168423 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
if(A>=2&&>=2){
if(A>B){
cout << "Alice" << endl;
}
else if(A==B){
cout << "Draw" << endl;
}
else{
cout << "Bob" << endl;
}
}
else if(A==1){
if(B==1){
cout <<< "Draw" << endl;
}
else{
cout << "Alice" << endl;
}
}
else if(B==1){
if(A!=1){
cout << "Bob" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:7:12: error: expected primary-expression before '>=' token
7 | if(A>=2&&>=2){
| ^~
a.cc:20:14: error: expected primary-expression before '<' token
20 | cout <<< "Draw" << endl;
| ^
a.cc:20:23: error: invalid operands of types 'const char [5]' and '<unresolved overloaded function type>' to binary 'operator<<'
20 | cout <<< "Draw" << endl;
| ~~~~~~~^~~~~~~
|
s029116156 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
if(A=>2&&B=>2){
if(A>B){
cout << "Alice" << endl;
}
else if(A==B){
cout << "Draw" << endl;
}
else{
cout << "Bob" << endl;
}
}
else if(A==1){
if(B==1){
cout <<< "Draw" << endl;
}
else{
cout << "Alice" << endl;
}
}
else if(B==1){
if(A!=1){
cout << "Bob" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before '>' token
7 | if(A=>2&&B=>2){
| ^
a.cc:7:14: error: expected primary-expression before '>' token
7 | if(A=>2&&B=>2){
| ^
a.cc:20:14: error: expected primary-expression before '<' token
20 | cout <<< "Draw" << endl;
| ^
a.cc:20:23: error: invalid operands of types 'const char [5]' and '<unresolved overloaded function type>' to binary 'operator<<'
20 | cout <<< "Draw" << endl;
| ~~~~~~~^~~~~~~
|
s573413081 | p03803 | C++ | #include<bits/stdc++.h>
#include<algorithm>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define revp(i,a,b) for(int i=b;i>=a;i--)
int a,b;
int main()
{
cin>>a>>b;
if(a>b and b!=1 || a==1)
cout<<"Alice";
else if(b>a and a!=1 || b==1)
cout<<"Bob";
else if(a==b)
cout<<"Draw";
else if(a==b)
}
| a.cc: In function 'int main()':
a.cc:21:1: error: expected primary-expression before '}' token
21 | }
| ^
|
s014943453 | p03803 | C++ | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define DEC(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
typedef long long ll;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const ll LINF = (int)1e18;
const double EPS = 1e-9;
signed main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int a, b;
cin >> a >> b;
if (a == 1) a = 14;
if (b == 1) b = 14;
cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
return 0;
}
| a.cc: In function 'int main()':
a.cc:24:13: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'long long int')
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ~~~~~~~~~ ^ ~
| | |
| | long long int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:24:13: note: candidate: 'operator>(int, long long int)' (built-in)
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ~~~~~~~~~~^~~
a.cc:24:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h: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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view: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:24:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/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:24:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | cout << a > b ? "Alice" : (a < b ? "Bob" : "Draw");
| ^
/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> >, |
s170543346 | p03803 | C++ | #include <bits/stdc++.h>
#define int long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define DEC(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define ALL(obj) (obj).begin(), (obj).end()
#define debug(x) cerr << #x << ": " << x << '\n'
using namespace std;
typedef long long ll;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const ll LINF = (int)1e18;
const double EPS = 1e-9;
signed main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
int a, b;
cin >> a >> b;
if (a == 1) a = 14;
if (b == 1) b = 14;
cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
return 0;
} | a.cc: In function 'int main()':
a.cc:24:13: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'long long int')
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ~~~~~~~~~ ^ ~
| | |
| | long long int
| std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
a.cc:24:13: note: candidate: 'operator>(int, long long int)' (built-in)
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ~~~~~~~~~~^~~
a.cc:24:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'long long int'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h: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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/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:24:15: note: 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view: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:24:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/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:24:15: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | cout << a > b ? "Alice" : (a < b) ? "Bob" : "Draw";
| ^
/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> >, |
s248238375 | p03803 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
if(a>b){
System.out.println("Alice");
}else if(a==b){
System.out.println("Draw");
}else{
System.out.println("Bob");
}
}
| Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s169827176 | p03803 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
if(a>b){
System.out.println("Alice");
}else if(a==b){
System.out.println("Draw");
}else{
System.out.println("Bob");
}
}
| Main.java:15: error: reached end of file while parsing
}
^
1 error
|
s862706469 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A>B && A!=2){
cout<<"Alice"<<endl;
}
else if(A==2 &&B!=2){
cout<<"Bob"<<endl;
}
else if(A!=2 &&B==2){
cout<<"Alice"<<endl;
}
else if(B>A &&B!=2){
cout<<"Bob"<<endl;
}
else if(A==B){
cout<<"Draw"<<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:21:19: error: expected primary-expression before '<' token
21 | cout<<"Draw"<<<endl;
| ^
|
s066277561 | p03803 | C++ | a,b=map(int,input().split())
if a==b:
print("Draw")
elif a==1 or (a>b and b!=1):
print("Alice")
else:
print("Bob") | a.cc:1:1: error: 'a' does not name a type
1 | a,b=map(int,input().split())
| ^
|
s155747853 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) v.rbegin(),v.rend()
typedef long long ll;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//isPrime
//modpow modinv
//getDigit
int main() {
cout << fixed << setprecision(10);
int a,b;
cin >> a >> b;
if(a==1) a+=13;
if(b==1) b+=13
if(a==b){
cout << "Draw" << endl;
}else if(a>b){
cout << "Alice" << endl;
}else{
cout << "Bob" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:20:17: error: expected ';' before 'if'
20 | if(b==1) b+=13
| ^
| ;
21 | if(a==b){
| ~~
|
s379729654 | p03803 | C++ | A, B = list(map(int, input().split()))
if A == 1:
A = 14
if B == 1:
B = 14
if A > B:
print("Alice")
elif A == B:
print("Draw")
else:
print("Bob")
| a.cc:1:1: error: 'A' does not name a type
1 | A, B = list(map(int, input().split()))
| ^
|
s703328832 | p03803 | C++ | #include <bits/stdc++.h>
int main(){
int a,b;
std::cin>>a>>b;
a=a==1?14:a;
b=b==1?14:b;
std::string str[3] = {"Alice", "Drow", "Bob"};
std::string* ans = &str[1];
std::cout<<ans[a<=>b] << std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before '>' token
9 | std::cout<<ans[a<=>b] << std::endl;
| ^
|
s609984324 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
using P = pair<int,int>;
using ll = long long;
static const int INF = 1000000000;
static const ll MOD = 1000000007;
ll gcd(ll a, ll b){return b!=0 ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}
int main(){
const int[] card = {13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
int a, b;
cin >> a >> b;
if(card[a-1] < card[b-1]){
cout << "Bob" << endl;
}
else if(card[a-1] > card[b-1]){
cout << "Alice" << endl;
}
else{
cout << "Draw" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:18: error: structured binding declaration cannot have type 'const int'
13 | const int[] card = {13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
| ^~
a.cc:13:18: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:18: error: empty structured binding declaration
a.cc:13:21: error: expected initializer before 'card'
13 | const int[] card = {13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
| ^~~~
a.cc:16:12: error: 'card' was not declared in this scope
16 | if(card[a-1] < card[b-1]){
| ^~~~
|
s087274699 | p03803 | C++ | #include <bits/stdc++.h>
main() {
int64_t a, b;
cin >> a >> b;
a = (a + 11) % 13;
b = (b + 11) % 13;
if (a > b) {
cout << "Alice" << endl;
} else if (a < b) {
cout << "Bob" << endl;
} else {
cout << "Draw" << endl;
}
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << "Alice" << 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:10:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << "Alice" << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
12 | cout << "Bob" << 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:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
12 | cout << "Bob" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout << "Draw" << 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:14:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout << "Draw" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s803948651 | p03803 | C | #inlcude <stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if (a == 1 || b == 1)
{
if (a == 1 && b != 1)
printf("Alice");
else if (a != 1 && b == 1)
printf("Bob");
else
printf("Draw");
}
if (a > b)
printf("Alice");
else if (b > a)
printf("Bob");
else
printf("Draw");
} | main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude <stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
6 | scanf("%d%d",&a,&b);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #inlcude <stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
6 | scanf("%d%d",&a,&b);
| ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
10 | printf("Alice");
| ^~~~~~
main.c:10:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
12 | printf("Bob");
| ^~~~~~
main.c:12:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
14 | printf("Draw");
| ^~~~~~
main.c:14:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
17 | printf("Alice");
| ^~~~~~
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
19 | printf("Bob");
| ^~~~~~
main.c:19:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
21 | printf("Draw");
| ^~~~~~
main.c:21:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s612656587 | p03803 | C++ | #inlcude <stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if (a == 1 || b == 1)
{
if (a == 1 && b != 1)
printf("Alice");
else if (a != 1 && b == 1)
printf("Bob");
else
printf("Draw");
}
if (a > b)
printf("Alice");
else if (b > a)
printf("Bob");
else
printf("Draw");
} | a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
1 | #inlcude <stdio.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
6 | scanf("%d%d",&a,&b);
| ^~~~~
a.cc:10:7: error: 'printf' was not declared in this scope
10 | printf("Alice");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | #inlcude <stdio.h>
a.cc:12:7: error: 'printf' was not declared in this scope
12 | printf("Bob");
| ^~~~~~
a.cc:12:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:7: error: 'printf' was not declared in this scope
14 | printf("Draw");
| ^~~~~~
a.cc:14:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:5: error: 'printf' was not declared in this scope
17 | printf("Alice");
| ^~~~~~
a.cc:17:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:19:5: error: 'printf' was not declared in this scope
19 | printf("Bob");
| ^~~~~~
a.cc:19:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:5: error: 'printf' was not declared in this scope
21 | printf("Draw");
| ^~~~~~
a.cc:21:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s872310138 | p03803 | Java | import java.util.Scanner;
public class practice{
public static void main(String args[]){
Scanner scan=new Scanner(System.in);
int A=scan.nextInt();
int B=scan.nextInt();
if(A>B){
System.out.println("Alice");
}
else if(A<B){
System.out.println("Bob");
}
else{
System.out.println("Draw");
}
}
} | Main.java:2: error: class practice is public, should be declared in a file named practice.java
public class practice{
^
1 error
|
s002052021 | p03803 | C | import java.util.Scanner;
public class practice{
public static void main(String args[]){
Scanner scan=new Scanner(System.in);
int A=scan.nextInt();
int B=scan.nextInt();
if(A>B){
System.out.println("Alice");
}
else if(A<B){
System.out.println("Bob");
}
else{
System.out.println("Draw");
}
}
} | main.c:1:1: error: unknown type name 'import'
1 | import java.util.Scanner;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.Scanner;
| ^
main.c:2:1: error: unknown type name 'public'
2 | public class practice{
| ^~~~~~
main.c:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'practice'
2 | public class practice{
| ^~~~~~~~
|
s381079228 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
int main() {
int a,b;
cin >> a >> b;
if(a==b)
cout << "Draw" << endl;
else if(a!=1&&b!=1){
if(a<b)
cout << "Bob" << endl;
else
cout << "Alice" << endl;
}
else{
if(a==1){
cout << "Alice" << endl;
}
else
cout << "Bob" << endl;
} | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:7:12: note: to match this '{'
7 | int main() {
| ^
|
s149555886 | p03803 | C | #include<stdio.h>
int main(void){
int a,b;
scanf("%d%d",&a,&b);
if(a==b)
printf("Draw");
else if(a==1)
printf("Alice");
else if(b==1)
printf("Bob");
else if(a>b)
printf("Alice")
else if(a<b)
printf("Bob")
return 0;
} | main.c: In function 'main':
main.c:12:20: error: expected ';' before 'else'
12 | printf("Alice")
| ^
| ;
13 | else if(a<b)
| ~~~~
|
s551694841 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a < b)
cout << "Bob";
else if (a == b)
cout << "Draw";
else if (a > b)
cout << "Alice"
else if (a == 1)
cout << "Alice";
else if (b == 1)
cout << "Bob";
} | a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'else'
13 | cout << "Alice"
| ^
| ;
14 | else if (a == 1)
| ~~~~
|
s008452380 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int a, b;
cin >> a >> b;
if (a < b)
cout << "Bob";
else if (a == b)
cout << "Draw"
else
cout << "Alice"
} | a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before 'else'
11 | cout << "Draw"
| ^
| ;
12 | else
| ~~~~
|
s298927984 | p03803 | C++ | #include <iostream>
using namespace std;{
int = A, B
sin( A , B )
if( A = B ) cout ("Draw")
else if ( A = 1 ) cout ("Alice")
else if ( B = 1 ) cout ("Bob")
else if ( A > B ) cout ("Alice")
else if ( A < B ) cout ("Bob")
return;0} | a.cc:3:22: error: expected unqualified-id before '{' token
3 | using namespace std;{
| ^
|
s323081977 | p03803 | C++ | #include<iostream>
using namespace std;
int main(){
char a,b;
cin>>a>>b;
a-=130;
b-=130;
cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
} | a.cc:8:13: error: extended character ” is not valid in an identifier
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^
a.cc:8:13: error: extended character ” is not valid in an identifier
a.cc:8:24: error: extended character ” is not valid in an identifier
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^
a.cc:8:24: error: extended character ” is not valid in an identifier
a.cc:8:32: error: extended character ” is not valid in an identifier
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^
a.cc:8:32: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:13: error: '\U0000201dDraw\U0000201d' was not declared in this scope
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^~~~~~
a.cc:8:24: error: '\U0000201dAlice\U0000201d' was not declared in this scope
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^~~~~~~
a.cc:8:32: error: '\U0000201dBob\U0000201d' was not declared in this scope
8 | cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
| ^~~~~
|
s349040631 | p03803 | C++ | #include<bits/stdc+.h>
using namespace std;
int main(){
char a,b;
cin>>a>>b;
a-=130;
b-=130;
cout<<(a==b?”Draw”:a>b?”Alice”:”Bob”);
} | a.cc:1:9: fatal error: bits/stdc+.h: No such file or directory
1 | #include<bits/stdc+.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s320842373 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,c) for(int i=0;i<c;++i)
int main(){
int a,b;
cin >> a>> b;
int e = min(a,b);
if(e==a&&a!=1&&a!=b){
cout << "Bob" << endl;
}else if(e==b&&b!=1&&a!=b){
cout << "Alice" << endl;
}else if(a==b){
cout << "Draw" << endl;
}else if(e==a&&a==1&&a!=b){
cout << "Alice" <<endl;
}else if(e==b&&b==1&&a!=b){
cout << "Bob" << endl;
} | a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
18 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s292124506 | p03803 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;
int main() {
int a,b;
cin >> a >> b;
if(a==1) a+=13;
if(b==1) a+=13;
if(a>b) {
cout << "Alice" << endl;
} else if(a<b) [
cout << "Bob" << endl;
] else {
cout << "Draw" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:20:3: warning: capture of variable 'std::cout' with non-automatic storage duration
20 | cout << "Bob" << endl;
| ^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::ostream std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:20:7: error: expected ',' before '<<' token
20 | cout << "Bob" << endl;
| ^~~
| ,
a.cc:20:8: error: expected identifier before '<<' token
20 | cout << "Bob" << endl;
| ^~
a.cc:20:24: error: expected ']' before ';' token
20 | cout << "Bob" << endl;
| ^
| ]
a.cc: In lambda function:
a.cc:20:24: error: expected '{' before ';' token
a.cc: In function 'int main()':
a.cc:21:1: error: expected primary-expression before ']' token
21 | ] else {
| ^
|
s712516309 | p03803 | C++ | #include<iostream>
using namespace std;
int main ()
{
int a,b;
cin>>a>>b;
if(b==1)
b=14;
if(a==1)
a=14;
if(a>b)
cout<<"Alice";
else if(a==b)
cout<<"Draw";
else
cout<<"Bob";
return 0;
} #include<iostream>
using namespace std;
int main ()
{
int a,b;
cin>>a>>b;
if(b==1)
b=14;
if(a==1)
a=14;
if(a>b)
cout<<"Alice";
else if(a==b)
cout<<"Draw";
else
cout<<"Bob";
return 0;
} | a.cc:18:3: error: stray '#' in program
18 | } #include<iostream>
| ^
a.cc:18:4: error: 'include' does not name a type
18 | } #include<iostream>
| ^~~~~~~
a.cc:20:5: error: redefinition of 'int main()'
20 | int main ()
| ^~~~
a.cc:3:5: note: 'int main()' previously defined here
3 | int main ()
| ^~~~
|
s794766485 | p03803 | C++ | using namespace std;
int main ()
{
int a,b;
cin>>a>>b;
if(b==1)
b=14;
if(a==1)
a=14;
if(a>b)
cout<<"Alice";
else if(a==b)
cout<<"Draw";
else
cout<<"Bob";
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
5 | cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:11:9: error: 'cout' was not declared in this scope
11 | cout<<"Alice";
| ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:9: error: 'cout' was not declared in this scope
13 | cout<<"Draw";
| ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:9: error: 'cout' was not declared in this scope
15 | cout<<"Bob";
| ^~~~
a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s017616795 | p03803 | C++ | using namespace std;
int main()
{
int A, B;
cin >> A >> B;
if (A == 1)
{
A += 13;
}
if(B ==1)
{
B +=13;
}
if(A > B)
cout << "ALice";
if(A == B)
cout << "Draw";
else
cout << "Bob";
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin >> A >> B;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:16:1: error: 'cout' was not declared in this scope
16 | cout << "ALice";
| ^~~~
a.cc:16:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:1: error: 'cout' was not declared in this scope
18 | cout << "Draw";
| ^~~~
a.cc:18:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:5: error: 'cout' was not declared in this scope
20 | cout << "Bob";
| ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s021532983 | p03803 | C++ | #include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include <cassert>
#include <cmath>
#include<cstdint>
#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a) (a).begin(),(a).end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<int,int>;
vector<int>bitSearch(int bit,int n){
vector<int>S;
rep(i,n)if(bit&(1<<i))S.push_back(i);
return S;
}
int d[3] = {-1,0,1};
int main(){
int a,b;cin>>a>>b;
if(a==1)a = 14;
if(b==1)b = 14;
if(a==b)cout<<"Draw"
else cout<<(a>b?"Alice":"Bob");
}
| a.cc: In function 'int main()':
a.cc:45:25: error: expected ';' before 'else'
45 | if(a==b)cout<<"Draw"
| ^
| ;
46 | else cout<<(a>b?"Alice":"Bob");
| ~~~~
|
s875628687 | p03803 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int ab[] = new int[2];
ab[0] = sc.nextInt();
ab[1] = sc.nextInt();
for(int i=0;i<ab.length;i++){
if(ab[i] == 1){
ab[i] = ab[i] + 13;
}
}
if(ab[0] > ab[1]){
System.out.println("Alice");
}else if(b[0] < ab[1]){
System.out.println("Bob");
}else{
System.out.println("Drow");
}
}
}
| Main.java:22: error: cannot find symbol
}else if(b[0] < ab[1]){
^
symbol: variable b
location: class Main
1 error
|
s444717171 | p03803 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int ab[] = new int[2];
ab[0] = sc.nextInt();
ab[1] = sc.nextInt();
for(int i : ab){
if(i == 1){
ab[i] = ab[i] + 13;
}
}
if(ab[0] > ab[1]){
System.out.println("Alice");
}else if(b[0] < ab[1]){
System.out.println("Bob");
}else{
System.out.println("Drow");
}
}
}
| Main.java:22: error: cannot find symbol
}else if(b[0] < ab[1]){
^
symbol: variable b
location: class Main
1 error
|
s843731333 | p03803 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b;
string[] s = {"Draw","Alice","Bob"};
cin >> a >> b;
if(a == b){
cout << s[0];
}else if((a > b && b != 1) || a == 1){
cout << s[1];
}else{
cout << s[2];
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
5 | string[] s = {"Draw","Alice","Bob"};
| ^~
a.cc:5:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:5:9: error: empty structured binding declaration
a.cc:5:12: error: expected initializer before 's'
5 | string[] s = {"Draw","Alice","Bob"};
| ^
a.cc:8:13: error: 's' was not declared in this scope
8 | cout << s[0];
| ^
a.cc:10:13: error: 's' was not declared in this scope
10 | cout << s[1];
| ^
a.cc:12:13: error: 's' was not declared in this scope
12 | cout << s[2];
| ^
|
s737193603 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;
int main(){
ll a, b;
in2(a, b);
if(a == 1)
a = 14;
if(b == 1)
b = 14;
if(a < b)
out(Bob);
if(a == b)
out(Draw);
if(a > b)
out(Alice);
memi;
} | a.cc: In function 'int main()':
a.cc:25:9: error: 'Bob' was not declared in this scope
25 | out(Bob);
| ^~~
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
a.cc:27:9: error: 'Draw' was not declared in this scope
27 | out(Draw);
| ^~~~
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
a.cc:29:9: error: 'Alice' was not declared in this scope
29 | out(Alice);
| ^~~~~
a.cc:14:24: note: in definition of macro 'out'
14 | #define out(n) cout << n
| ^
|
s553214268 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
if(n==1)
{
n=h;
}
if(m==1)
{
m=h;
}
if(n==m)
{
cout<<"Draw";
}
else if(n<m)
{
cout<<"Bob";
}
else
{
cout<<"Alice";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:12: error: 'h' was not declared in this scope
9 | n=h;
| ^
a.cc:13:12: error: 'h' was not declared in this scope
13 | m=h;
| ^
|
s533643857 | p03803 | C++ | using namespace std;
int main()
{
int alice_card , bob_card;
cin>>alice_card>>bob_card;
//inr arr[13]={1,13,12,11,10,9,8,7,6,5,4,3,2};
if(alice_card==bob_card){
cout<<"draw";
}else if(alice_card==1 &&alice_card!=bob_card ){
cout<<"alice";
}else if (bob_card==1 &&alice_card!=bob_card ||bob_card>alice_card){
cout<<"bob";
}else if(alice_card>bob_card){
cout<<"alice";
}else{
cout<<"bob";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>alice_card>>bob_card;
| ^~~
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:9:5: error: 'cout' was not declared in this scope
9 | cout<<"draw";
| ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:1: error: 'cout' was not declared in this scope
11 | cout<<"alice";
| ^~~~
a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:1: error: 'cout' was not declared in this scope
13 | cout<<"bob";
| ^~~~
a.cc:13:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:1: error: 'cout' was not declared in this scope
15 | cout<<"alice";
| ^~~~
a.cc:15:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:1: error: 'cout' was not declared in this scope
17 | cout<<"bob";
| ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s229922464 | p03803 | C++ | using namespace std;
int main()
{
int alice_card , bob_card;
cin>>alice_card>>bob_card;
//inr arr[13]={1,13,12,11,10,9,8,7,6,5,4,3,2};
if(alice_card==bob_card){
cout<<"draw";
}else if(alice_card==1 &&alice_card!=bob_card ){
cout<<"alice";
}else if (bob_card==1 &&alice_card!=bob_card ||bob_card>alice_card){
cout<<"bob";
}else if(alice_card>bob_card){
cout<<"alice"
}else{
cout<<"bob"}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>alice_card>>bob_card;
| ^~~
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:9:5: error: 'cout' was not declared in this scope
9 | cout<<"draw";
| ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:1: error: 'cout' was not declared in this scope
11 | cout<<"alice";
| ^~~~
a.cc:11:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:1: error: 'cout' was not declared in this scope
13 | cout<<"bob";
| ^~~~
a.cc:13:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:1: error: 'cout' was not declared in this scope
15 | cout<<"alice"
| ^~~~
a.cc:15:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:1: error: 'cout' was not declared in this scope
17 | cout<<"bob"}
| ^~~~
a.cc:17:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s218296079 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int a , b;
cin>> a>> b;
if(a==1 && b!=1)
{
cout<<"Alice";
}
else if (b==1 && a!=1)
{
cout<<"Bob";
}
else if (a>=2 && a<=13 && b>=2&&b<=13 && a>b)
{
cout<<"Alice";
}
else if (b>=2 && b<=13 && a>=2&&b<=13 && b>a)
{
cout<<"Bob";
} | a.cc: In function 'int main()':
a.cc:25:6: error: expected '}' at end of input
25 | }
| ^
a.cc:6:1: note: to match this '{'
6 | {
| ^
|
s845732837 | p03803 | C++ | using namespace std;
int main()
{
int a , b;
cin>> a>> b;
if(a==1 && b!=1)
{
cout<<"Alice";
}
else if (b==1 && a!=1)
{
cout<<"Bob";
}
else if (a>=2 && a<=13 && b>=2&&b<=13 && a>b)
{
cout<<"Alice";
}
else if (b>=2 && b<=13 && a>=2&&b<=13 && b>a)
{
cout<<"Bob";
}
else{
cout<<"Draw";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
7 | cin>> a>> b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:10:9: error: 'cout' was not declared in this scope
10 | cout<<"Alice";
| ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:9: error: 'cout' was not declared in this scope
14 | cout<<"Bob";
| ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:9: error: 'cout' was not declared in this scope
18 | cout<<"Alice";
| ^~~~
a.cc:18:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:9: error: 'cout' was not declared in this scope
22 | cout<<"Bob";
| ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:5: error: 'cout' was not declared in this scope
25 | cout<<"Draw";
| ^~~~
a.cc:25:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s524703323 | p03803 | C | #include <stdio.h>
int main(void)
{
int a, b;
if(scanf("%d", &a) == 1 && scanf("%d", &b) == 1) {
if(a == b) {
printf("Draw");
}
else if(a != 1 && b != 1) {
else if(a > b) {
printf("Alice");
}
else if(b > a) {
printf("Bob");
}
}
else {
if(a == 1) {
printf("Alice");
}
else {
printf("Bob");
}
}
}
return 0;
} | main.c: In function 'main':
main.c:12:25: error: expected '}' before 'else'
12 | else if(a > b) {
| ^~~~
main.c: At top level:
main.c:28:9: error: expected identifier or '(' before 'return'
28 | return 0;
| ^~~~~~
main.c:29:1: error: expected identifier or '(' before '}' token
29 | }
| ^
|
s961045693 | p03803 | C | #include <stdio.h>
int main(void)
{
int a, b;
if(scanf("%d", &a) == 1 && scanf("%d", &b) == 1) {
if(a == b) {
printf("Draw");
}
else {
if(a == 1) {
printf("Alice");
break;
}
else if(b == 1) {
printf("Alice");
break;
}
else if(a > b) {
printf("Alice");
}
else if(b > a) {
printf("Bob");
}
}
}
return 0;
} | main.c: In function 'main':
main.c:14:33: error: break statement not within loop or switch
14 | break;
| ^~~~~
main.c:18:33: error: break statement not within loop or switch
18 | break;
| ^~~~~
|
s249267411 | p03803 | C | #include <stdio.h>
int main(void)
{
int a, b;
if(scanf("%d%d", &a, &b)) == 1) {
if(a == b) {
printf("Draw");
}
else {
if(a == 1 || a > b) {
printf("Alice");
}
else if(b == 1 || b > a) {
printf("Bob");
}
}
}
return 0;
} | main.c: In function 'main':
main.c:7:35: error: expected expression before '==' token
7 | if(scanf("%d%d", &a, &b)) == 1) {
| ^~
main.c:7:39: error: expected statement before ')' token
7 | if(scanf("%d%d", &a, &b)) == 1) {
| ^
|
s925969774 | p03803 | C | #include <stdio.h>
int main(void)
{
int a, b;
scanf("%d%d", &a, &b);
if(a == b) [
printf("Draw");
}
else {
if(a == 1 || a > b) {
printf("Alice");
}
else if(b == 1 || b > a) {
printf("Bob");
}
}
return 0;
} | main.c: In function 'main':
main.c:8:20: error: expected expression before '[' token
8 | if(a == b) [
| ^
main.c:9:32: error: expected ';' before '}' token
9 | printf("Draw");
| ^
| ;
10 | }
| ~
main.c: At top level:
main.c:11:9: error: expected identifier or '(' before 'else'
11 | else {
| ^~~~
main.c:19:9: error: expected identifier or '(' before 'return'
19 | return 0;
| ^~~~~~
main.c:20:1: error: expected identifier or '(' before '}' token
20 | }
| ^
|
s488150962 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int A, B;
cin >> A >> B;
if (A == B)
cout << "Draw";
else if ((A > B and B != 1) or (A != B and A == 1))
cout << "Alice";
else
cout << "Bob";
}
return 0;
} | a.cc:14:5: error: expected unqualified-id before 'return'
14 | return 0;
| ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
15 | }
| ^
|
s007260947 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int A, B;
cin >> A >> B;
if ((A>=1 or A<=13) and (B>=1and B<=13)){
if (A == B)
cout << "Draw\n";
else if ((A > B and B != 1) or (A != B and A == 1))
cout << "Alice\n";
else
cout << "Bob\n";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:33: error: unable to find numeric literal operator 'operator""and'
7 | if ((A>=1 or A<=13) and (B>=1and B<=13)){
| ^~~~
a.cc:7:37: error: expected ')' before 'B'
7 | if ((A>=1 or A<=13) and (B>=1and B<=13)){
| ~ ^~
| )
a.cc:14:6: error: expected ')' before 'return'
14 | }
| ^
| )
15 | return 0;
| ~~~~~~
a.cc:7:8: note: to match this '('
7 | if ((A>=1 or A<=13) and (B>=1and B<=13)){
| ^
|
s951094815 | p03803 | C++ | using namespace std;
int main()
{
int A,B;
cin>> A>> B;
if(A==B)
cout<<"draw";
else if ((A >B and B != 1) or (A!=B and A==1) )
cout << "Alice";
else
cout << "Bob";
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>> A>> B;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout<<"draw";
| ^~~~
a.cc:7:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:9: error: 'cout' was not declared in this scope
9 | cout << "Alice";
| ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:9: error: 'cout' was not declared in this scope
11 | cout << "Bob";
| ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s309318358 | p03803 | C++ | using namespace std;
int main()
{
int A,B;
cin>> A>> B;
if(A==B)
cout<<"draw\n";
else if ((A >B and B != 1) or (A!=B and A==1) )
cout << "Alice\n";
else
cout << "Bob\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin>> A>> B;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout<<"draw\n";
| ^~~~
a.cc:7:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:9: error: 'cout' was not declared in this scope
9 | cout << "Alice\n";
| ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:9: error: 'cout' was not declared in this scope
11 | cout << "Bob\n";
| ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
|
s856876883 | p03803 | C++ | #include <iostream>
#include <string>
using namespace std;
int main()
{
int a,b;cin>>a>>b;
if(a==1 || b==1){
cout<<"Alice";
}
if(b==1&&a!=1){
cout<<"Bob";
}
if(a==b){
cout<<"Draw";
}
}
else{
if(a>b){
cout<<"Alice";
}
if(a<b){
cout<<"Bob";
}
if(a==b){
cout<<"Draw";
}
}
return 0;
} | a.cc:17:1: error: expected unqualified-id before 'else'
17 | else{
| ^~~~
a.cc:28:2: error: expected unqualified-id before 'return'
28 | return 0;
| ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
29 | }
| ^
|
s505959630 | p03803 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
int b;
cin>>a>>b;
if(a=b){
cout<<"Draw":
}
else if(a=1){
cout<<"Alice";
}
else if (b=1){
cout<<"Bob";
}
else if (b>a){
cout<<"Bob";
}
else if (b<a){
cout<<"Alice";
}
}
| a.cc: In function 'int main()':
a.cc:10:17: error: expected ';' before ':' token
10 | cout<<"Draw":
| ^
| ;
|
s811983963 | p03803 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
int b;
cin>>a>>b;
if (a!=1 and b!=1){
if (a>b){
cout<"Alice";
}
if (a<b){
cout<<"Bob";
}else
cout<<"Draw";
}
if(a=1 and b!=1){
cout<"Alice";
}
else (a!=1 and b=1){
cout<<"Bob":
}
else
cout<<"Draw";
}
| a.cc: In function 'int main()':
a.cc:11:13: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
11 | cout<"Alice";
| ~~~~^~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
11 | cout<"Alice";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
11 | cout<"Alice";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'const char*'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
11 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
11 | cout<"Alice";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:11:14: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
11 | cout<"Alice";
| ^~~~~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:21:9: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
21 | cout<"Alice";
| ~~~~^~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:21:10: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
21 | cout<"Alice";
| ^~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution faile |
s232555569 | p03803 | C++ | int a, b;
cin>> a >> b;
if(a == b)
cout<< "Draw";
else if ((a>b || a==1) && b!=1){
cout<< "Alica";
}else if ((b>a || b==1) && a!=1){
cout<< "Bob";
}
return 0;
} | a.cc:2:1: error: 'cin' does not name a type
2 | cin>> a >> b;
| ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
4 | if(a == b)
| ^~
a.cc:6:1: error: expected unqualified-id before 'else'
6 | else if ((a>b || a==1) && b!=1){
| ^~~~
a.cc:8:2: error: expected unqualified-id before 'else'
8 | }else if ((b>a || b==1) && a!=1){
| ^~~~
a.cc:12:1: error: expected unqualified-id before 'return'
12 | return 0;
| ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
13 | }
| ^
|
s516231760 | p03803 | C++ | #include <iostream>
using namespace std;
int main() {
int a;
int b;
cin>> a >> b;
if(a == b){
cout<< "Draw";
return 0;
}
if ((a==1 || a>b) && b!=1){
cout<< "Alica";
return 0;
}
if (a!=1 &&(b>a || b==1){
cout<< "Bob";
return 0;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:19:25: error: expected ';' before '{' token
19 | if (a!=1 &&(b>a || b==1){
| ^
| ;
a.cc:23:1: error: expected primary-expression before 'return'
23 | return 0;
| ^~~~~~
a.cc:22:2: error: expected ')' before 'return'
22 | }
| ^
| )
23 | return 0;
| ~~~~~~
a.cc:19:4: note: to match this '('
19 | if (a!=1 &&(b>a || b==1){
| ^
|
s656449480 | p03803 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b;
cin>> a>>b;
if (a>b && b!=1 ){
cout<<"Alice";
}
else if (b>a && a!=1){
cout<<"bob";}
else if (a==1 && b!=1)cout<< "Alice";
else if (b==1 && a!=1)cout<<"Bob";
else cout<<"Draw";
return 0; | a.cc: In function 'int main()':
a.cc:17:14: error: expected '}' at end of input
17 | return 0;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s918038289 | p03803 | C++ | A, B = map(int, input().split())
if A != 1 or B != 1:
if A == B:
print('Draw')
elif A > B:
print('Alice')
elif A < B:
print('Bob')
else:
if A == 1 and B != 1:
print('Alice')
elif B == 1 and A != 1:
print('Bob')
else:
print('Draw')
| a.cc:4:15: warning: multi-character character constant [-Wmultichar]
4 | print('Draw')
| ^~~~~~
a.cc:6:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
6 | print('Alice')
| ^~~~~~~
a.cc:8:15: warning: multi-character character constant [-Wmultichar]
8 | print('Bob')
| ^~~~~
a.cc:11:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
11 | print('Alice')
| ^~~~~~~
a.cc:13:15: warning: multi-character character constant [-Wmultichar]
13 | print('Bob')
| ^~~~~
a.cc:15:15: warning: multi-character character constant [-Wmultichar]
15 | print('Draw')
| ^~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A, B = map(int, input().split())
| ^
|
s110922796 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
printf((a+11)%13>(b+11)%13?"Alice":(a+11)%13==(b+11)%13?"Draw":"Bob")
return 0;
} | a.cc: In function 'int main()':
a.cc:7:78: error: expected ';' before 'return'
7 | printf((a+11)%13>(b+11)%13?"Alice":(a+11)%13==(b+11)%13?"Draw":"Bob")
| ^
| ;
8 | return 0;
| ~~~~~~
|
s327810306 | p03803 | C++ | #include<iostream>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
if (n>m)
cout<<"Alice"<<endl;
else if (m>n)
cout<<"Bob"<<endl;
else (m==n)
cout<<"Draw"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before 'cout'
11 | else (m==n)
| ^
| ;
12 | cout<<"Draw"<<endl;
| ~~~~
|
s792315701 | p03803 | C++ | #include <string>
using namespace std;
enum suits { none, diamond, club, heart, spade };
class card {
public:
card( ){
suit = none;
rank = 0;
}
card( suits sv, int rv) {
rank = rv;
suit = sv;
}
int spots ( ){
return rank;
}
suits kind ( ){
return suit;
}
string toString() const {
return rankString(rank) + " of " + suitString(suit);
}
string rankString(int r) const{
if (1 == r) return "ace";
else if (2 == r) return "two";
else if (3 == r) return "three";
else if (4 == r) return "four";
else if (5 == r) return "five";
else if (6 == r) return "six";
else if (7 == r) return "seven";
else if (8 == r) return "eight";
else if (9 == r) return "nine";
else if (10 == r) return "ten";
else if (11 == r) return "jack";
else if (12 == r) return "queen";
else if (13 == r) return "king";
else return "joker";
}
string suitString(suits s) const {
if (s == spade) return "spades";
else if (s == heart) return "hearts";
else if (s == diamond) return "diamonds";
else if (s == club) return "clubs";
else return "non-suit";
}
protected:
int rank;
suits suit;
};
//Deck
#include "card.h"
#include <ctime>
#include <cstdlib>
using namespace std;
class deck {
public:
deck() {
top_card = 0;
for( int i = 2; i <= 14; i++ )
{
card c1( diamond, i ),
c2( spade, i ),
c3( heart, i ),
c4( club, i );
cards[ top_card++ ] = c1;
cards[ top_card++ ] = c2;
cards[ top_card++ ] = c3;
cards[ top_card++ ] = c4;
}
}
void shuffle() {
srand(time(NULL));
for(int i=0; i<52; i++) {
int a = rand()%52;
card temp = cards[i];
cards[i] = cards[a];
cards[a] = temp;
}
}
bool is_empty() {
return (top_card <= 0);
}
card draw() {
if( !is_empty() ) {
return cards[ --top_card ];
}
else {
card non_card( none, 0 );
return non_card;
}
}
protected:
card cards[ 52 ];
int top_card;
}; | a.cc:60:10: fatal error: card.h: No such file or directory
60 | #include "card.h"
| ^~~~~~~~
compilation terminated.
|
s198380631 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;string ans;
cin >>a>>b;
if(a==1)a=14;
if(b==1)b=14;
if(a>b)ans="Alice"
if(a<b)ans="Bob"
if(a==b)ans="Draw";
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before 'if'
9 | if(a>b)ans="Alice"
| ^
| ;
10 | if(a<b)ans="Bob"
| ~~
|
s780923204 | p03803 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;
int main(){
int n,m;cin>>n>>m;
vector<P> nya(m);
for(int i = 0; m > i; i++){
cin >> nya[i].first>>nya[i].second;
}
vector<int> Pa(n);
for(int i = 0; n > i; i++){
Pa[i] = i+1;
}
int ans = 0;
do{
bool ad = true;
for(int i = 0; n-1 > i; i++){
bool ok = false;
for(int j = 0; m > j; j++){
if(min(nya[j].first,nya[j].second) == min(Pa[i],Pa[i+1]) && max(nya[j].first,nya[j].second) == max(Pa[i],Pa[i+1])){
ok = true;
break;
}
}
if(!ok){
ad = false;
break;
}
}
if(ad)ans++;
}while(Pa.begin(),Pa.end());
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:32:18: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
32 | }while(Pa.begin(),Pa.end());
| ~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:873:7: note: declared here
873 | begin() _GLIBCXX_NOEXCEPT
| ^~~~~
a.cc:32:20: error: could not convert '(((void)Pa.std::vector<int>::begin()), Pa.std::vector<int>::end())' from 'std::vector<int>::iterator' to 'bool'
32 | }while(Pa.begin(),Pa.end());
| ~~~~~~~~~~^~~~~~~~~
| |
| std::vector<int>::iterator
|
s424654972 | p03803 | C++ | #include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;
int main(){
int n,m;cin>>n>>m;
vector<P> nya(m);
for(int i = 0; m > i; i++){
cin >> nya[i].first>>nya[i].second;
}
vector<int> Pa(n);
for(int i = 0; n > i; i++){
Pa[i] = i+1;
}
int ans = 0;
do{
bool ad = true;
for(int i = 0; n-1 > i; i++){
bool ok = false;
for(int j = 0; m > j; j++){
if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
ok = true;
break;
}
}
if(!ok){
ad = false;
break;
}
}
if(ad)ans++;
}while(Pa.begin(),Pa.end());
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:21:52: error: expected primary-expression before '[' token
21 | if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
| ^
a.cc:21:57: error: expected primary-expression before '[' token
21 | if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
| ^
a.cc:21:107: error: expected primary-expression before '[' token
21 | if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
| ^
a.cc:21:112: error: expected primary-expression before '[' token
21 | if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
| ^
a.cc:32:18: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
32 | }while(Pa.begin(),Pa.end());
| ~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:873:7: note: declared here
873 | begin() _GLIBCXX_NOEXCEPT
| ^~~~~
a.cc:32:20: error: could not convert '(((void)Pa.std::vector<int>::begin()), Pa.std::vector<int>::end())' from 'std::vector<int>::iterator' to 'bool'
32 | }while(Pa.begin(),Pa.end());
| ~~~~~~~~~~^~~~~~~~~
| |
| std::vector<int>::iterator
|
s703474170 | p03803 | C++ | int main()
{
int a,b;
cin>>a>>b;
if(a==b){
cout<<"Draw"<<endl;
}
else if((a>b||a==1)&&b!=1){
cout<<"Alice"<<endl;
}
else if(b>a||b==1){
cout<<"Bob"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>a>>b;
| ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
10 | cout<<"Draw"<<endl;
| ^~~~
a.cc:10:19: error: 'endl' was not declared in this scope
10 | cout<<"Draw"<<endl;
| ^~~~
a.cc:14:1: error: 'cout' was not declared in this scope
14 | cout<<"Alice"<<endl;
| ^~~~
a.cc:14:16: error: 'endl' was not declared in this scope
14 | cout<<"Alice"<<endl;
| ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
17 | cout<<"Bob"<<endl;
| ^~~~
a.cc:17:18: error: 'endl' was not declared in this scope
17 | cout<<"Bob"<<endl;
| ^~~~
|
s612480639 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if (a==b){
cout<<"Draw"\n;
return 0;
}
if (a>b||a==1)
cout<<"Alice\n";
else cout<<"Bob\n";
return 0;
} | a.cc:7:17: error: stray '\' in program
7 | cout<<"Draw"\n;
| ^
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before 'n'
7 | cout<<"Draw"\n;
| ^~
| ;
|
s174169349 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a>b)
cout<<"Alice";
else if(b>a)
cout<<"bob";
else if(a==b)
cout<<"Draw"
} | a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
12 | cout<<"Draw"
| ^
| ;
13 | }
| ~
|
s323174326 | p03803 | C++ | #include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a>b)
cout<<"alice";
else if(b>a)
cout<<"bob";
else if(a==b)
cout<<"draw"
} | a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
12 | cout<<"draw"
| ^
| ;
13 | }
| ~
|
s060528354 | p03803 | C | #include <bits/stdc++.h>
#define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++)
using namespace std;
//////全探索したいときに開けよ////////
vector<vector<int>> fspattern;
vector<int> fspattern_draft;
int fspcnt = 0;
void setfspattern_core(int floor,int number,int degree){
if(floor==degree){
fspattern.at(fspcnt) = fspattern_draft;
fspcnt++;
}else{
rep(i,number){
fspattern_draft.at(floor) = i;
setfspattern_core(floor+1,number,degree);
}
}
}
void setfspattern(int number,int degree){
int64_t array_num = 1;
rep(i,degree){
array_num *= number;
}
fspattern = vector<vector<int>>(array_num,vector<int>(degree));
fspattern_draft = vector<int>(degree);
setfspattern_core(0,number,degree);
}
//////nCrのmodを求めたいときに開けよ/////////
//int64_t univMod = 1000000007;
//int64_t factnum = 100000
//vector<int64_t> modfact(factnum);
//vector<int64_t> modinvfact(factnum);
/*void setmodfact(){
for(int i=0;i<factnum;i++){
if(i == 0){
modfact.at(i) = 1;
}else{
modfact.at(i) = (modfact.at(i-1)*i)%univMod;
}
}
}
int64_t calcmodpower(int64_t a,int64_t n){
int64_t res = 1;
while(n != 0){
if(n & 1){
res = (res * a) % univMod;
}
a = (a*a) % univMod;
n = n >> 1;
}
return res;
}
int64_t calcinverse(int64_t n){
return calcmodpower(n,univMod-2);
}
void setmodinvfact(){
for(int i=0;i<factnum;i++){
if(i==0){
modinvfact.at(i) = 1;
}else{
modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2);
}
}
}
int64_t calcmodcomb(int64_t n,int64_t r){
return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod;
}
int64_t calcmodpositive(int64_t n){
return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod;
}
*/
/*
int64_t calcGCD(int64_t a,int64_t b){
int64_t p = a;
int64_t q = b;
int64_t c = a%b;
while(c != 0){
p = q;
q = c;
c = p%q;
}
return q;
}
*/
int main(){
int a,b;
cin >> a >> b;
if(a == 1) a=14;
if(b == 1) b=14;
if(a > b){
cout << "Alice" <<endl;
}else if(a < b){
cout << "Bob" << endl;
}else{
cout << "Draw" << endl;
}
}
| main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s748136623 | p03803 | C++ | //{{{
#include <bits/stdc++.h>
using namespace std;
const string truename = "Yes";
const string falsename = "No";
struct IoSetup {
IoSetup(){
cin.tie(nullptr);
// ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
cerr << fixed << setprecision(10);
};
} ioSetup;
//{{{ rep rrep loop
#define repX(a,b,c,d,x,...) x
#define repN(a) repX a
#define rep(...) repN((__VA_ARGS__,rep4,rep3,rep2,loop))(__VA_ARGS__)
#define rrep(...) repN((__VA_ARGS__,rrep4,rrep3,rrep2))(__VA_ARGS__)
#define loop(n) rep2(i_,n)
#define rep2(i,n) rep3(i,0,n)
#define rep3(i,begin,end) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;++i)
#define rep4(i,begin,end,step) for(ll i=(ll)(begin),i##_end=(ll)(end);i<i##_end;i+=step)
#define rrep2(i,n) rrep3(i,0,n)
#define rrep3(i,begin,end) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;--i)
#define rrep4(i,begin,end,step) for(ll i=(ll)(end-1),i##_end=(ll)(begin);i>=i##_end;i-=step)
//}}}
#define each(x,a) for(auto&x:a)
#define sz(x) ((ll)(x).size())
//{{{ Type
using ull = unsigned long long;
using ll = long long;
using pii = pair<ll, ll>;
using vp = vector<pii>;
using vs = vector<string>;
using vi = vector<ll>;
using vvi = vector<vi>;
#define v(T) vector<T>
#define vv(T) v(v(T))
template<class T> vector<T> Vector(size_t a, T val){return vector<T>(a, val);}
template<class... Tail> auto Vector(size_t a, Tail... tail){ return vector<decltype(Vector(tail...))>(a, Vector(tail...)); }
//}}}
//{{{ STL overload
template<class T, class Compare>inline void sort(T&a, Compare comp) { sort(a.begin(), a.end(), comp); }
template<class T> inline void sort(T&a) { sort(a.begin(), a.end()); }
template<class T> inline void rsort(T&a) { sort(a.rbegin(), a.rend()); }
template<class T> inline void reverse(T&a) { reverse(a.begin(), a.end()); }
template<class T> inline bool next_permutation(T&a) { return next_permutation(a.begin(), a.end()); }
template<class T, class U>inline bool binary_search(T&a, const U&v) { return binary_search(a.begin(), a.end(), v); }
template<class T, class U>inline auto lower_bound(T&a, const U&v) { return lower_bound(a.begin(), a.end(), v); }
template<class T, class U>inline auto upper_bound(T&a, const U&v) { return upper_bound(a.begin(), a.end(), v); }
//}}}
//{{{ Functions
template<class T> inline T Sum(vector<T>&a){ return accumulate(a.begin(), a.end(), (T)0); }
template<class T> inline T Max(vector<T>&a){ return *max_element(a.begin(), a.end()); }
template<class T> inline T Min(vector<T>&a){ return *min_element(a.begin(), a.end()); }
template<class T, class U> inline bool chmax(T&a, const U&b){ return (b > a) ? (a = b, true) : false; }
template<class T, class U> inline bool chmin(T&a, const U&b){ return (b < a) ? (a = b, true) : false; }
ll gcd(const ll a, const ll b){ return b ? gcd(b, a % b) : a; }
ll lcm(const ll a, const ll b){ return a / gcd(a, b) * b; }
ll ceil(const ll a, const ll b){ return (a + b - 1) / b; }
ll popcount(ll a){
a -= ((a >> 1) & 0x5555555555555555LL);
a = (a & 0x3333333333333333LL) + ((a >> 2) & 0x3333333333333333LL);
a = (a + (a >> 4)) & 0x0f0f0f0f0f0f0f0fLL;
a += (a >> 8);
a += (a >> 16);
a += (a >> 32);
return a & 0x7f;
}
//}}}
//{{{ in
class in {
int n, m;
public:
in() : n(0), m(0){}
in(int n) : n(n), m(0){};
in(int n, int m) : n(n), m(m){};
template <class T> operator T() {assert(n==0); assert(m==0); T ret; cin >> ret; return ret; }
template <class T> operator vector<T>() {assert(n>0); assert(m==0); vector<T> ret(n); for(ll i=0;i<(ll)n;++i) cin>>ret[i]; return ret; }
template <class T> operator vector<vector<T>>() {assert(n>0); assert(m>0); vector<vector<T>> ret(n, vector<T>(m)); for(ll i=0;i<(ll)n;++i) for(ll j=0;j<(ll)m;++j) cin>>ret[i][j]; return ret; }
};
//}}}
//{{{ << overload
template<class T,class U>ostream &operator<<(ostream &o,const pair<T,U>&j){o<<"{"<<j.first<<", "<<j.second<<"}";return o;}
template<class T,class U>ostream &operator<<(ostream &o,const map<T,U>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;}
template<class T>ostream &operator<<(ostream &o,const set<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;}
template<class T>ostream &operator<<(ostream &o,const multiset<T>&j){o<<"{";for(auto t=j.begin();t!=j.end();++t)o<<(t!=j.begin()?", ":"")<<*t;o<<"}";return o;}
template<class T>ostream &operator<<(ostream &o,const vector<T>&j){o<<"{";for(ll i=0;i<(ll)j.size();++i)o<<(i>0?", ":"")<<j[i];o<<"}";return o;}
//}}}
//{{{ print / out
template<class T> int print(const T& a){ cout << a; return 0; }
inline int out(bool f){ cout << (f ? truename : falsename) << '\n'; return 0; }
inline int out(){ cout << '\n'; return 0; }
template<class T> inline int out(const T& t){ print(t); cout << '\n'; return 0; }
template<class Head, class... Tail> inline int out(const Head& head, const Tail&... tail){ print(head); cout << " "; out(tail...); return 0; }
//}}}
//{{{ debug_print / debug_out
#ifdef LOCAL
#if 1 // Colorize
#include "console_color.hpp"
#else
#define setColor(...)
#endif
template<class T> int debug_print(const T& a){ cerr << a; return 0; }
inline int debug_out(bool f){ cerr << (f ? truename : falsename) << '\n'; return 0; }
inline int debug_out(){ cerr << '\n'; return 0; }
template<class T> inline int debug_out(const T& t){ debug_print(t); cerr << '\n'; return 0; }
template<class Head, class... Tail> inline int debug_out(const Head& head, const Tail&... tail){ debug_print(head); cerr << " "; debug_out(tail...); return 0; }
#define debug(...) do{ setColor(COL_WHITE, COL_DARK_BLUE); cerr << "[L." << __LINE__ << "] " << #__VA_ARGS__ << ":"; setColor(); cerr << " "; debug_out(__VA_ARGS__); }while(0)
#else
#define debug_print(...)
#define debug_out(...)
#define debug(...)
#endif
//}}}
//{{{ Modular
template <std::int_fast64_t Mod> class Modular {
using u64 = std::uint_fast64_t;
public:
u64 a;
constexpr Modular(std::int_fast64_t x = 0) noexcept : a(x % Mod + (x < 0 ? Mod : 0)) {}
constexpr u64 val() const noexcept { return a; }
constexpr Modular operator+(const Modular rhs) const noexcept { return Modular(*this) += rhs; }
constexpr Modular operator-(const Modular rhs) const noexcept { return Modular(*this) -= rhs; }
constexpr Modular operator*(const Modular rhs) const noexcept { return Modular(*this) *= rhs; }
constexpr Modular operator/(const Modular rhs) const noexcept { return Modular(*this) /= rhs; }
constexpr bool operator==(const Modular rhs) const noexcept { return Modular(*this).val() == rhs.val(); }
Modular &operator+=(const Modular rhs) noexcept { a += rhs.a; if (a >= Mod) a -= Mod; return *this; }
Modular &operator-=(const Modular rhs) noexcept { if (a < rhs.a) a += Mod; a -= rhs.a; return *this; }
Modular &operator++() noexcept { return *this += 1; }
Modular &operator--() noexcept { return *this -= 1; }
Modular &operator*=(const Modular rhs) noexcept { a = a * rhs.a % Mod; return *this; }
Modular &operator/=(Modular rhs) noexcept { u64 exp = Mod - 2; while(exp){ if(exp % 2) *this *= rhs; rhs *= rhs; exp /= 2; } return *this; }
Modular pow(u64 t) const { if(!t) return 1; Modular<Mod> a = pow(t>>1); a *= a; if(t&1) a *= *this; return a; }
};
template <std::int_fast64_t Mod> ostream& operator<<(ostream& os, const Modular<Mod>& m){ return os << m.a; }
//}}}
const double pi=acos(-1);
const double eps = 1e-9;
const ll inf = 1001001001;
const ll mod=(ll)1e9+7;
using mint = Modular<mod>;
//}}}
int main(){
int a = in();
int b = in();
if(a == 1) a = 14;
if(b == 1) b = 14;
if(a == b){
out("Draw");
}else(a > b){
out("Alice");
}else{
out("Bob");
}
}
| a.cc: In function 'int main()':
a.cc:166:15: error: expected ';' before '{' token
166 | }else(a > b){
| ^
| ;
a.cc:168:4: error: 'else' without a previous 'if'
168 | }else{
| ^~~~
|
s808173689 | p03803 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <map>
#define N 100005
using namespace std;
typedef long long ll;
ll x;
int n;
int a[N];
int a, b;
int main() {
cin>>a>>b;
if (a == b) cout<<"Draw"<<endl;
else {
if (a == 1) cout<<"Alice"<<endl;
else if (b == 1) cout<<"Bob"<<endl;
else if (a<b) cout<<"Bob"<<endl;
else cout<<"Alice"<<endl;
}
return 0;
} | a.cc:13:5: error: conflicting declaration 'int a'
13 | int a, b;
| ^
a.cc:12:5: note: previous declaration as 'int a [100005]'
12 | int a[N];
| ^
a.cc: In function 'int main()':
a.cc:15:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [100005]')
15 | cin>>a>>b;
| ~~~^~~
| | |
| | int [100005]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
15 | cin>>a>>b;
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(short int)((int*)(& a))' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(short unsigned int)((int*)(& a))' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(int)((int*)(& a))' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(unsigned int)((int*)(& a))' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(long int)((int*)(& a))' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(long unsigned int)((int*)(& a))' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(long long int)((int*)(& a))' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
15 | cin>>a>>b;
| ^
| |
| int*
a.cc:15:8: error: cannot bind rvalue '(long long unsigned int)((int*)(& a))' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:15:8: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
15 | cin>>a>>b;
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [100005]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [100005]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [100005]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [100005]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [100005]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator |
s651611657 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b ;
if(a==b)
cout << "Draw";
if(a<b)
cout << "Bob"
if(a>b)
cout << "Alice"
}
| a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'if'
10 | cout << "Bob"
| ^
| ;
11 | if(a>b)
| ~~
|
s455818338 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
int a, b;
cin >> a >> b ;
if(a==b){
cout<< "Draw" <<endl;
}
else if(a==1){
cout<< "Alice" <<endl;
}
else if(b==1){
cout<< "Bob" <<endl;
}
else if(a>b){
cout<< "Alice" <<endl;
}
else(b<a){
cout<< "Bob" <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '{' token
18 | else(b<a){
| ^
| ;
|
s682095616 | p03803 | C++ | include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#ifdef LOCAL
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl
#else
#define dmp(x) void(0)
#endif
template <class t, class u>
void chmax(t &a, u b)
{
if (a < b)
a = b;
}
template <class t, class u>
void chmin(t &a, u b)
{
if (b < a)
a = b;
}
template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;
using vi = vc<int>;
int gcd(int a, int b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
int lcm(int a, int b)
{
return (a * b) / gcd(a, b);
}
int fact(int n)
{
if (n == 0)
return 1;
return n * fact(n - 1);
}
int main()
{
int a,b;
cin >> a >> b;
if(a == 1)a=14;
if(b == 1)b=14;
if(a>b){
cout << "Alice"<<endl;
}else if(a ==b){
cout << "Draw" <<endl;
}else{
cout << "Bob" <<endl;
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/vector:62,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/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>
| |
s445687274 | p03803 | C++ | #include <iostream>
#include <vector>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#ifdef LOCAL
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl
#else
#define dmp(x) void(0)
#endif
template <class t, class u>
void chmax(t &a, u b)
{
if (a < b)
a = b;
}
template <class t, class u>
void chmin(t &a, u b)
{
if (b < a)
a = b;
}
template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;
using vi = vc<int>;
int gcd(int a, int b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
int lcm(int a, int b)
{
return (a * b) / gcd(a, b);
}
int fact(int n)
{
if (n == 0)
return 1;
return n * fact(n - 1);
}
int main()
{
int a,b;
cin >> a >> b;
if(a == 1)a=14;
if(b == 1)b=14;
if(a>b){
cout << Alice<<endl;
}else if(a ==b){
cout << Draw <<endl;
}else{
cout << Bob <<endl;
}
} | a.cc: In function 'int main()':
a.cc:65:11: error: 'Alice' was not declared in this scope
65 | cout << Alice<<endl;
| ^~~~~
a.cc:67:11: error: 'Draw' was not declared in this scope
67 | cout << Draw <<endl;
| ^~~~
a.cc:69:11: error: 'Bob' was not declared in this scope
69 | cout << Bob <<endl;
| ^~~
|
s078177439 | p03803 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>
#include <list>
#include <stack>
using namespace std;
struct drag
{
int m, val;
};
int n;
int ma, mb;
int result;
vector<drag> v;
void calc(int cost, int i, int m)
{
if (i == n)
{
if (m != 0)
return;
if (cost == 0)
return;
if (cost < result)
result = cost;
}
else
{
if (cost >= result)
return;
// 次の製品がm = 0でもcostは高くなるのでx
if (m == 0 && cost > 0)
{
result = cost;
return;
}
if (m + v[i].m <= 0)
{
calc(cost + v[i].val, i + 1, m + v[i].m);
calc(cost, i + 1, m);
}
}
}
int main()
{
result = INT_MAX;
cin >> n >> ma >> mb;
v.resize(n);
for (int i = 0; i < n; i++)
{
int a, b;
cin >> a >> b >> v[i].val;
v[i].m = a * mb - b * ma;
}
sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.m < r.m; });
stable_sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.val < r.val; });
int plus = 0;
int minus = -1;
for (int i = 0; i < n; i++)
if (v[i].m >= 0)
{
if (minus == -1)
minus = i - 1;
plus += v[i].m;
}
if (minus >= 0 && plus + v[minus].m < 0)
{
printf("-1");
return 0;
}
calc(0, 0, 0);
if (result == INT_MAX)
result = -1;
printf("%d", result);
return 0;
}
| a.cc: In function 'int main()':
a.cc:56:18: error: 'INT_MAX' was not declared in this scope
56 | result = INT_MAX;
| ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
9 | #include <stack>
+++ |+#include <climits>
10 |
In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
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:2:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<drag*, std::vector<drag> >; _Value = const drag; _Compare = main()::<lambda(drag&, drag&)>]':
/usr/include/c++/14/bits/stl_algobase.h:1504:14: required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Tp = drag; _Compare = __gnu_cxx::__ops::_Iter_comp_val<main()::<lambda(drag&, drag&)> >]'
1504 | if (__comp(__middle, __val))
| ~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:2460:26: required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
2460 | = std::__lower_bound(__middle, __last, *__first_cut,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2461 | __gnu_cxx::__ops::__iter_comp_val(__comp));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:2754:34: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
2754 | std::__merge_without_buffer(__first, __middle, __last,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
2755 | __middle - __first,
| ~~~~~~~~~~~~~~~~~~~
2756 | __last - __middle,
| ~~~~~~~~~~~~~~~~~~
2757 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4956:28: required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
4956 | std::__inplace_stable_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5030:36: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = main()::<lambda(drag&, drag&)>]'
5030 | _GLIBCXX_STD_A::__stable_sort(__first, __last,
| ^
a.cc:66:13: required from here
66 | stable_sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.val < r.val; });
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:196:30: error: no match for call to '(main()::<lambda(drag&, drag&)>) (drag&, const drag&)'
196 | { return bool(_M_comp(*__it, __val)); }
| ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:196:30: note: candidate: 'bool (*)(drag&, drag&)' (conversion)
/usr/include/c++/14/bits/predefined_ops.h:196:30: note: conversion of argument 3 would be ill-formed:
/usr/include/c++/14/bits/predefined_ops.h:196:30: error: binding reference of type 'drag&' to 'const drag' discards qualifiers
a.cc:66:41: note: candidate: 'main()::<lambda(drag&, drag&)>' (near match)
66 | stable_sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.val < r.val; });
| ^
a.cc:66:41: note: conversion of argument 2 would be ill-formed:
a.cc:66:41: error: binding reference of type 'drag&' to 'const drag' discards qualifiers
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = const drag; _Iterator = __gnu_cxx::__normal_iterator<drag*, std::vector<drag> >; _Compare = main()::<lambda(drag&, drag&)>]':
/usr/include/c++/14/bits/stl_algo.h:1993:14: required from '_ForwardIterator std::__upper_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Tp = drag; _Compare = __gnu_cxx::__ops::_Val_comp_iter<main()::<lambda(drag&, drag&)> >]'
1993 | if (__comp(__val, __middle))
| ~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:2469:26: required from 'void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare) [with _BidirectionalIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Distance = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
2469 | = std::__upper_bound(__first, __middle, *__second_cut,
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2470 | __gnu_cxx::__ops::__val_comp_iter(__comp));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:2754:34: required from 'void std::__inplace_stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
2754 | std::__merge_without_buffer(__first, __middle, __last,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
2755 | __middle - __first,
| ~~~~~~~~~~~~~~~~~~~
2756 | __last - __middle,
| ~~~~~~~~~~~~~~~~~~
2757 | __comp);
| ~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4956:28: required from 'void std::__stable_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<main()::<lambda(drag&, drag&)> >]'
4956 | std::__inplace_stable_sort(__first, __last, __comp);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5030:36: required from 'void std::stable_sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<drag*, vector<drag> >; _Compare = main()::<lambda(drag&, drag&)>]'
5030 | _GLIBCXX_STD_A::__stable_sort(__first, __last,
| ^
a.cc:66:13: required from here
66 | stable_sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.val < r.val; });
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:240:30: error: no match for call to '(main()::<lambda(drag&, drag&)>) (const drag&, drag&)'
240 | { return bool(_M_comp(__val, *__it)); }
| ~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/predefined_ops.h:240:30: note: candidate: 'bool (*)(drag&, drag&)' (conversion)
/usr/include/c++/14/bits/predefined_ops.h:240:30: note: conversion of argument 2 would be ill-formed:
/usr/include/c++/14/bits/predefined_ops.h:240:30: error: binding reference of type 'drag&' to 'const drag' discards qualifiers
a.cc:66:41: note: candidate: 'main()::<lambda(drag&, drag&)>' (near match)
66 | stable_sort(v.begin(), v.end(), [](drag &l, drag &r) {return l.val < r.val; });
| ^
a.cc:66:41: note: conversion of argument 1 would be ill-formed:
a.cc:66:41: error: binding reference of type 'drag&' to 'const drag' discards qualifiers
|
s934347848 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
#define 1 14
int main(){
int a,b;
cin >> a >> b;
if(a > b )
cout << "Alice" << endl;
else if(a == b)
cout << "Draw" << endl;
else
cout << "Bob" << endl;
}
| a.cc:3:9: error: macro names must be identifiers
3 | #define 1 14
| ^
|
s065557083 | p03803 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int s1 = sc.nextInt();
int s3 = sc.nextInt();
if(s1=s3)System.out.println("Draw");
else if(s1==1)System.out.println("Alice");
else if(s3==1)System.out.println("Bob");
else if(s1>s3)System.out.println("Alice");
else if(s3<s1)System.out.println("Bob");
}
} | Main.java:8: error: incompatible types: int cannot be converted to boolean
if(s1=s3)System.out.println("Draw");
^
1 error
|
s626568355 | p03803 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int s1 = sc.nextInt();
int s3 = sc.nextInt();
if(s1=s3)System.out.println("Draw");
else if(s1==1||s1>s3)System.out.println("Alice");
else if(s3==1||s3<s1)System.out.println("Bob");
}
} | Main.java:8: error: incompatible types: int cannot be converted to boolean
if(s1=s3)System.out.println("Draw");
^
1 error
|
s936117537 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin>>b>>a;
if (a==b){
cout<<"Draw"<<endl;
}
else if (b>a||b==1){
cout<<"Bob"<<endl;
}
else if(){
cout<<"Alice"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:13:13: error: expected primary-expression before ')' token
13 | else if(){
| ^
|
s992926886 | p03803 | C | #include<stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a != 1){
if(b != 1){
if(a > b) printf("Alice");
else if(a < b) printf("Bob");
else printf("Draw");
}else if(a == 1) printf("Draw");
else printf("Bob");
else if(b == 1) printf("Draw");
else printf("Alice");
return 0;
}
| main.c: In function 'main':
main.c:12:3: error: expected '}' before 'else'
12 | else if(b == 1) printf("Draw");
| ^~~~
|
s725074860 | p03803 | C | #include<stdio.h>
int main(void){
int a,b;
scanf("%d %d",&a,&b);
if(a != 1){
if(b != 1){
if(a > b) printf("Alice");
else if(a < b) printf("Bob");
else printf("Draw");
}else if(a == 1) printf("Draw")
else printf("Bob")
else if(b == 1) printf("Draw");
else printf("Alice")
} | main.c: In function 'main':
main.c:10:36: error: expected ';' before 'else'
10 | }else if(a == 1) printf("Draw")
| ^
| ;
11 | else printf("Bob")
| ~~~~
main.c:13:23: error: expected ';' before '}' token
13 | else printf("Alice")
| ^
| ;
14 | }
| ~
main.c:14:1: error: expected declaration or statement at end of input
14 | }
| ^
|
s995045957 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(long long (i)=0;(i)<(n);(i)++)
#define ll long long
#define pr_qu priority_queue
#define vec(name,size,common) vector<ll> (name)((size),(common))
int main(){
int a,b;
cin>>a>>b;
if(a==1){
a=100;
}
if(b==1){
b=100;
if(a>b){
cout<<"Alice";
}else if(a==b){
cout<<"Draw";
}else{
cout<<"Bob";
}
} | a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
30 | }
| ^
a.cc:13:11: note: to match this '{'
13 | int main(){
| ^
|
s430858827 | p03803 | C | #include <stdio.h>
int main() {
int n, m, l, k,t;
scanf("%d%d",&n,&m);
if(n==m){
printf("Draw\n");
} else if(n>m&&m==1){
printf("Bob\n");
}
else if(n>m&&m!=1){
printf("Alice\n");
}
else if(n<m&&n==1){
printf("Alice\n");
} else if(n<m&&n!=1){
printf("Bob\n");
}
return 0; | main.c: In function 'main':
main.c:19:5: error: expected declaration or statement at end of input
19 | return 0;
| ^~~~~~
|
s175584913 | p03803 | C | #include <stdio.h>
int main() {
int n, m, l, k,t;
scanf("%d%d",&n,&m);
if(n==m){
printf("Draw\n");
} else if(n>m&&m==1){
printf("Bob\n");
}
else if(n>m&&m!=1){
printf("Alice\n");
}
else if(n<m&&n==1){
printf("Alice\n");
} else if(n<m&&n!=1){
printf("Bob\n");
}
return | main.c: In function 'main':
main.c:19:5: error: expected expression at end of input
19 | return
| ^~~~~~
main.c:19:5: error: expected declaration or statement at end of input
|
s392862289 | p03803 | C | include <stdio.h>
int main() {
int n, m, l, k,t;
scanf("%d%d",&n,&m);
if(n==m){
printf("Draw\n");
} else if(n>m&&m==1){
printf("Bob\n");
}
else if(n>m&&m!=1){
printf("Alice\n");
}
else if(n<m&&n==1){
printf("Alice\n");
} else if(n<m&&n!=1){
printf("Bob\n");
}
return | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s687958374 | p03803 | C++ | #include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
int a, b, c, d;
cin >> a >> b;
if(a==1) a=14;
if(b==1) b=14
if(a>b) co("Alice");
else if(a==b) co("Draw");
else co("Bob");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:16: error: expected ';' before 'if'
9 | if(b==1) b=14
| ^
| ;
10 | if(a>b) co("Alice");
| ~~
|
s431081829 | p03803 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a>>b;
if(a==b) cout << "Draw" <<endl;
else if(a==1) cout <<"Alice" << endl;
else if(b==1) cout << "Bob" << endl;
else if(a<b) cout << "Bob" << endl;
else cout << "Alice" << endl;
return 0;
] | a.cc: In function 'int main()':
a.cc:12:1: error: expected primary-expression before ']' token
12 | ]
| ^
a.cc:12:2: error: expected '}' at end of input
12 | ]
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s294659715 | p03803 | C++ | a,b = map(int,input().split())
dic = ['Alice','Bob','Draw']
ans = 0
rev = 1
if a==b:
ans = 2
elif a>b:
ans = 0
else:
ans = 1
if (a==1 or b==1) and ans!=2:
ans ^= 1
print(dic[ans])
| a.cc:2:8: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
2 | dic = ['Alice','Bob','Draw']
| ^~~~~~~
a.cc:2:16: warning: multi-character character constant [-Wmultichar]
2 | dic = ['Alice','Bob','Draw']
| ^~~~~
a.cc:2:22: warning: multi-character character constant [-Wmultichar]
2 | dic = ['Alice','Bob','Draw']
| ^~~~~~
a.cc:1:1: error: 'a' does not name a type
1 | a,b = map(int,input().split())
| ^
|
s428088159 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin>>a>>b;
if (a==b){
cout<<"Draw"<<endl;
}
else if (b==1<a){
cout<<"Bob"<<endl;
}
else
cout<<"Alice"<<endl;
}
} | a.cc:16:1: error: expected declaration before '}' token
16 | }
| ^
|
s511663034 | p03803 | C | #include<stdio.h>
int main()
{
int A,B;
1<=A<=13;
1<=B<=13;
scanf("%d %d",&A,&B);
if(A!==1 && B!==1)
{
if(A>B)
printf("Alice");
else if(A<B)
printf("Bob");
else
printf("Draw");
}
else if(A==1 && B!==1)
printf("Alice");
else if(B==1 && A!==1)
printf("Bob");
else
printf("Draw");
}
| main.c: In function 'main':
main.c:8:15: error: expected expression before '=' token
8 | if(A!==1 && B!==1)
| ^
main.c:17:28: error: expected expression before '=' token
17 | else if(A==1 && B!==1)
| ^
|
s052094730 | p03803 | C | #include<stdio.h>
int main()
{
int A,B;
1<=A<=13;
1<=B<=13;
scanf("%d %d",&A,&B);
if(A!==1;B!==1)
{
if(A>B)
printf("Alice");
else if(A<B)
printf("Bob");
else
printf("Draw");
}
else if(A==1;B!==1)
printf("Alice");
else if(B==1;A!==1)
printf("Bob");
else
printf("Draw");
}
| main.c: In function 'main':
main.c:8:15: error: expected expression before '=' token
8 | if(A!==1;B!==1)
| ^
main.c:17:21: error: expected ')' before ';' token
17 | else if(A==1;B!==1)
| ~ ^
| )
main.c:19:29: error: expected ')' before ';' token
19 | else if(B==1;A!==1)
| ~ ^
| )
|
s437504729 | p03803 | C | #include<stdio.h>
int main()
{
int A,B;
1<=A<=13;
1<=B<=13;
scanf("%d %d",&A,&B);
if(A!==1;B!==1)
{
if(A>B)
printf("Alice");
else if(A<B)
printf("Bob");
else
printf("Draw");
}
else if(A==1;B!==1)
printf("Alice");
else if(B==1;A!==1)
printf("Bob");
else
printf("Draw");
}
| main.c: In function 'main':
main.c:8:15: error: expected expression before '=' token
8 | if(A!==1;B!==1)
| ^
main.c:17:21: error: expected ')' before ';' token
17 | else if(A==1;B!==1)
| ~ ^
| )
main.c:19:29: error: expected ')' before ';' token
19 | else if(B==1;A!==1)
| ~ ^
| )
|
s804566381 | p03803 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <limits.h>
#include <cmath>
#include <queue>
#include <map>
#include <iomanip>
#include <random>
#include <fstream>
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.14159265358979323846
#define MOD 1000000007
using namespace std;
using ll = long long;
const int MAX = 1000000;
ll fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++){
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
// 二項係数計算
long long COM(int n, int k){
if (n < k) return 0;
if (n < 0 || k < 0) return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
ll gcd(ll a, ll b)
{
ll r;
while ((r = a % b))
{
a = b;
b = r;
}
return b;
}
template <class T> struct cord{
T x,y;
};
template <class T> double dist(cord<T> a, cord<T> b){
T dx=a.x-b.x;
T dy=a.y-b.y;
return sqrt(dx*dx+dy*dy);
}
int main()
{
//cout << fixed << setprecision(10);
int a,b; cin >> a >> b;
if (a==1 && b==1){cout << "Draw";}
else if (a==1){cout << "Alice";}
else if (b==1){cout << "Bob";}
else if (a>b){cout << "Alice;"}
else if (a==b){cout << "Draw";}
else if (a<b){cout << "Bob";}
return 0;
}
| a.cc: In function 'int main()':
a.cc:72:33: error: expected ';' before '}' token
72 | else if (a>b){cout << "Alice;"}
| ^
| ;
|
s690644472 | p03803 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <climits>
using namespace std;
bool comp(pair<int, string> a, pair<int, string> b){
if(a.first != b.first) return a.first > b.first;
else return a.second < b.second;
}
long int jou(long int x, long int y){
long int f = 1;
for(int i = 0; i < y; ++i){
f = f * x % int(powl(10,9) + 7);
}
return f;
}
bool pn(long int x){
if(x != 2 && x % 2 == 0)
return false;
for(int i = 3; i < x; ++i){
if(x != i && x % i == 0)
return false;
}
return true;
}
int main(){
int a,b;
cin >> a >> b;
if(a == b)
cout << "Draw" << endl;
else if((b == 1 || (a != 1 && a < b))
cout << "Bob" << endl;
else
cout << "Alice" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:42:42: error: expected ';' before 'cout'
42 | else if((b == 1 || (a != 1 && a < b))
| ^
| ;
43 | cout << "Bob" << endl;
| ~~~~
a.cc:44:5: error: expected primary-expression before 'else'
44 | else
| ^~~~
a.cc:43:31: error: expected ')' before 'else'
43 | cout << "Bob" << endl;
| ^
| )
44 | else
| ~~~~
a.cc:42:12: note: to match this '('
42 | else if((b == 1 || (a != 1 && a < b))
| ^
|
s883351787 | p03803 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <climits>
using namespace std;
bool comp(pair<int, string> a, pair<int, string> b){
if(a.first != b.first) return a.first > b.first;
else return a.second < b.second;
}
long int jou(long int x, long int y){
long int f = 1;
for(int i = 0; i < y; ++i){
f = f * x % int(powl(10,9) + 7);
}
return f;
}
bool pn(long int x){
if(x != 2 && x % 2 == 0)
return false;
for(int i = 3; i < x; ++i){
if(x != i && x % i == 0)
return false;
}
return true;
}
int main(){
int a,b;
cin > a >> b;
if(a > b)
cout << "Alice" << endl;
else if(a < b)
cout << "Bob" << endl;
else
cout << "Draw" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:39:9: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
39 | cin > a >> b;
| ~~~ ^ ~~~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:39:9: note: candidate: 'operator>(int, int)' (built-in)
39 | cin > a >> b;
| ~~~~^~~~~~~~
a.cc:39:9: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
39 | cin > a >> b;
| ^
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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
39 | cin > a >> b;
| ^
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:39:16: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
39 | cin > a >> b;
| ^
/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:39:16: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
39 | cin > a >> b;
| ^
/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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
39 | cin > a >> b;
| ^
/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:39:16: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>'
39 | cin > a >> b;
| ^
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:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
39 | cin > a >> b;
| ^
In file included from /usr/include/c++/14/vector:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:2102:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)'
2102 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:2102:5: note: template argument deduction/substitution failed:
a.cc:39:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::vector<_Tp, _Alloc>'
39 | cin > a >> b;
| ^
|
s586917822 | p03803 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if(a==b){
cout << "Draw" << endl;
}else{
if(a==1){
cout << "Alice" << endl;
}else if(b==1){
cout << "Bob" << endl;
}else{
if(a>b){
cout << "Alice" << endl;
}else{
cout << "Bob" << endl;
}
}
}
}
}
| a.cc:23:1: error: expected declaration before '}' token
23 | }
| ^
|
s676297423 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
if(a == 1){
a = 14;
}
if(b == 1){
b = 14;
]
if(a>b){
cout << "Alice" <<endl ;
}
else if(a<b){
cout <<"Bob" <<endl ;
}
else if{ cout <<"Draw" <<endl ;}
}
| a.cc: In function 'int main()':
a.cc:13:5: error: expected primary-expression before ']' token
13 | ]
| ^
a.cc:19:5: error: expected '}' before 'else'
19 | else if(a<b){
| ^~~~
a.cc:11:15: note: to match this '{'
11 | if(b == 1){
| ^
a.cc:22:12: error: expected '(' before '{' token
22 | else if{ cout <<"Draw" <<endl ;}
| ^
| (
|
s907327899 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
if(a == 1){
a = 14;
}
if(b == 1){
b = 14;
]
if(a>b){
cout << "Alice" <<endl ;
}
else if(a<b){
cout <<"Bob" <<endl ;
}
else{ cout <<"Draw" <<endl ;}
} | a.cc: In function 'int main()':
a.cc:13:5: error: expected primary-expression before ']' token
13 | ]
| ^
a.cc:19:5: error: expected '}' before 'else'
19 | else if(a<b){
| ^~~~
a.cc:11:15: note: to match this '{'
11 | if(b == 1){
| ^
|
s202215196 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
if(a == 1){
a = 14;
}
if(b == 1){
b = 14;
]
if(a>b){
cout << "Alice" <<endl ;
}
else if(a<b){
cout <<"Bob" <<endl ;
}
else cout <<"Draw" <<endl ;
} | a.cc: In function 'int main()':
a.cc:13:5: error: expected primary-expression before ']' token
13 | ]
| ^
a.cc:19:5: error: expected '}' before 'else'
19 | else if(a<b){
| ^~~~
a.cc:11:15: note: to match this '{'
11 | if(b == 1){
| ^
|
s001938072 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
if(a == 1){
a = 14;
}
if(b == 1){
b = 14
]
if(a>b){
cout << "Alice" <<endl ;
}
else if(a<b){
cout <<"Bob" <<endl ;
}
else cout <<"Draw" <<endl ;
} | a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before ']' token
12 | b = 14
| ^
| ;
13 | ]
| ~
a.cc:19:5: error: expected '}' before 'else'
19 | else if(a<b){
| ^~~~
a.cc:11:15: note: to match this '{'
11 | if(b == 1){
| ^
|
s943447994 | p03803 | C++ | #include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,b;
cin >> a >> b;
if(a == 1){
a = 14;
}
if(b == 1){
b = 14
]
if(a>b){
cout << "Alice"
}
else if(a<b){
cout <<"Bob"
}
else cout <<"Draw" <<endl ;
} | a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before ']' token
12 | b = 14
| ^
| ;
13 | ]
| ~
a.cc:19:5: error: expected '}' before 'else'
19 | else if(a<b){
| ^~~~
a.cc:11:15: note: to match this '{'
11 | if(b == 1){
| ^
a.cc:20:21: error: expected ';' before '}' token
20 | cout <<"Bob"
| ^
| ;
21 | }
| ~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.