submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s164632899 | p03711 | C++ | #include "bits/stdc++.h"
using namespace std;
int main(void){
int a[2],group[2];
string ans;
cin >> a[0] >> a[1];
for (int i=0;i<2;i++){
if (a[i]==1||a[i]==3||a[i]==5||a[i]==7||a[i]==8||a[i]==10||a[i]==12)
group[i] = 0;
else if (a[i]==4||a[i]==6||a[i]==9||a[i]==11||)
group[i] = 1;
else
group[i] = 2;
}
if (group[0]==group[1]){
ans = "Yes";
}else {
ans = "No";
}
cout << ans << endl;
}
| a.cc: In function 'int main()':
a.cc:10:51: error: expected primary-expression before ')' token
10 | else if (a[i]==4||a[i]==6||a[i]==9||a[i]==11||)
| ^
|
s693761747 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[] = {1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
cin >> x >> y;
if(a[x-1] == b[y-1]){
cout >> "Yes" >> endl;
}else{
cout >> "No" >> endl;
}
} | a.cc: In function 'int main()':
a.cc:8:16: error: 'b' was not declared in this scope
8 | if(a[x-1] == b[y-1]){
| ^
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
9 | cout >> "Yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> "Yes" >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/istream:1109,
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/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:9:13: required from here
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:207:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std:: |
s396982951 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[] = {1,3,1,2,1,2,1,1,2,1,2,1};
int x,y,;
cin >> x >> y;
if(a[x-1] == b[y-1]){
cout >> "Yes" >> endl;
}else{
cout >> "No" >> endl;
}
} | a.cc: In function 'int main()':
a.cc:6:11: error: expected unqualified-id before ';' token
6 | int x,y,;
| ^
a.cc:8:16: error: 'b' was not declared in this scope
8 | if(a[x-1] == b[y-1]){
| ^
a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
9 | cout >> "Yes" >> endl;
| ~~~~ ^~ ~~~~~
| | |
| | const char [4]
| std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41,
from a.cc:1:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> "Yes" >> endl;
| ^~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)'
1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
| ^~~~~~~~
/usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
In file included from /usr/include/c++/14/istream:1109,
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/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = const char (&)[4]]':
a.cc:9:13: required from here
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)'
509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
| ^~~~~~~~
/usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143:
/usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)'
76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)'
106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)'
137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)'
177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f)
| ^~~~~~~~
/usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed:
a.cc:9:13: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> "Yes" >> endl;
| ^~~~~
/usr/include/c++/14/iomanip:207:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setprecision)'
207 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setprecision __f)
| ^~~~~~~~
/usr/include/c++/1 |
s058325930 | p03711 | C++ | #include<bits/stdc++>
using namespace std;
int main(){
int a[] = {1,3,1,2,1,2,1,1,2,1,2,1};
int x,y,;
cin >> x >> y;
if(a[x-1] == b[y-1]){
cout >> "Yes" >> endl;
}else{
cout >> "No" >> endl;
}
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s350344101 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>a>>b;
cout<<{"Yes","No"}[g[a]==g[b]];
} | a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '{' token
6 | cout<<{"Yes","No"}[g[a]==g[b]];
| ^
a.cc:6:23: error: expected ',' before '[' token
6 | cout<<{"Yes","No"}[g[a]==g[b]];
| ^
| ,
a.cc:6:23: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:6:33: error: expected '{' before ';' token
6 | cout<<{"Yes","No"}[g[a]==g[b]];
| ^
|
s458438702 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>a>>b;
cout<<g[a]==g[b]?"Yes":"No";
} | a.cc: In function 'int main()':
a.cc:6:13: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int')
6 | cout<<g[a]==g[b]?"Yes":"No";
| ~~~~~~~~~~^~~~~~
| | |
| | int
| std::basic_ostream<char>
a.cc:6:13: note: candidate: 'operator==(int, int)' (built-in)
6 | cout<<g[a]==g[b]?"Yes":"No";
| ~~~~~~~~~~^~~~~~
a.cc:6:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
In file included from /usr/include/c++/14/string:48:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
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:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
629 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
637 | operator==(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/string_view:644: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>)'
644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/basic_string.h:3755: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>&)'
3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
/usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3819 | operator==(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
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:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2558 | operator==(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46:
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)'
234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
| ^~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed:
a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
6 | cout<<g[a]==g[b]?"Yes":"No";
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:449:3: note: candidate: 'bool std::operator==(const error_code&, const error_code&)'
449 | operator==(const error_code& |
s841464863 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>a>>b;
cout<<(g[a]==g[b]?"Yes":"No");
} | a.cc: In function 'int main()':
a.cc:4:11: error: scalar object 'g' requires one element in initializer
4 | int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s044415880 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
cin>>a>>b;
cout<<(g[a]==g[b]?"Yes":"No");
} | a.cc: In function 'int main()':
a.cc:4:11: error: scalar object 'g' requires one element in initializer
4 | int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
a.cc:5:3: error: expected ',' or ';' before 'cin'
5 | cin>>a>>b;
| ^~~
|
s208158892 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
cin>>a>>b;
cout<<g[a]==g[b]?"Yes":"No";
} | a.cc: In function 'int main()':
a.cc:4:11: error: scalar object 'g' requires one element in initializer
4 | int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
a.cc:5:3: error: expected ',' or ';' before 'cin'
5 | cin>>a>>b;
| ^~~
|
s621655607 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
cin>>a>>b;
cout<<if g[a]==g[b]?"Yes":"No";
} | a.cc: In function 'int main()':
a.cc:4:11: error: scalar object 'g' requires one element in initializer
4 | int a,b,g={0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
a.cc:5:3: error: expected ',' or ';' before 'cin'
5 | cin>>a>>b;
| ^~~
a.cc:6:9: error: expected primary-expression before 'if'
6 | cout<<if g[a]==g[b]?"Yes":"No";
| ^~
|
s772167719 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
int g1[]={1,3,5,7,8,10,12},g2[]={4,6,9,11},g3[]={2};
cin>>a>>b;
if(g1.find(a)&&g1.find(b))cout<<"Yes";
if(g2.find(a)&&g2.find(b))cout<<"Yes";
if(g3.find(a)&&G3.find(b))cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'find' in 'g1', which is of non-class type 'int [7]'
7 | if(g1.find(a)&&g1.find(b))cout<<"Yes";
| ^~~~
a.cc:7:21: error: request for member 'find' in 'g1', which is of non-class type 'int [7]'
7 | if(g1.find(a)&&g1.find(b))cout<<"Yes";
| ^~~~
a.cc:8:9: error: request for member 'find' in 'g2', which is of non-class type 'int [4]'
8 | if(g2.find(a)&&g2.find(b))cout<<"Yes";
| ^~~~
a.cc:8:21: error: request for member 'find' in 'g2', which is of non-class type 'int [4]'
8 | if(g2.find(a)&&g2.find(b))cout<<"Yes";
| ^~~~
a.cc:9:9: error: request for member 'find' in 'g3', which is of non-class type 'int [1]'
9 | if(g3.find(a)&&G3.find(b))cout<<"Yes";
| ^~~~
a.cc:9:18: error: 'G3' was not declared in this scope; did you mean 'g3'?
9 | if(g3.find(a)&&G3.find(b))cout<<"Yes";
| ^~
| g3
|
s166718345 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
int g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3={2};
cin>>a>>b;
if(g1.find(a)&&g1.find(b))cout<<"Yes";
if(g2.find(a)&&g2.find(b))cout<<"Yes";
if(g3.find(a)&&G3.find(b))cout<<"Yes";
else cout<<"No";
} | a.cc: In function 'int main()':
a.cc:5:7: error: scalar object 'g1' requires one element in initializer
5 | int g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3={2};
| ^~
a.cc:5:28: error: scalar object 'g2' requires one element in initializer
5 | int g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3={2};
| ^~
a.cc:9:9: error: request for member 'find' in 'g3', which is of non-class type 'int'
9 | if(g3.find(a)&&G3.find(b))cout<<"Yes";
| ^~~~
a.cc:9:18: error: 'G3' was not declared in this scope; did you mean 'g3'?
9 | if(g3.find(a)&&G3.find(b))cout<<"Yes";
| ^~
| g3
|
s713465114 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> vec(13);
vec = {0,1,3,1,2,1,2,1,1,2,1,2,1}
if(vec.at(x) == vec.at(y)) {
cout << "Yes" << endl;
}else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:42: error: expected ';' before 'if'
9 | vec = {0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
| ;
10 |
11 | if(vec.at(x) == vec.at(y)) {
| ~~
a.cc:13:6: error: 'else' without a previous 'if'
13 | }else {
| ^~~~
|
s782755949 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>A()={1,3,5,7,8,12};
vector<int>B()={4,6,9,10};
bool f=false;
for(int i=0;i<5;i++){
for(int j=i+1;j<6;j++){
if(A[i]==x&&A[i]==y)
f=true;
}
}
for(int i=0;i<3;i++){
for(int j=i+1;j<4;j++){
if(B[i]==x&&B[i]==y)
f=true;
}
}
if(f)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:15: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
7 | vector<int>A()={1,3,5,7,8,12};
| ^~
a.cc:7:15: note: remove parentheses to default-initialize a variable
7 | vector<int>A()={1,3,5,7,8,12};
| ^~
| --
a.cc:7:16: warning: declaration of 'std::vector<int> A()' has 'extern' and is initialized
7 | vector<int>A()={1,3,5,7,8,12};
| ^
a.cc:7:19: error: invalid pure specifier (only '= 0' is allowed) before numeric constant
7 | vector<int>A()={1,3,5,7,8,12};
| ^
a.cc:7:14: error: function 'std::vector<int> A()' is initialized like a variable
7 | vector<int>A()={1,3,5,7,8,12};
| ^
a.cc:7:31: error: expected ',' or ';' before '}' token
7 | vector<int>A()={1,3,5,7,8,12};
| ^
a.cc: At global scope:
a.cc:8:19: error: invalid pure specifier (only '= 0' is allowed) before numeric constant
8 | vector<int>B()={4,6,9,10};
| ^
a.cc:8:14: error: function 'std::vector<int> B()' is initialized like a variable
8 | vector<int>B()={4,6,9,10};
| ^
a.cc:8:27: error: expected ',' or ';' before '}' token
8 | vector<int>B()={4,6,9,10};
| ^
a.cc:8:27: error: expected declaration before '}' token
a.cc:11:3: error: expected unqualified-id before 'for'
11 | for(int i=0;i<5;i++){
| ^~~
a.cc:11:15: error: 'i' does not name a type
11 | for(int i=0;i<5;i++){
| ^
a.cc:11:19: error: 'i' does not name a type
11 | for(int i=0;i<5;i++){
| ^
a.cc:17:3: error: expected unqualified-id before 'for'
17 | for(int i=0;i<3;i++){
| ^~~
a.cc:17:15: error: 'i' does not name a type
17 | for(int i=0;i<3;i++){
| ^
a.cc:17:19: error: 'i' does not name a type
17 | for(int i=0;i<3;i++){
| ^
a.cc:23:3: error: expected unqualified-id before 'if'
23 | if(f)
| ^~
a.cc:25:3: error: expected unqualified-id before 'else'
25 | else
| ^~~~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
|
s773169914 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin<<x<<y;
vector<int>A()={1,3,5,7,8,12};
vector<int>B()={4,6,9,10};
bool f=false;
for(int i=0;i<5;i++){
for(int j=i+1;j<6;j++){
if(A[i]==x&&A[i]==y)
f=true;
}
}
for(int i=0;i<3;i++){
for(int j=i+1;j<4;j++){
if(B[i]==x&&B[i]==y)
f=true;
}
}
if(f)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin<<x<<y;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:6: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin<<x<<y;
| ~~~^~~
a.cc:6:6: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:6:3: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin<<x<<y;
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | cin<<x<<y;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<ch |
s319030767 | p03711 | C++ | import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Control.Monad
import Data.List
getGroup :: Int -> Int
getGroup 2 = 2
getGroup x
| elem x [4, 6, 9, 11] = 1
| otherwise = 0
solve :: Int -> Int -> String
solve x y
| (getGroup x) == (getGroup y) = "Yes"
| otherwise = "No"
main :: IO ()
main = do
[x, y] <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
putStrLn $ solve x y
| a.cc:1:1: error: 'import' does not name a type
1 | import qualified Data.ByteString.Char8 as BS
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s501716333 | p03711 | C++ | #include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if(x==2 || y==2) cout << "No";
else {
int a[13], b[13];
for(int i = 0;i<13;i++){
a[i] =0;
b[i] =0;
}
//冗長すぎるが...
a[1]=1; a[3]=1; a[5]=1; a[7]=1; a[8]=1;a[10]=1;a[12]=1;
b[4]=1;b[6]=1;b[9]=1;b[11]=1;
if(a[x]==1 && a[y]==1) cout << "Yes";
else if(b[x]==1 && b[y]==1) cout << "Yes":
else cout << "No";
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:23:58: error: expected ';' before ':' token
23 | else if(b[x]==1 && b[y]==1) cout << "Yes":
| ^
| ;
|
s262157554 | p03711 | C++ | #include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if(x==2 || y==2) cout << "No";
else if{
int a[13], b[13];
for(int i = 0;i<13;i++){
a[i] =0;
b[i] =0;
}
//冗長すぎるが...
a[1]=1; a[3]=1; a[5]=1; a[7]=1; a[8]=1;a[10]=1;a[12]=1;
b[4]=1;b[6]=1;b[9]=1;b[11]=1;
if(a[x]==1 && a[y]==1) cout << "Yes";
else if(b[x]==1 && b[y]==1) << "Yes":
else cout << "No";
}
cout << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:16: error: expected '(' before '{' token
10 | else if{
| ^
| (
|
s229031539 | p03711 | C++ | #include<iostream>
using namespace std;
int sel(int i){
switch(i){
case(4):
case(6):
case(9):
case(11):i=2;break;
case(2):i=3;break;
default:i=1;break;
}
return i;
}
int main(){
int x,y;
cin>>x,y;
sel(x);sel(y);
cout<<(x=y?"Yes":"No")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:21:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
21 | cout<<(x=y?"Yes":"No")<<endl;
| ~^~~~~~~~~~~
| |
| const char*
|
s905608744 | p03711 | C++ | #include<iostream>
using namespace std;
int sel(int i){
switch(i){
case(4):
case(6):
case(9):
case(11):i=2;break;
case(2):i=3;break;
default:i=1;break;
}
return i;
}
int main(){
int x,y;
cin>>x,y;
sel x;sel y;
cout<<(x=y?"Yes":"No")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:20:6: error: expected ';' before 'x'
20 | sel x;sel y;
| ^~
| ;
a.cc:20:12: error: expected ';' before 'y'
20 | sel x;sel y;
| ^~
| ;
a.cc:21:13: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
21 | cout<<(x=y?"Yes":"No")<<endl;
| ~^~~~~~~~~~~
| |
| const char*
|
s487041459 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int x, y, mon = {0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0};
cin >> x >> y;
cout << (mon[x - 1] == mon[y - 1] ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: scalar object 'mon' requires one element in initializer
6 | int x, y, mon = {0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0};
| ^~~
|
s390524481 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a [] = {0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1}
string c,b;
cin>>c>>b;
if(a[c]==a[b]){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:2: error: expected ',' or ';' before 'string'
6 | string c,b;
| ^~~~~~
a.cc:7:8: error: 'c' was not declared in this scope
7 | cin>>c>>b;
| ^
a.cc:7:11: error: 'b' was not declared in this scope
7 | cin>>c>>b;
| ^
|
s408991416 | p03711 | Java | import java.util.*;
public class Main{
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int[] a = {0,2,0,1,0,1,0,0,1,0,1,0};
if(a[x-1]==b[y-1])
System.out.println("Yes");else System.out.println("No");
}
} | Main.java:8: error: cannot find symbol
if(a[x-1]==b[y-1])
^
symbol: variable b
location: class Main
1 error
|
s548911520 | p03711 | C++ | [x,y] = list(map(int, input().split()))
s1 = [1,3,5,7,8,10,12]
s2 = [4,6,9,11]
if x == 2:
print("No")
elif x in s1 and y in s1:
print("Yes")
elif x in s2 and y in s2:
print("Yes")
else:
print("No") | a.cc:1:1: error: expected unqualified-id before '[' token
1 | [x,y] = list(map(int, input().split()))
| ^
|
s733467865 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int b,c;
cin>>b>>c;
if(a[b]==a[c]){
cout<<“Yes”;
}
else{
cout<<“No”;
}
}
| a.cc:3:2: error: extended character is not valid in an identifier
3 |
| ^
a.cc:9:16: error: extended character “ is not valid in an identifier
9 | cout<<“Yes”;
| ^
a.cc:9:16: error: extended character ” is not valid in an identifier
a.cc:12:15: error: extended character “ is not valid in an identifier
12 | cout<<“No”;
| ^
a.cc:12:15: error: extended character ” is not valid in an identifier
a.cc:3:2: error: '\U000000a0' does not name a type
3 |
| ^
|
s994265537 | p03711 | C++ | 1. #include <bits/stdc++.h>
2. using namespace std;
3.
4. int main(){
5. int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
6. int cin>>b>>c;
7. if(a[b]==a[c]){
8. cout<<“Yes”;
9. }
10. else{
11. cout<<“No”;
12. }
13. }
| a.cc:1:4: error: stray '#' in program
1 | 1. #include <bits/stdc++.h>
| ^
a.cc:3:4: error: extended character is not valid in an identifier
3 | 3.
| ^
a.cc:8:18: error: extended character “ is not valid in an identifier
8 | 8. cout<<“Yes”;
| ^
a.cc:8:18: error: extended character ” is not valid in an identifier
a.cc:11:18: error: extended character “ is not valid in an identifier
11 | 11. cout<<“No”;
| ^
a.cc:11:18: error: extended character ” is not valid in an identifier
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1. #include <bits/stdc++.h>
| ^~
a.cc:3:1: error: expected unqualified-id before numeric constant
3 | 3.
| ^~
|
s364801236 | p03711 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#define _CRT_SECURE_NO_WARNINGS
#define TLong long long
// fact(n)
int fact(int n){
if(n == 1) return 1;
else return (n * fact(n - 1));
}
// combination(n,r)
int combination(int n, int r){
if(r == 0 || r == n) return 1;
else if(r == 1) return n;
return (combination(n - 1, r - 1) + combination(n - 1, r));
}
// gcd(a,b)
int gcd(int a,int b){
int ret;
ret = (b == 0) ? a : gcd(b, a % b);
return ret;
}
// lcm(a.b)
int lcm(int a,int b){
return (a * b) / gcd(a,b);
}
// qsort(array, size, sizeof(int),comp);
int comp(const int *a,const int *b){
return (*a - *b);
}
// append(array,*size,addNum)
void append(int *array,int *size,int num){
realloc(array, sizeof(int) * (*size + 1));
array[(*size)] = num;
++(*size);
}
// pop(array,*size) & nongetpop(array,*size)
int pop(int *array,int *size){
int temp = array[(*size - 1)];
realloc(array,sizeof(int) * (*size - 1));
--(*size);
return temp;
}
void nongetpop(int *array,int *size){
realloc(array,sizeof(int) * (*size - 1));
--(*size);
}
int main(int argc, char const *argv[]){
int num[2],gp[] = {0,1,3,1,2,1,2,1,1,2,1,2,1};
scanf("%d%d",&num[0],&num[1]);
for (int i = 0; i < 2; ++i)
{
if(gp[num[0]] == gp[num[1]]) puts("Yes");
else puts("No");
return 0;
}
| main.c: In function 'main':
main.c:69:9: error: expected declaration or statement at end of input
69 | }
| ^
main.c: In function 'append':
main.c:43:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result]
43 | realloc(array, sizeof(int) * (*size + 1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c: In function 'pop':
main.c:51:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result]
51 | realloc(array,sizeof(int) * (*size - 1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c: In function 'nongetpop':
main.c:57:9: warning: ignoring return value of 'realloc' declared with attribute 'warn_unused_result' [-Wunused-result]
57 | realloc(array,sizeof(int) * (*size - 1));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s021768722 | p03711 | C++ | #include <iostream>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <climits>
using namespace std;
typedef long long int ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
ll MOD = 1000000007;
#define INF (1e9)
ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
typedef pair <ll,ll> P;
int main()
{
ll x, y;
cin >> x >>y;
set<ll> s1;
set<ll> s2;
s1.insert(1);
s1.insert(3);
s1.insert(5);
s1.insert(7);
s1.insert(6);
s1.insert(10);
s1.insert(12);
s2.insert(4);
s2.insert(6);
s2.insert(9);
s2.insert(11);
if (x == 2 | y == 2) {
cout << "No" << endl;
} else if (s1.find(x) & s1.find(y)) {
cout << "Yes" << endl;
} else if (s1.find(x) & s1.find(y)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:49:27: error: no match for 'operator&' (operand types are 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} and 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'})
49 | } else if (s1.find(x) & s1.find(y)) {
| ~~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| | _Rb_tree_const_iterator<[...]>
| _Rb_tree_const_iterator<[...]>
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68,
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/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
141 | operator&(byte __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::byte'
141 | operator&(byte __l, byte __r) noexcept
| ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Fmtflags'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Openmode'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Iostate'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~^~~
a.cc:51:27: error: no match for 'operator&' (operand types are 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} and 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'})
51 | } else if (s1.find(x) & s1.find(y)) {
| ~~~~~~~~~~ ^ ~~~~~~~~~~
| | |
| | _Rb_tree_const_iterator<[...]>
| _Rb_tree_const_iterator<[...]>
/usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)'
141 | operator&(byte __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::byte'
141 | operator&(byte __l, byte __r) noexcept
| ~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Fmtflags'
84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Openmode'
134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ^~~~~~~~
/usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::set<long long int>::iterator' {aka 'std::_Rb_tree<long long int, long long int, std::_Identity<long long int>, std::less<long long int>, std::allocator<long long int> >::const_iterator'} to 'std::_Ios_Iostate'
181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW
| ~~~~~~~~~~~~~^~~
|
s699201394 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
vector<int> x (2);
cin >> x[0] >> x[1] ;
for (int i = 0; i < 2; ++i)
{
switch(x[i]){
case 1, 3, 5, 7, 10, 12:
x[i] = 1;
break;
case 4, 6, 9, 11:
x[i] = 2;
break;
default:
x[i] = 3;
break;
}
}
if (x[0] == x[1])
{
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:31: error: expected ':' before ',' token
10 | case 1, 3, 5, 7, 10, 12:
| ^
| :
a.cc:10:31: error: expected primary-expression before ',' token
a.cc:13:31: error: expected ':' before ',' token
13 | case 4, 6, 9, 11:
| ^
| :
a.cc:13:31: error: expected primary-expression before ',' token
|
s363699482 | p03711 | Java | import java.io.PrintWriter;
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
//String S = sc.next();
//int N = Integer.parseInt(sc.next());
//out.println();
// ArrayList<String> list = new ArrayList<String>();
// list.stream().sorted().distinct();
int a[] = [1,3,5,7,8,10,12];
int b[] = [4,6,9,11];
int c[] = [2];
int A = Integer.parseInt(sc.next());
int B = Integer.parseInt(sc.next());
if((a.contains(A) && a.contains(B))
|| (b.contains(A) && b.contains(B))
|| (c.contains(A) && c.contains(B))){
out.println("Yes");
}else {
out.println("No");
}
out.flush();
}
} | Main.java:12: error: illegal start of expression
int a[] = [1,3,5,7,8,10,12];
^
Main.java:13: error: illegal start of expression
int b[] = [4,6,9,11];
^
Main.java:14: error: illegal start of expression
int c[] = [2];
^
3 errors
|
s136120853 | p03711 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
using namespace std;
int main()
int ans[] = {1,2,1,3,1,3,1,3,1,3,1,3,1};
int a, b;
cin >> a >> b;
if(ans[a-1] == ans[b-1]) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc:9:3: error: expected initializer before 'int'
9 | int ans[] = {1,2,1,3,1,3,1,3,1,3,1,3,1};
| ^~~
a.cc:11:3: error: 'cin' does not name a type
11 | cin >> a >> b;
| ^~~
a.cc:12:3: error: expected unqualified-id before 'if'
12 | if(ans[a-1] == ans[b-1]) cout << "Yes" << endl;
| ^~
a.cc:13:3: error: expected unqualified-id before 'else'
13 | else cout << "No" << endl;
| ^~~~
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s255795557 | p03711 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
using namespace std;
int main()
int ans[] = {1,2,1,3,1,3,1,3,1,3,1,3,1};
int a, b;
cin >> a >> b;
if(ans[a] == ans[b]) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc:9:3: error: expected initializer before 'int'
9 | int ans[] = {1,2,1,3,1,3,1,3,1,3,1,3,1};
| ^~~
a.cc:11:3: error: 'cin' does not name a type
11 | cin >> a >> b;
| ^~~
a.cc:12:3: error: expected unqualified-id before 'if'
12 | if(ans[a] == ans[b]) cout << "Yes" << endl;
| ^~
a.cc:13:3: error: expected unqualified-id before 'else'
13 | else cout << "No" << endl;
| ^~~~
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s969152925 | p03711 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
using namespace std;
int main()
int [] ans = {1,2,1,3,1,3,1,3,1,3,1,3,1};
int a, b;
cin >> a >> b;
if(ans[a] == ans[b]) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc:9:3: error: expected initializer before 'int'
9 | int [] ans = {1,2,1,3,1,3,1,3,1,3,1,3,1};
| ^~~
a.cc:11:3: error: 'cin' does not name a type
11 | cin >> a >> b;
| ^~~
a.cc:12:3: error: expected unqualified-id before 'if'
12 | if(ans[a] == ans[b]) cout << "Yes" << endl;
| ^~
a.cc:13:3: error: expected unqualified-id before 'else'
13 | else cout << "No" << endl;
| ^~~~
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s130893776 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x, y;
cin >> x >> y;
if (x == 2 || y == 2) {
cout << "No" << endl;
}
else if (x == 4 || x == 6 || x == 9 || x == 11) {
if (y == 4 || y == 6 || y == 9 || y == 11) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
else {
if (y == 4 || y == 6 || y == 9 || y == 11) {
cout << "NO" << endl;
else {
cout << "Yes" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:17:5: error: expected '}' before 'else'
17 | else {
| ^~~~
a.cc:10:51: note: to match this '{'
10 | else if (x == 4 || x == 6 || x == 9 || x == 11) {
| ^
a.cc:20:9: error: expected '}' before 'else'
20 | else {
| ^~~~
a.cc:18:50: note: to match this '{'
18 | if (y == 4 || y == 6 || y == 9 || y == 11) {
| ^
a.cc:23:2: error: expected '}' at end of input
23 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s283493330 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a = {0, 1, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int x, y; cin >> x >> y;
cout << (a[x] == a[y] ? "Yes" : "No") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: scalar object 'a' requires one element in initializer
5 | int a = {0, 1, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1};
| ^
|
s069460884 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int x,y;
cin >> x >> y;
int group1[]={1,3,5,7,8,10,12};
int group2[]={4,6,9,11};
int i;
int judge1 = 0;
int judge2 = 0;
if((x==2)||(y==2)){
cout << "No";
}else{
for(i=0;i<7;i++){
if(x==group[i]){
judge1++;
}
if(y==group[i]){
judge1++;
}
if(x==group2[i]){
judge2++;
}
if(y==group2[i]){
judge2++;
}
}
if((judge1==2)&&(x<y)){
cout << "Yes";
}else{
cout << "No";
}
if((judge2==2)&&(x<y)){
cout << "Yes";
}else{
cout << "No";
}
} | a.cc: In function 'int main()':
a.cc:17:13: error: 'group' was not declared in this scope; did you mean 'group2'?
17 | if(x==group[i]){
| ^~~~~
| group2
a.cc:20:13: error: 'group' was not declared in this scope; did you mean 'group2'?
20 | if(y==group[i]){
| ^~~~~
| group2
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s436191245 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int x,y;
cin >> x >> y;
int group1[]={1,3,5,7,8,10,12};
int group2[]={4,6,9,11};
int i;
int judge1 = 0;
int judge2 = 0;
if((x==2)||(y==2)){
cout << "No";
}else{
for(i=0;i<7;i++){
if(x==group[i]){
judge1++;
}
if(y==group[i]){
judge1++;
}
if(x==group2[i]{
judge2++;
}
if(y==group2[i]{
judge2++;
}
}
if(judge1==2)&&(x<y)){
cout << "Yes";
}else{
cout << "No";
}
if(judge2==2)&&(x<y){
cout << "Yes";
}else{
cout << "No";
}
} | a.cc: In function 'int main()':
a.cc:17:13: error: 'group' was not declared in this scope; did you mean 'group2'?
17 | if(x==group[i]){
| ^~~~~
| group2
a.cc:20:13: error: 'group' was not declared in this scope; did you mean 'group2'?
20 | if(y==group[i]){
| ^~~~~
| group2
a.cc:23:22: error: expected ')' before '{' token
23 | if(x==group2[i]{
| ~ ^
| )
a.cc:29:5: error: expected primary-expression before '}' token
29 | }
| ^
a.cc:30:20: error: expected identifier before '(' token
30 | if(judge1==2)&&(x<y)){
| ^
a.cc:35:22: error: expected identifier before '(' token
35 | if(judge2==2)&&(x<y){
| ^
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s440650656 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main () {
int x,y;
cin >> x >> y;
int group1[]={1,3,5,7,8,10,12}
int group2[]={4,6,9,11}
int i;
int judge1 = 0;
int judge2 = 0;
if((x==2)||(y==2)){
cout << "No";
}else{
for(i=0;i<7;i++){
if(x==group[i]){
judge1++;
}
if(y==group[i]){
judge1++;
}
if(x==group2[i]{
judge2++;
}
if(y==group2[i]{
judge2++;
}
}
if(judge1==2)&&(x<y)){
cout << "Yes";
}else{
cout << "No";
}
if(judge2==2)&&(x<y){
cout << "Yes";
}else{
cout << "No";
}
}
| a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
8 | int group2[]={4,6,9,11}
| ^~~
a.cc:17:13: error: 'group' was not declared in this scope; did you mean 'group1'?
17 | if(x==group[i]){
| ^~~~~
| group1
a.cc:20:13: error: 'group' was not declared in this scope; did you mean 'group1'?
20 | if(y==group[i]){
| ^~~~~
| group1
a.cc:23:13: error: 'group2' was not declared in this scope; did you mean 'group1'?
23 | if(x==group2[i]{
| ^~~~~~
| group1
a.cc:23:22: error: expected ')' before '{' token
23 | if(x==group2[i]{
| ~ ^
| )
a.cc:29:5: error: expected primary-expression before '}' token
29 | }
| ^
a.cc:30:20: error: expected identifier before '(' token
30 | if(judge1==2)&&(x<y)){
| ^
a.cc:35:22: error: expected identifier before '(' token
35 | if(judge2==2)&&(x<y){
| ^
a.cc:40:2: error: expected '}' at end of input
40 | }
| ^
a.cc:4:13: note: to match this '{'
4 | int main () {
| ^
|
s983963685 | p03711 | C | #include<stdio.h>
int ha(int a){
switch(a){
case:1
case:3
case:5
case:7
case:8
case:10
case:12
return 0;
break;
case:4
case:6
case:9
return 1;
break;
default:
return 2;
break;
}
}
int main(){
int x,y;
scanf("%d %d",&x,&y);
if(ha(x) == ha(y)){
printf("Yes");
}else{
printf("No");
}
return 0;
} | main.c: In function 'ha':
main.c:4:11: error: expected expression before ':' token
4 | case:1
| ^
main.c:4:13: error: expected ';' before 'case'
4 | case:1
| ^
| ;
5 | case:3
| ~~~~
main.c:13:11: error: expected expression before ':' token
13 | case:4
| ^
main.c:13:13: error: expected ';' before 'case'
13 | case:4
| ^
| ;
14 | case:6
| ~~~~
|
s849389666 | p03711 | C++ | #include <algorithm>
#include <chrono>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <tuple>
#include <utility>
#include <vector>
#define llong long long
using namespace std;
const int IINF = 2147483647;
const llong LLINF = 9223372036854775807;
// UnionFind
class UNF {
private:
int s;
vector<int> tree, rank;
int getP(int i) {
if (tree[i] == -1)
return i;
else
return tree[i] = getP(tree[i]);
}
public:
UNF(int n) {
s = n;
tree.resize(s, -1);
rank.resize(s, 1);
}
int size() { return s; }
void connect(int a, int b) {
a = getP(a);
b = getP(b);
if (a == b) return;
if (rank[a] >= rank[b]) {
tree[b] = a;
rank[a] += rank[b];
} else {
tree[a] = b;
rank[b] += rank[a];
}
}
bool check(int a, int b) { return getP(a) == getP(b); }
};
int main(){
UNF uf(13);
uf.connect(1, 3);
uf.connect(3, 5);
uf.connect(5, 7);
uf.connect(7, 8);
uf.connect(8, 10);
uf.connect(10, 12);
uf.connect(4, 6);
uf.connect(6, 9);
uf.connext(9, 11);
int x, y;
cin >> x >> y;
cout << (uf.check(x, y) ? "Yes" : "No");
return 0;
} | a.cc: In function 'int main()':
a.cc:62:6: error: 'class UNF' has no member named 'connext'; did you mean 'connect'?
62 | uf.connext(9, 11);
| ^~~~~~~
| connect
|
s457794990 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin >> x >> y;
if (x == 2 || y == 2) {
cout << "No" << endl;
}
else {
boot xg ,yg;
if (x == 1 || x == 3 || x == 5 || x == 7 || x == 8 ||
x == 10 || x == 12) {
xg = true;
}
else {
xg = false;
}
if (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 ||
y == 10 || y == 12) {
yg = true;
}
else {
yg = false;
}
if (xg == yg) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:5:10: error: 'x' was not declared in this scope
5 | cin >> x >> y;
| ^
a.cc:5:15: error: 'y' was not declared in this scope; did you mean 'yn'?
5 | cin >> x >> y;
| ^
| yn
a.cc:10:5: error: 'boot' was not declared in this scope; did you mean 'bool'?
10 | boot xg ,yg;
| ^~~~
| bool
a.cc:13:7: error: 'xg' was not declared in this scope
13 | xg = true;
| ^~
a.cc:16:7: error: 'xg' was not declared in this scope
16 | xg = false;
| ^~
a.cc:20:7: error: 'yg' was not declared in this scope; did you mean 'yn'?
20 | yg = true;
| ^~
| yn
a.cc:23:7: error: 'yg' was not declared in this scope; did you mean 'yn'?
23 | yg = false;
| ^~
| yn
a.cc:25:9: error: 'xg' was not declared in this scope
25 | if (xg == yg) {
| ^~
a.cc:25:15: error: 'yg' was not declared in this scope; did you mean 'yn'?
25 | if (xg == yg) {
| ^~
| yn
|
s780705610 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int i = 0 ;i < W + 2 ;i++) {
cout << "#";
}
cout << endl;
string str;
for (int j = 0 ;j < H ;j++) {
cout << "#";
for (int k = 0 ;k < W ;k++) {
char s
cin >> s;
cout << s;
}
cout << "#" << endl;
}
for (int i = 0 ;i < W + 2 ;i++) {
cout << "#";
}
cout << endl;
}
| a.cc: In function 'int main()':
a.cc:16:7: error: expected initializer before 'cin'
16 | cin >> s;
| ^~~
a.cc:17:15: error: 's' was not declared in this scope
17 | cout << s;
| ^
|
s708274699 | p03711 | C++ | #include <iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
else if(x==4||x==6||x==9||x==11){
if(y==4||y==6||x==9||y==11){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
else{
if(y==1||y==3||y==5||y==7||y==8||y==10||y==12){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
} | a.cc: In function 'int main()':
a.cc:11:2: error: 'else' without a previous 'if'
11 | else if(x==4||x==6||x==9||x==11){
| ^~~~
|
s976418677 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
std::vector<int> a={1,3,5,7,8,10,12};
std::vector<int> b={4,6,9,11};
std::vector<int> c={2};
int x, y;
cin >> x >> y;
bool xx=false;
bool yy=false;
for (int i = 0; i < a.size(); i++) {
if(a.at(i)==x) xx=true;
if(a.at(i)==y) yy=true;
}
if(xx && yy){
cout << "Yes" << endl;
return 0;
}
bool xx=false;
bool yy=false;
for (int i = 0; i < b.size(); i++) {
if(a.at(i)==x) xx=true;
if(a.at(i)==y) yy=true;
}
if(xx && yy){
cout << "Yes" << endl;
return 0;
}
bool xx=false;
bool yy=false;
for (int i = 0; i < c.size(); i++) {
if(a.at(i)==x) xx=true;
if(a.at(i)==y) yy=true;
}
if(xx && yy){
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:22:8: error: redeclaration of 'bool xx'
22 | bool xx=false;
| ^~
a.cc:12:8: note: 'bool xx' previously declared here
12 | bool xx=false;
| ^~
a.cc:23:8: error: redeclaration of 'bool yy'
23 | bool yy=false;
| ^~
a.cc:13:8: note: 'bool yy' previously declared here
13 | bool yy=false;
| ^~
a.cc:33:8: error: redeclaration of 'bool xx'
33 | bool xx=false;
| ^~
a.cc:12:8: note: 'bool xx' previously declared here
12 | bool xx=false;
| ^~
a.cc:34:8: error: redeclaration of 'bool yy'
34 | bool yy=false;
| ^~
a.cc:13:8: note: 'bool yy' previously declared here
13 | bool yy=false;
| ^~
|
s302955842 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;cin>>a>>b;
int c[]={1,3,5,7,8,10,12};
int d[]={4,6,9,11};
int e[]={2};
if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";} | a.cc: In function 'int main()':
a.cc:8:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
a.cc:8:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
a.cc:8:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
a.cc:8:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
a.cc:8:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
a.cc:8:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
8 | if((a==c&b==c)|(a==d&b==d)|(a==e&b==e))cout<<"Yes";else cout<<"No";}
| ~^~~
|
s611395455 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
if(a == 2 || b == 2){
cout << "No" << endl;
} else {
if(a == 4 || a == 6 || a == 9 || a == 11){
if(b == 4 || b == 6 || b == 9 || b == 11){
cout << "Yes" << endl;
} else {
cout << "No" <<endl;
}
} else {
if(b != 4 || b != 6 || b != 9 || b != 11){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
25 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s444334224 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
char checkGroup(int a){
switch(a){
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
return 'a';
break;
case 4:
case 6:
case 9:
case 11:
return 'b';
break;
default:
return 'c';
break;
}
}
int main(void){
int x,y; cin >> x >> y;
if(checkGroup(x)==checkGroup(b)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:29:34: error: 'b' was not declared in this scope
29 | if(checkGroup(x)==checkGroup(b)) cout << "Yes" << endl;
| ^
|
s710728116 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >>x>>y;
if(x==2){
if(x==y)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
else if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11) cout<<"Yes"<<endl;
else cout<<"NO"<<endl;
}
else{
if(y==1||y==3||y==5||y==7||y==8||y==10||y==12){
cout<<"YES"<<endl;
}
else cout<<"NO"<<endl;
}
}
} | a.cc:25:1: error: expected declaration before '}' token
25 | }
| ^
|
s318871321 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin>>x>>y;
string ans ="No";
seti g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3 ={2};
if(g1.count(x)&&g1.count(y))ans="Yes";
else if(g2.count(x)&&g2.count(y))ans="Yes";
else if(g3.count(x)&&g3.count(y))ans="Yes";
cout<<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'seti' was not declared in this scope
8 | seti g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3 ={2};
| ^~~~
a.cc:8:34: error: expected primary-expression before ',' token
8 | seti g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3 ={2};
| ^
a.cc:8:35: error: 'g2' was not declared in this scope
8 | seti g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3 ={2};
| ^~
a.cc:8:49: error: 'g3' was not declared in this scope
8 | seti g1={1,3,5,7,8,10,12},g2={4,6,9,11},g3 ={2};
| ^~
a.cc:9:12: error: 'g1' was not declared in this scope; did you mean 'y1'?
9 | if(g1.count(x)&&g1.count(y))ans="Yes";
| ^~
| y1
|
s529117298 | p03711 | Java | #include<iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <list>
using namespace std;
typedef long long ll;
#define MOD 1000000007
#define p(x) cout << x << endl;
#define el cout << endl;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int x, y;
cin >> x >> y;
int num[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
if(num[x] == num[y]) p("Yes")
else p("No");
} | Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include <cstdio>
^
Main.java:3: error: illegal character: '#'
#include <cstdlib>
^
Main.java:4: error: illegal character: '#'
#include <cmath>
^
Main.java:5: error: illegal character: '#'
#include <string>
^
Main.java:6: error: illegal character: '#'
#include <algorithm>
^
Main.java:7: error: illegal character: '#'
#include <vector>
^
Main.java:8: error: illegal character: '#'
#include <set>
^
Main.java:9: error: illegal character: '#'
#include <map>
^
Main.java:10: error: illegal character: '#'
#include <list>
^
Main.java:13: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:15: error: illegal character: '#'
#define MOD 1000000007
^
Main.java:15: error: class, interface, enum, or record expected
#define MOD 1000000007
^
Main.java:16: error: illegal character: '#'
#define p(x) cout << x << endl;
^
Main.java:17: error: illegal character: '#'
#define el cout << endl;
^
Main.java:17: error: class, interface, enum, or record expected
#define el cout << endl;
^
Main.java:18: error: illegal character: '#'
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
^
Main.java:18: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
^
Main.java:18: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
^
Main.java:18: error: class, interface, enum, or record expected
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
^
Main.java:23: error: class, interface, enum, or record expected
ios::sync_with_stdio(false);
^
Main.java:25: error: class, interface, enum, or record expected
int x, y;
^
Main.java:26: error: class, interface, enum, or record expected
cin >> x >> y;
^
Main.java:28: error: class, interface, enum, or record expected
int num[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
^
Main.java:29: error: class, interface, enum, or record expected
if(num[x] == num[y]) p("Yes")
^
Main.java:31: error: class, interface, enum, or record expected
}
^
26 errors
|
s948494847 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
struct uf{
vector<int> t;
uf(int n):t(n,-1){}
int r(int x){
while(t[x] >= 0 && t[t[x]] >= 0){
t[x] = t[t[x]]
x = t[x];
}
return x;
}
int f(int x,int y){return r(x)==r(y);}
int u(int x,int y){x=r(x);y=r(y);if(t[x]>t[y])swap(x,y);t[x]+=t[y];t[y]=x;}
template<class F,class... R>
int u(F f,R... r){for(auto i:initializer_list<int>{r...})u(f,i);}
};
int main(){
uf uf1(13);
uf1.u(1,3,5,7,8,10,12);
uf1.u(4,6,9,11);
int a, b;
cin >> a >> b;
puts(uf1.f(a, b) ? "Yes" : "No");
}
| a.cc: In member function 'int uf::r(int)':
a.cc:10:13: error: expected ';' before 'x'
10 | x = t[x];
| ^
a.cc: In member function 'int uf::u(int, int)':
a.cc:15:79: warning: no return statement in function returning non-void [-Wreturn-type]
15 | int u(int x,int y){x=r(x);y=r(y);if(t[x]>t[y])swap(x,y);t[x]+=t[y];t[y]=x;}
| ^
a.cc: In member function 'int uf::u(F, R ...)':
a.cc:17:69: warning: no return statement in function returning non-void [-Wreturn-type]
17 | int u(F f,R... r){for(auto i:initializer_list<int>{r...})u(f,i);}
| ^
|
s995591360 | p03711 | Java | import java.io.*;
import java.util.function.*;
import java.util.stream.*;
class Wandbox
{
/**
* ABC 062 B: Picture Frame
* (周囲1ピクセルを'#'で囲む)
*/
public static void main(String[] args) throws IOException
{
// 入力
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in));
int[] HW = Stream.of(br.readLine().split(" ")).mapToInt(
item -> new Integer(item)).toArray();
Stream<String> lines = br.lines();
// データ部分を抽出
Stream<String> a = lines.filter(item -> item.indexOf(" ") < 0);
// 枠線を決める
// Streamは同じインスタンスで2度処理を実行できないため、Supplierを通す
Supplier<Stream<String>> frame = () ->
Stream.of(new String(new char[HW[1]]).replace("\0", "#"));
Stream<String> frameS = frame.get();
Stream<String> frameE = frame.get();
Stream<String> out = Stream.concat(frame.get(), Stream.concat(a, frame.get())).map(
item -> "#" + item + "#") ;
// 出力(末尾は改行を入れない)
System.out.print(out.collect(Collectors.joining("\n")).replaceFirst("\n$", ""));
}
}
| Main.java:17: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
item -> new Integer(item)).toArray();
^
1 warning
|
s497455513 | p03711 | C++ | #include <iostream>
#include <string>
#include <vector>
# define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
string solve(int x, int y) {
vector<int> a = {4, 6, 9, 11};
auto ax = find(a.begin(), a.end(), x);
auto ay = find(a.begin(), a.end(), y);
if (x == 2 and y == 2) {
return "Yes";
}
else if ((x == 2 and y != 2) or (x != 2 and y == 2)) {
return "No";
}
else if (ax == a.end() and ay == a.end()) {
return "Yes";
}
else if (ax != a.end() and ay != a.end()) {
return "Yes";
}
else {
return "No";
}
}
int main() {
int x, y;
cin >> x >> y;
cout << solve(x, y) << endl;
return 0;
}
| a.cc: In function 'std::string solve(int, int)':
a.cc:11:19: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
11 | auto ax = find(a.begin(), a.end(), x);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from /usr/include/c++/14/ios:46,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
435 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed:
a.cc:11:19: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
11 | auto ax = find(a.begin(), a.end(), x);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:12:19: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
12 | auto ay = find(a.begin(), a.end(), y);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
435 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: template argument deduction/substitution failed:
a.cc:12:19: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
12 | auto ay = find(a.begin(), a.end(), y);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~
a.cc:29:1: warning: control reaches end of non-void function [-Wreturn-type]
29 | }
| ^
|
s413714881 | p03711 | C++ | #include <bits/stdc++.h>
#define INF (1<<31) - 1 //INT_MAX/2
#define MOD 1000000007
#define PI acos(-1)
using ll = long long;
using ull = unsigned long long;
using P = std::pair<int, int>;
int main(int argc, char *argv[])
{
int x, y;
std::cin >> x >> y;
a[12] = {1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1};
if (a[x-1] == a[y-1]) {
std::cout << "Yes" << std::endl;
} else {
std::cout << "No" << std::endl;
}
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:16:5: error: 'a' was not declared in this scope
16 | a[12] = {1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1};
| ^
|
s864227977 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std ;
int main () {
vector<int> line ;
line = {0,1,3,1,2,1,2,1,1,2,1,2,1}
int a , b ;
cin >> a >> b ;
if ( line.at(a) == line.at(b) ) {
cout << "Yes" << endl ;
} else {
cout << "No" << endl ;
}
}
| a.cc: In function 'int main()':
a.cc:6:37: error: expected ';' before 'int'
6 | line = {0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
| ;
7 |
8 | int a , b ;
| ~~~
a.cc:9:10: error: 'a' was not declared in this scope
9 | cin >> a >> b ;
| ^
a.cc:9:15: error: 'b' was not declared in this scope
9 | cin >> a >> b ;
| ^
|
s668617871 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define __TRUE "yes"
#define __FALSE "no"
int main() {
int x,y;
cin >> x >> y;
int a[]={0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}
cout << (a[x] == a[y] ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'cout'
11 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^~~~
|
s713303173 | p03711 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x==4||x==6||x==9||x==11 && y==4||y==6||y==9||y==11){
System.out.print("Yes");
}else if(y==1||y==3||y==5||y==7||y==8||y==10||y==12 && x==1||x==3||x==5||x==7||x==8||x==10||x==12){
System.out.print("Yes");
}else if(x==2||y==2){
System.out.print("No");
}
} | Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s607381731 | p03711 | Java |
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x==4||x==6||x==9||x==11 && y==4||y==6||y==9||y==11){
System.out.print("Yes");
}else if(y==1||y==3||y==5||y==7||y==8||y==10||y==12 && x==1||x==3||x==5||x==7||x==8||x==10||x==12){
System.out.print("Yes");
}else if(x==2||y==2){
System.out.print("No");
}
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s239059908 | p03711 | Java |
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x==4||x==6||x==9||x==11 && y==4||y==6||y==9||y==11){
Syste.out.print("Yes");
}else if(y==1||y==3||y==5||y==7||y==8||y==10||y==12 && x==1||x==3||x==5||x==7||x==8||x==10||x==12){
Syste.out.print("Yes");
}else if(x==2||y==2){
Syste.out.print("No");
}
}
} | Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:4: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:9: error: package Syste does not exist
Syste.out.print("Yes");
^
Main.java:11: error: package Syste does not exist
Syste.out.print("Yes");
^
Main.java:13: error: package Syste does not exist
Syste.out.print("No");
^
5 errors
|
s371301159 | p03711 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
String s = acababaababa;
if(s.substring(x-1,x).equals(s.substring(y-1,y)))
}
} | Main.java:12: error: illegal start of statement
}
^
1 error
|
s387819823 | p03711 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
String s = acababaababa;
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
}
} | Main.java:10: error: '.class' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: not a statement
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: ';' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: ';' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: '.class' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: not a statement
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: ';' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
Main.java:10: error: ';' expected
if(s.substring(int x-1,int x).equals(s.substring(int y-1,int y)))
^
8 errors
|
s952154945 | p03711 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x==2||y==2){
System.out.print("No");
}else if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11){
System.out.print("Yes");
}
}else if(x==1||x==3||x==5||x==7||x==8||x==10||x==12){
if(y==1||y==3||y==5||y==7||==y8||y==10||y==12){
System.out.print("Yes");
}
}else{
System.out.print("No");
}
}
} | Main.java:17: error: illegal start of expression
if(y==1||y==3||y==5||y==7||==y8||y==10||y==12){
^
1 error
|
s230936120 | p03711 | Java | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if(x==2||y==2){
System.out.print("No");
}else if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11){
System.out.print("Yes");
}
}else if(x==1||x==3||x==5||x==7||x==8||x==10||x==12){
if(y==1||y==3||y==5||y==7||=y=8||y==10||y==12){
System.out.print("Yes");
}
}else{
System.out.print("No");
}
}
} | Main.java:17: error: illegal start of expression
if(y==1||y==3||y==5||y==7||=y=8||y==10||y==12){
^
1 error
|
s202953313 | p03711 | C++ | #include <iostream>
using namespace std;
int A[0,1,3,1,2,1,2,1,1,2,1,2,1],a,b;
int main(){
cin >> a >> b;
cout << (A[a]==A[b]? "Yes":"No") << endl;
} | a.cc:3:8: error: expected ']' before ',' token
3 | int A[0,1,3,1,2,1,2,1,1,2,1,2,1],a,b;
| ^
| ]
a.cc:3:9: error: expected unqualified-id before numeric constant
3 | int A[0,1,3,1,2,1,2,1,1,2,1,2,1],a,b;
| ^
a.cc: In function 'int main()':
a.cc:6:10: error: 'a' was not declared in this scope
6 | cin >> a >> b;
| ^
a.cc:6:15: error: 'b' was not declared in this scope
6 | cin >> a >> b;
| ^
a.cc:7:12: error: 'A' was not declared in this scope
7 | cout << (A[a]==A[b]? "Yes":"No") << endl;
| ^
|
s633300944 | p03711 | C++ | x,y=map(int,input().split())
a=[2,1,8,1,0,1,0,1,1,0,1,0,1]
if a[x]==a[y]:
print("Yes")
else:
print("No")
| a.cc:1:1: error: 'x' does not name a type
1 | x,y=map(int,input().split())
| ^
|
s084957059 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{}
int x, y;
cin >> x >> y;
if((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12))
{
cout << "Yes" << endl;
}
else if((x == 4 || x == 6 || x == 9 || x == 11) && (y == 4 || y == 6 || y == 9 || y == 11))
{
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
} | a.cc:7:3: error: 'cin' does not name a type
7 | cin >> x >> y;
| ^~~
a.cc:8:3: error: expected unqualified-id before 'if'
8 | if((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12))
| ^~
a.cc:12:3: error: expected unqualified-id before 'else'
12 | else if((x == 4 || x == 6 || x == 9 || x == 11) && (y == 4 || y == 6 || y == 9 || y == 11))
| ^~~~
a.cc:16:2: error: expected unqualified-id before 'else'
16 | else
| ^~~~
a.cc:20:1: error: expected declaration before '}' token
20 | }
| ^
|
s085258760 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A==2){
if(B==2){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
else if(A==4||A==6||A==9||A==11){
if(B==4||B==6||B==9||B==11){
cout<<"Yes"<<endl;
}
else{
if(A==1||A==3||A==5||A==7||A==8||A==10||A==12){
cou<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:23:9: error: 'cou' was not declared in this scope
23 | cou<<"Yes"<<endl;
| ^~~
|
s910168731 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A==2&&B==2){
cout<<"Yes"<<endl;
}
else if(A==4&&A==6&&A==9&&A==11){
if(B==4&&B==6&&B==9&&B==11){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<enld;
}
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:17:19: error: 'enld' was not declared in this scope
17 | cout<<"No"<<enld;
| ^~~~
|
s556088022 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A==2&&B==2){
cout<<"Yes"<<endl;
}
else if(A==4&&A==6&&A==9&&A==11){
if(B==4&&B==6&&B==9&&B==11){
cput<<"Yes"<<endl;
}
else{
cout<<"No"<<enld;
}
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:14:7: error: 'cput' was not declared in this scope
14 | cput<<"Yes"<<endl;
| ^~~~
a.cc:17:19: error: 'enld' was not declared in this scope
17 | cout<<"No"<<enld;
| ^~~~
|
s198119837 | p03711 | C++ | #include<bits/stdc++.h>
2.using namespace std;
3.typedef long long ll;
4.typedef unsigned long long ull;
5.const int N=10001;
6.char a[N][N];
7.int main()
8.{
9. int x,y,i,j;
10. cin>>x>>y;
11. for(i=1;i<=x;i++)
12. {
13. for(j=1;j<=y;j++)
14. {
15. cin>>a[i][j];
16. }
17. }
18. for(i=1;i<=y+2;i++)
19. {
20. cout<<'#';
21. }
22. cout<<endl;
23. for(i=1;i<=x;i++)
24. {
25. cout<<"#";
26. for(j=1;j<=y;j++)
27. {
28. cout<<a[i][j];
29. }
30. cout<<"#";
31. cout<<endl;
32. }
33. for(i=1;i<=y+2;i++)
34. {
35. cout<<'#';
36. }
37. return 0;
38.}
| a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 2.using namespace std;
| ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
3 | 3.typedef long long ll;
| ^~~~~~~~~
a.cc:4:1: error: expected unqualified-id before numeric constant
4 | 4.typedef unsigned long long ull;
| ^~~~~~~~~
a.cc:5:1: error: expected unqualified-id before numeric constant
5 | 5.const int N=10001;
| ^~~~~~~
a.cc:6:1: error: expected unqualified-id before numeric constant
6 | 6.char a[N][N];
| ^~~~~~
a.cc:7:1: error: expected unqualified-id before numeric constant
7 | 7.int main()
| ^~~~~
|
s295837582 | p03711 | C++ | int main(){
int a,b;
cin>>a>>b;
if(a==2||b==2)
cout<<"No"<<endl;
else if(a==4||a==6||a==9||a==11){
if(b==4||b==6||b==9||b==11)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}else{
if(b==4||b==6||b==9||b==11)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>a>>b;
| ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
6 | cout<<"No"<<endl;
| ^~~~
a.cc:6:21: error: 'endl' was not declared in this scope
6 | cout<<"No"<<endl;
| ^~~~
a.cc:9:13: error: 'cout' was not declared in this scope
9 | cout<<"Yes"<<endl;
| ^~~~
a.cc:9:26: error: 'endl' was not declared in this scope
9 | cout<<"Yes"<<endl;
| ^~~~
a.cc:11:13: error: 'cout' was not declared in this scope
11 | cout<<"No"<<endl;
| ^~~~
a.cc:11:25: error: 'endl' was not declared in this scope
11 | cout<<"No"<<endl;
| ^~~~
a.cc:14:13: error: 'cout' was not declared in this scope
14 | cout<<"No"<<endl;
| ^~~~
a.cc:14:25: error: 'endl' was not declared in this scope
14 | cout<<"No"<<endl;
| ^~~~
a.cc:16:13: error: 'cout' was not declared in this scope
16 | cout<<"Yes"<<endl;
| ^~~~
a.cc:16:26: error: 'endl' was not declared in this scope
16 | cout<<"Yes"<<endl;
| ^~~~
|
s726305473 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
vector<int> group(12) = {0,2,0,1,0,1,0,0,1,0,1,0}
if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:7:25: error: expected ',' or ';' before '=' token
7 | vector<int> group(12) = {0,2,0,1,0,1,0,0,1,0,1,0}
| ^
a.cc:8:53: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1317 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: couldn't deduce template parameter '_Bi_iter'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1485 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: couldn't deduce template parameter '_Bi_iter'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1660 | operator<(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:8:55: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if (group.at(x-1) == group.at(y-1)) cout << "Yes" < endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14 |
s378632799 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define REP(i, t) for(int i = 0; i < t; i++)
int main()
{
vector<int> group[2] = {
{1, 3, 5, 7, 8, 10, 12},
{4, 6, 9, 11}
};
string anss[2] = {"No", "Yes"};
int x, y, ans;
cin >> x >> y;
ans = (int)count_if(group[0].begin(), group[0].end(), [x, y](int i) { return i == x || i == y; }) / 2;
ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
cout << anss[ans] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:14: error: no matching function for call to 'max(std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type, int&)'
15 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
a.cc:15:14: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
15 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:15:14: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
15 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s968423092 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
vector<int> group[2] = {
{1, 3, 5, 7, 8, 10, 12},
{4, 6, 9, 11}
};
string anss[2] = {"No", "Yes"};
int x, y, ans;
cin >> x >> y;
ans = count_if(group[0].begin(), group[0].end(), [x, y](int i) { return i == x || i == y; }) / 2;
ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
cout << anss[ans] << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:14: error: no matching function for call to 'max(std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type, int&)'
14 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
a.cc:14:14: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
14 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: template argument deduction/substitution failed:
a.cc:14:14: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
14 | ans = max(count_if(group[1].begin(), group[1].end(), [x, y](int i) { return i == x || i == y; }) / 2, ans);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s061070997 | p03711 | Java | import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in);) {
solve(sc);
}
}
public static void solve(Scanner sc) {
int a = sc.nextInt();
int b = sc.nextInt();
List<Integer> aa = Arrays.asList(new Int[]{a, b})
List<Integer> c = Arrays.asList(new Int[]{1, 3, 5, 7, 8, 10, 12});
List<Integer> d = Arrays.asList(new Int[]{2});
List<Integer> e = Arrays.asList(new Int[]{4, 6, 9, 11});
if (c.containsAll(aa) || d.containsAll(aa) || e.containsAll(aa)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} | Main.java:15: error: ';' expected
List<Integer> aa = Arrays.asList(new Int[]{a, b})
^
1 error
|
s624274151 | p03711 | C++ | int main () {
int a [] = {0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1};
// 配列の添字は 0 から始まるので,a [0] は 0 にしている.
int x , y ; cin >> x >> y ;
cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ; | a.cc: In function 'int main()':
a.cc:4:13: error: 'cin' was not declared in this scope
4 | int x , y ; cin >> x >> y ;
| ^~~
a.cc:5:1: error: 'cout' was not declared in this scope
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
a.cc:5:53: error: 'endl' was not declared in this scope
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
a.cc:5:59: error: expected '}' at end of input
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^
a.cc:1:13: note: to match this '{'
1 | int main () {
| ^
|
s257197249 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
int a[]={0,2,0,1,0,1,0,0,1,0,1,0};
if(a[x-1]==a[y-1]){cout << "Yes" << endl;}
else{cout << "No" << endl;}
} | a.cc:4:1: error: extended character is not valid in an identifier
4 | int main(){
| ^
a.cc:4:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive]
4 | int main(){
| ^~~~~~~~~
a.cc: In function 'int int\U00003000main()':
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
10 | }
| ^
|
s221555164 | p03711 | C++ | #include<stdio.h>
int main(){
int x,y;
scanf("%d%d",&x,&y);
switch(x){
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12: int xi=1; break;
case 4:
case 6:
case 9:
case 11: int xi=2; break;
case 2: int xi=3; break;
}
switch(y){
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12: int yi=1; break;
case 4:
case 6:
case 9:
case 11: int yi=2; break;
case 2: int yi=3; break;
}
if(xi==yi) printf("Yes");
else printf("No");
return 0;
} | a.cc: In function 'int main()':
a.cc:15:10: error: jump to case label
15 | case 4:
| ^
a.cc:14:18: note: crosses initialization of 'int xi'
14 | case 12: int xi=1; break;
| ^~
a.cc:16:10: error: jump to case label
16 | case 6:
| ^
a.cc:14:18: note: crosses initialization of 'int xi'
14 | case 12: int xi=1; break;
| ^~
a.cc:17:10: error: jump to case label
17 | case 9:
| ^
a.cc:14:18: note: crosses initialization of 'int xi'
14 | case 12: int xi=1; break;
| ^~
a.cc:18:10: error: jump to case label
18 | case 11: int xi=2; break;
| ^~
a.cc:14:18: note: crosses initialization of 'int xi'
14 | case 12: int xi=1; break;
| ^~
a.cc:18:18: error: redeclaration of 'int xi'
18 | case 11: int xi=2; break;
| ^~
a.cc:14:18: note: 'int xi' previously declared here
14 | case 12: int xi=1; break;
| ^~
a.cc:19:10: error: jump to case label
19 | case 2: int xi=3; break;
| ^
a.cc:14:18: note: crosses initialization of 'int xi'
14 | case 12: int xi=1; break;
| ^~
a.cc:19:17: error: redeclaration of 'int xi'
19 | case 2: int xi=3; break;
| ^~
a.cc:14:18: note: 'int xi' previously declared here
14 | case 12: int xi=1; break;
| ^~
a.cc:30:10: error: jump to case label
30 | case 4:
| ^
a.cc:29:18: note: crosses initialization of 'int yi'
29 | case 12: int yi=1; break;
| ^~
a.cc:31:10: error: jump to case label
31 | case 6:
| ^
a.cc:29:18: note: crosses initialization of 'int yi'
29 | case 12: int yi=1; break;
| ^~
a.cc:32:10: error: jump to case label
32 | case 9:
| ^
a.cc:29:18: note: crosses initialization of 'int yi'
29 | case 12: int yi=1; break;
| ^~
a.cc:33:10: error: jump to case label
33 | case 11: int yi=2; break;
| ^~
a.cc:29:18: note: crosses initialization of 'int yi'
29 | case 12: int yi=1; break;
| ^~
a.cc:33:18: error: redeclaration of 'int yi'
33 | case 11: int yi=2; break;
| ^~
a.cc:29:18: note: 'int yi' previously declared here
29 | case 12: int yi=1; break;
| ^~
a.cc:34:10: error: jump to case label
34 | case 2: int yi=3; break;
| ^
a.cc:29:18: note: crosses initialization of 'int yi'
29 | case 12: int yi=1; break;
| ^~
a.cc:34:17: error: redeclaration of 'int yi'
34 | case 2: int yi=3; break;
| ^~
a.cc:29:18: note: 'int yi' previously declared here
29 | case 12: int yi=1; break;
| ^~
a.cc:36:6: error: 'xi' was not declared in this scope; did you mean 'x'?
36 | if(xi==yi) printf("Yes");
| ^~
| x
a.cc:36:10: error: 'yi' was not declared in this scope; did you mean 'y'?
36 | if(xi==yi) printf("Yes");
| ^~
| y
|
s881669177 | p03711 | C++ | #include<bits/stdc++.h.
using namespace std;
int main(){
int n[12]={1,3,1,2,1,2,1,1,2,1,2,1};
int a,b;
cin>>a>>b;
if(n[a-1]==n[b-1])
cout<<"Yes";
else
cout<<"No";
} | a.cc:1:24: error: missing terminating > character
1 | #include<bits/stdc++.h.
| ^
a.cc:1:9: fatal error: bits/stdc++.h.: No such file or directory
1 | #include<bits/stdc++.h.
| ^
compilation terminated.
|
s443710697 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
cin>>x>>y;
out<<(a[x]==a[y]?"Yes":"No")<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'out' was not declared in this scope
7 | out<<(a[x]==a[y]?"Yes":"No")<<endl;
| ^~~
|
s570065487 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
cin>>x>>y;
out<<(a[x]==a[y]?"Yes":"No")<<endl;
}
| a.cc: In function 'int main()':
a.cc:7:3: error: 'out' was not declared in this scope
7 | out<<(a[x]==a[y]?"Yes":"No")<<endl;
| ^~~
|
s883192330 | p03711 | C++ | #include <iostream>
using namespace std;
int main(){
int num[13] = {-1, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}
int a, b;
cin >> a >> b;
if ( num[a] == num[b] ) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'int'
6 | int a, b;
| ^~~
a.cc:7:10: error: 'a' was not declared in this scope
7 | cin >> a >> b;
| ^
a.cc:7:15: error: 'b' was not declared in this scope
7 | cin >> a >> b;
| ^
|
s590088435 | p03711 | C | #include<stdio.h>
int main(){
int x, y, x_group, y_group;
scanf("%d %d", &x, &y);
if(x == 2){
x_group = 3;
} else if(x == 4 || x == 6 || x == 9 || x == 11){
x_group = 2;
} else {
x_group = 1;
}
if(y == 2){
y_group = 3;
} else if(y == 4 || y == 6 || y == 9 || y == 11){
y_group = 2;
} else {
y_group = 1;
}
if(x_group == y_group){
printf("Yes\n");
} else {
printf("No\n");
} | main.c: In function 'main':
main.c:27:3: error: expected declaration or statement at end of input
27 | }
| ^
|
s585481023 | p03711 | C++ | #include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int a[13] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1}
if (a[x] == a[y]) cout << "Yes";
else cout << "No";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'if'
9 | if (a[x] == a[y]) cout << "Yes";
| ^~
a.cc:10:3: error: 'else' without a previous 'if'
10 | else cout << "No";
| ^~~~
|
s196999305 | p03711 | C | #include <stdio.h>
int main(){
int a,b,x=0;
scanf("%d %d",&a,&b);
int c[]={1,3,5,7,8,10,12};
int d[]={4,6,9,11};
if (a!=2||b!=2)
{
for (int i = 0; i < 7; ++i)
{
if (a==c[i])
{
for (int j = 0; j < ; ++j)
{
if (b==c[j])
{
x=1;
}
}
}
}
for (int k = 0; k < 4; ++k)
{
if (a==d[k])
{
for (int l = 0; l < 4; ++l)
{
if (b==d[l])
{
x=1;
}
}
}
}
}
if (x==1)
{
printf("Yes\n");
}else
{
printf("No\n");
}
} | main.c: In function 'main':
main.c:13:53: error: expected expression before ';' token
13 | for (int j = 0; j < ; ++j)
| ^
|
s449683689 | p03711 | C | #include <stdio.h>
int main(){
int a,b,x=0;
scanf("%d %d",&a,&b);
int c[]={1,3,5,7,8,10,12}
int d[]={4,6,9,11}
if (a!=2||b!=2)
{
for (int i = 0; i < 7; ++i)
{
if (a==c[i])
{
for (int j = 0; j < ; ++j)
{
if (b==c[j])
{
x=1;
}
}
}
}
for (int k = 0; k < 4; ++k)
{
if (a==d[k])
{
for (int l = 0; l < 4; ++l)
{
if (b==d[l])
{
x=1;
}
}
}
}
}
if (x==1)
{
printf("Yes\n");
}else
{
printf("No\n");
}
} | main.c: In function 'main':
main.c:6:9: error: expected ',' or ';' before 'int'
6 | int d[]={4,6,9,11}
| ^~~
main.c:13:53: error: expected expression before ';' token
13 | for (int j = 0; j < ; ++j)
| ^
main.c:24:32: error: 'd' undeclared (first use in this function)
24 | if (a==d[k])
| ^
main.c:24:32: note: each undeclared identifier is reported only once for each function it appears in
|
s269868050 | p03711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#define ALL(obj) (obj).begin(),(obj).end()
using vi = vector<int>;
using namespace std;
int main(){
int a,b;
vi c = {1,3,5,7,8,10,12};
vi d = {4,6,9,11};
vi e = {2};
cin >> a >> b;
bool flag = false;
if(find(ALL(c),a) != c.end() && find(ALL(c),b) != c.end()) flag = true;
if(find(ALL(d),a) != d.end() && find(ALL(d),b) != d.end()) flag = true;
if(find(ALL(e),a) != e.end() && find(ALL(e),b) != e.end()) flag = true;
if(flag) puts("Yes");
else puts("No");
}
| a.cc:6:12: error: 'vector' does not name a type
6 | using vi = vector<int>;
| ^~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'vi' was not declared in this scope
10 | vi c = {1,3,5,7,8,10,12};
| ^~
a.cc:11:5: error: expected ';' before 'd'
11 | vi d = {4,6,9,11};
| ^~
| ;
a.cc:12:5: error: expected ';' before 'e'
12 | vi e = {2};
| ^~
| ;
a.cc:15:15: error: 'c' was not declared in this scope
15 | if(find(ALL(c),a) != c.end() && find(ALL(c),b) != c.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
a.cc:16:15: error: 'd' was not declared in this scope
16 | if(find(ALL(d),a) != d.end() && find(ALL(d),b) != d.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
a.cc:17:15: error: 'e' was not declared in this scope
17 | if(find(ALL(e),a) != e.end() && find(ALL(e),b) != e.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
|
s695768323 | p03711 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#define ALL(obj) (obj).begin(),(obj).end()
using vi = vector<int>
using namespace std;
int main(){
int a,b;
vi c = {1,3,5,7,8,10,12};
vi d = {4,6,9,11};
vi e = {2};
cin >> a >> b;
bool flag = false;
if(find(ALL(c),a) != c.end() && find(ALL(c),b) != c.end()) flag = true;
if(find(ALL(d),a) != d.end() && find(ALL(d),b) != d.end()) flag = true;
if(find(ALL(e),a) != e.end() && find(ALL(e),b) != e.end()) flag = true;
if(flag) puts("Yes");
else puts("No");
} | a.cc:6:12: error: 'vector' does not name a type
6 | using vi = vector<int>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: 'vi' was not declared in this scope
10 | vi c = {1,3,5,7,8,10,12};
| ^~
a.cc:11:5: error: expected ';' before 'd'
11 | vi d = {4,6,9,11};
| ^~
| ;
a.cc:12:5: error: expected ';' before 'e'
12 | vi e = {2};
| ^~
| ;
a.cc:13:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
13 | cin >> a >> b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:15:15: error: 'c' was not declared in this scope
15 | if(find(ALL(c),a) != c.end() && find(ALL(c),b) != c.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
a.cc:15:6: error: 'find' was not declared in this scope; did you mean 'std::find'?
15 | if(find(ALL(c),a) != c.end() && find(ALL(c),b) != c.end()) flag = true;
| ^~~~
| std::find
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:4:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: 'std::find' declared here
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
a.cc:16:15: error: 'd' was not declared in this scope
16 | if(find(ALL(d),a) != d.end() && find(ALL(d),b) != d.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
a.cc:16:6: error: 'find' was not declared in this scope; did you mean 'std::find'?
16 | if(find(ALL(d),a) != d.end() && find(ALL(d),b) != d.end()) flag = true;
| ^~~~
| std::find
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: 'std::find' declared here
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
a.cc:17:15: error: 'e' was not declared in this scope
17 | if(find(ALL(e),a) != e.end() && find(ALL(e),b) != e.end()) flag = true;
| ^
a.cc:5:19: note: in definition of macro 'ALL'
5 | #define ALL(obj) (obj).begin(),(obj).end()
| ^~~
a.cc:17:6: error: 'find' was not declared in this scope; did you mean 'std::find'?
17 | if(find(ALL(e),a) != e.end() && find(ALL(e),b) != e.end()) flag = true;
| ^~~~
| std::find
/usr/include/c++/14/pstl/glue_algorithm_defs.h:60:1: note: 'std::find' declared here
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
|
s075297256 | p03711 | C++ | #include<cstdio>
int main(){
int x,y;
scanf("%d %d",&x,&y);
if(x == 1||x == 3||x == 5||x == 7||x == 8 || x == 10||x == 12&&y == 1||y == 3||y == 5||y == 7||y == 8||y == 10||y == 12) printf("Yes\n");
else if(x == 4||x == 6|| x == 9 || x == 11&&y == 4||y ==6 ||y == 9|| y == 11)printf("Yes\n");
else printf("No\n");
}
} | a.cc:10:9: error: expected declaration before '}' token
10 | }
| ^
|
s832918513 | p03711 | C | #include <stdio.h>
int main(){
int a,b;
scaanf("%d %d",&a,&b);
if((a==4||a==6||a==9||a==11)&&(b==4||b==6||b==9||b==11))
puts("Yes");
if((a==7||a==5||a==3||a==1||a==8||a==10||a==12)&&(b==7||b==5||b==3||b==1||b==8||b==10||b==12))
puts("Yes");
else
puts("No");
return 0;
} | main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scaanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | scaanf("%d %d",&a,&b);
| ^~~~~~
| scanf
|
s823966587 | p03711 | C | #include <stdio.h>
int main(){
int a,b;
scaanf("%d %d",&a,&b);
if(a==2&&b==2) puts("Yes");
else
if((a==4||a==6||a==9||a==11)&&(b==4||b==6||b==9||b==11))
puts("Yes");
if((a==7||a==5||a==3||a==1||a==8||a==10||a==12)&&(b==7||b==5||b==3||b==1||b==8||b==10||b==12))
puts("Yes");
else
puts("No");
return 0;
} | main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scaanf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
4 | scaanf("%d %d",&a,&b);
| ^~~~~~
| scanf
|
s195641564 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y
cin >> x >> y;
int n1=0,n2=0,n3=0;
int num1[7]={1,3,5,7,8,10,12};
int num2[4]={4,6,9,11};
for(int i=0;i<7;i++){
if(x==num1[i]) n1++;
if(y==num1[i]) n1++;
}
for(int i=0;i<4;i++){
if(x==num2[i]) n2++;
if(y==num2[i]) n2++;
}
if(n1==2 || n2==2 ||(n1==0 && n2==0)) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
6 | cin >> x >> y;
| ^~~
a.cc:12:12: error: 'y' was not declared in this scope
12 | if(y==num1[i]) n1++;
| ^
a.cc:16:12: error: 'y' was not declared in this scope
16 | if(y==num2[i]) n2++;
| ^
|
s770666106 | p03711 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <cstring>
using namespace std;
int main(int argc, char *argv[])
{
int x, y;
char aqua[] = {'0', 'a', 'c', 'a', 'b', 'a', 'b', 'a', 'a', 'b', 'a', 'b', 'a'}
cin >> x >> y;
if (aqua[x] == aqua[y])
cout << "Yes";
else
cout << "No";
cout << endl;
return 0;
}
| a.cc: In function 'int main(int, char**)':
a.cc:12:9: error: expected ',' or ';' before 'cin'
12 | cin >> x >> y;
| ^~~
|
s645371007 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> a[4],b[7];
a[0]=4; a[1]=6; a[2]=9; a[3]=11;
b[0]=1; b[1]=3; b[2]=5; b[3]=7; b[4]=8; b[5]=10; b[6]=12;
int count=0;
int d=0;
for(int i=0;i<4;i++){
if(x==a[i]){count++;}
if(y==a[i]){count++;}
}
for(int i=0;i<7;i++){
if(x==b[i]){d++;}
if(y==b[i]){d++;}
}
if(x==2 && y==2){cout << "Yes" << endl;}
else if(count==2){cout << "Yes" << endl;}
else if(d==2){cout << "Yes" << endl;}
else{cout << "No" << endl;}
}
| a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
8 | a[0]=4; a[1]=6; a[2]=9; a[3]=11;
| ^
In file included from /usr/include/c++/14/vector:72,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:8:16: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
8 | a[0]=4; a[1]=6; a[2]=9; a[3]=11;
| ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:8:24: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
8 | a[0]=4; a[1]=6; a[2]=9; a[3]=11;
| ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:8:32: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
8 | a[0]=4; a[1]=6; a[2]=9; a[3]=11;
| ^~
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:8: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
9 | b[0]=1; b[1]=3; b[2]=5; b[3]=7; b[4]=8; b[5]=10; b[6]=12;
| ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:16: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
9 | b[0]=1; b[1]=3; b[2]=5; b[3]=7; b[4]=8; b[5]=10; b[6]=12;
| ^
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| |
s383118580 | p03711 | C | #include<stdio.h>
int main(){
int h,w,i,j;
char a[100][101];
scanf("%d%d",&h,&w);
for(i=0;i<h;i++)scanf("%s",a[i]);
for(i=-1;i<=h;i++){
if(i==-1||i==h){
for(j=0;j<n+2;j++)printf("#");
puts("");
}
else{
printf("#%s#",a[i]);
}
}
return 0;
} | main.c: In function 'main':
main.c:10:11: error: 'n' undeclared (first use in this function)
10 | for(j=0;j<n+2;j++)printf("#");
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
|
s832779812 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int a[13]={0,1,3,1,2,1, 2 , 1 , 1 , 2 , 1 , 2 , 1}
int x,y;
cin>>x>>y;
if(a[x]==a[y]){cout<<"Yes"<<endl;}
else{cout<<"No"<<endl;}
} | a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'int'
6 | int x,y;
| ^~~
a.cc:7:8: error: 'x' was not declared in this scope
7 | cin>>x>>y;
| ^
a.cc:7:11: error: 'y' was not declared in this scope
7 | cin>>x>>y;
| ^
|
s485956572 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
if(x==1||x==3||x==5||x==7||x==8||x==10||x==12){
if(y==1||y==3||y==5||y==7||y==8||y==10||y==12){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
if(x==2){
if(y==2){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:26:4: error: expected '}' at end of input
26 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s094038175 | p03711 | C++ | #include<iostream>
main(){std::string x,y;std::cin>>x,y;x+=y;puts(x[1]=='2'||x[2]=='2'?"No":"Yes"));} | a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){std::string x,y;std::cin>>x,y;x+=y;puts(x[1]=='2'||x[2]=='2'?"No":"Yes"));}
| ^~~~
a.cc: In function 'int main()':
a.cc:2:80: error: expected ';' before ')' token
2 | main(){std::string x,y;std::cin>>x,y;x+=y;puts(x[1]=='2'||x[2]=='2'?"No":"Yes"));}
| ^
| ;
|
s143199712 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int>A(13) = {0,1,3,1,2,1,2,1,1,2,1,2,1};
if(A.at(x)==A.at(y)){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:20: error: expected ',' or ';' before '=' token
8 | vector<int>A(13) = {0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s341634741 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>x>>y;
cout<<(a[x]==a[y]?"Yes":"No")<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:44: error: expected ',' or ';' before '\U0000ff1b'
5 | int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.