submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s611636256 | p03711 | C++ | #include <iostream>
using namespace std;
int main()
{
int gp[3][7] = {
{1,3,5,7,8,10,12},
{4,6,9,11},
{2},
};
int x, y;
cin >> x >> y;
int xg= 0, yg = 0;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < sizeof(gp[i]/sizeof(int)); j++) {
if (gp[i][j] == x) {
xg = i;
}
if (gp[i][j] == y) {
yg = i;
}
}
}
if (xg == yg) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:37: error: invalid operands of types 'int [7]' and 'long unsigned int' to binary 'operator/'
14 | for (int j = 0; j < sizeof(gp[i]/sizeof(int)); j++) {
| ~~~~~^~~~~~~~~~~~
| | |
| | long unsigned int
| int [7]
|
s910713542 | p03711 | C++ | #include <iostream>
using namespace std;
int main()
{
int gp[3][] = {
{1,3,5,7,8,10,12},
{4,6,9,11},
{2},
};
int x, y;
cin >> x >> y;
int xg= 0, yg = 0;
for (int i = 0; i < 3; i++) {
for (int j = 0; j < sizeof(gp[i]/sizeof(int)); j++) {
if (gp[i][j] == x) {
xg = i;
}
if (gp[i][j] == y) {
yg = i;
}
}
}
if (xg == yg) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:7: error: declaration of 'gp' as multidimensional array must have bounds for all dimensions except the first
5 | int gp[3][] = {
| ^~
a.cc:14:32: error: 'gp' was not declared in this scope
14 | for (int j = 0; j < sizeof(gp[i]/sizeof(int)); j++) {
| ^~
|
s314577846 | p03711 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (x == 2 || y == 2 || x == 11 || y == 4)
cout << "No" << "\n";
else if (x == 4 || x == 6 || x == 9) {
if (y == 6 || y == 9 || y == 11)
cout << "Yes" << "\n";
else
cout << "No" << "\n";
}
else {
if (y == 6 || y == 9 || y == 11)
cout << "No" << "\n";
else
cout << "Yes" << "\n";
} | a.cc: In function 'int main()':
a.cc:22:10: error: expected '}' at end of input
22 | }
| ^
a.cc:6:12: note: to match this '{'
6 | int main() {
| ^
|
s609913084 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
vector<ll> num[13];
num[4] = 1;
num[6] = 1;
num[9] = 1;
num[11] = 1;
num[2] = 2;
int a, b;
cin >> a >> b;
if(num[a] == num[b]) cout << "Yes";
else cout << "No";
}
| a.cc: In function 'int main()':
a.cc:6:12: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'int')
6 | num[4] = 1;
| ^
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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:7:12: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'int')
7 | num[6] = 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:8:12: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'int')
8 | num[9] = 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:9:13: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'int')
9 | num[11] = 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:10:12: error: no match for 'operator=' (operand types are 'std::vector<long long int>' and 'int')
10 | num[2] = 2;
| ^
/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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long 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 = long long int; _Alloc = std::allocator<long long 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<long long int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
s101388304 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
vector<int> A = {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:7:3: error: expected ',' or ';' before 'if'
7 | if (A.at(x) == A.at(y)) {cout << "Yes" << endl;}
| ^~
a.cc:8:3: error: 'else' without a previous 'if'
8 | else {cout << "No" << endl;}
| ^~~~
|
s005195223 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
vector<int> A = {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:6:3: error: expected ',' or ';' before 'if'
6 | if (A.at(x) == A.at(y)) {cout << "Yes" << endl;}
| ^~
a.cc:7:3: error: 'else' without a previous 'if'
7 | else {cout << "No" << endl;}
| ^~~~
|
s948112784 | p03711 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <set>
#include <regex>
#include <locale>
using namespace std;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()
using ll = long long;
int main () {
int a, b;
cin >> a >> b;
set s1 = {1,3,5,7,8,10,12};
set s2 = {4,6,9,11}
if (a == 2) {
if (b > 2 && (s1.count(b) > 0 || s2.count(b) > 0)) {
cout << "Yes" << endl;
}
} else if (b == 2) {
if (a == 1) cout << "Yes" << endl;
} else if ((s1.count(a) > 0 && s2.count(b) > 0) ||
(s1.count(b) > 0 && s2.count(a) > 0)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:24:3: error: expected ',' or ';' before 'if'
24 | if (a == 2) {
| ^~
a.cc:28:5: error: 'else' without a previous 'if'
28 | } else if (b == 2) {
| ^~~~
|
s572756613 | p03711 | C++ | #include <iostream>
#include<String>
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";
}
else if(x==4||x==6||x==9||x==11&&y==4||y==6||y==9||y==11)
{
cout<<"yes";
}
else if(x==2&&y==2)
{
cout<<"yes";
}
else
{
cout<<"no";
}
return 0;
} | a.cc:2:9: fatal error: String: No such file or directory
2 | #include<String>
| ^~~~~~~~
compilation terminated.
|
s366370343 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
if(a==2||b==2)cout << "No";
else if(a==4||a==6||a==9||a==11){
if(b==4||b==6||b==9||a==11){
cout << "Yes";
}
else cout << "Yes";
}
else{
if(b==4||b==6||b==9||a==11){
cout << "No";
}
else cout << "Yes"
}
} | a.cc: In function 'int main()':
a.cc:19:23: error: expected ';' before '}' token
19 | else cout << "Yes"
| ^
| ;
20 | }
| ~
|
s588261413 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n,m;
cin>>n>>m;
if(n<m){
if(n==2&&n!=m)
cout<<"No";
else if(n==4||n==6||n==9||n==11)&&(m==4||m==6||m==9||m==11))
cout<<"yes";
}
else if(n==1||n==3||n==5||n==7||n==8||n==12||n==10)&&(m==1||m==3||m==5||m==7||m==8||m==12||m==10))
cout<<"yes";
}
else cout<<"No";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:39: error: expected identifier before '(' token
10 | else if(n==4||n==6||n==9||n==11)&&(m==4||m==6||m==9||m==11))
| ^
a.cc:13:58: error: expected identifier before '(' token
13 | else if(n==1||n==3||n==5||n==7||n==8||n==12||n==10)&&(m==1||m==3||m==5||m==7||m==8||m==12||m==10))
| ^
a.cc: At global scope:
a.cc:16:1: error: expected unqualified-id before 'else'
16 | else cout<<"No";
| ^~~~
a.cc:17:5: error: expected declaration before '}' token
17 | }
| ^
a.cc:18:2: error: expected unqualified-id before 'return'
18 | return 0;
| ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
19 | }
| ^
|
s156080273 | p03711 | C++ | int main(){
int n,m;
cin>>n>>m;
if(n==2 &&m==2)
cout<<"Yes";
else if(n==2&&n!=m)
cout<<"No";
else if(n==4||n==6||n==9||n==11){
if(m==4||m==6||m==9||m==11)
cout<<"yes";
}
else if(n==1||n==3||n==5||n==7||n==8||n==12||n==10){
if(m==1||m==3||m==5||m==7||m==8||m==12||m==10)
cout<<"yes";
}
else cout<<"No";
return 0;
}
| a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin>>n>>m;
| ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
5 | cout<<"Yes";
| ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout<<"No";
| ^~~~
a.cc:10:13: error: 'cout' was not declared in this scope
10 | cout<<"yes";
| ^~~~
a.cc:14:13: error: 'cout' was not declared in this scope
14 | cout<<"yes";
| ^~~~
a.cc:16:6: error: 'cout' was not declared in this scope
16 | else cout<<"No";
| ^~~~
|
s107769316 | p03711 | Java | 2 4 | Main.java:1: error: class, interface, enum, or record expected
2 4
^
1 error
|
s980164182 | p03711 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for(int i= 0; i < (n); i++)
using ll= long long int;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {if(a < b) {a= b;return 1;}return 0;}
template <class T> inline bool chmin(T &a, T b) {if(a > b) {a= b;return 1;}return 0;}
ll mod= 1e9 + 7;
int main(){
int x,y;
cin >> x>>y;
int d[13]={0,1,3,1,,2,1,2,1,1,2,1,2,1};
if(d[x]==d[y]){cout << "Yes" << endl;}else{cout << "No" << endl;}
}
| a.cc: In function 'int main()':
a.cc:14:22: error: expected primary-expression before ',' token
14 | int d[13]={0,1,3,1,,2,1,2,1,1,2,1,2,1};
| ^
|
s430193420 | p03711 | C++ | //組の練習?
#include <bits/stdc++.h>
#define rep(i,N) for (int i = 0; i < (N); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void){
int a, b;
cin >> a >> b;
vector <int> vec = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2};
if (vec.at(x) == vec.at(y)) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:14:14: error: 'x' was not declared in this scope
14 | if (vec.at(x) == vec.at(y)) cout << "Yes" << endl;
| ^
a.cc:14:27: error: 'y' was not declared in this scope
14 | if (vec.at(x) == vec.at(y)) cout << "Yes" << endl;
| ^
|
s643410933 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
template <typename T>
bool PN(T x){ if (x <= 1) return false; if (x == 2) return true; for (int i = 2; i < sqrt(x) + 1; i++) if (x % i == 0) return false; return true;}
const ll MOD = 1e9+7;
void solve(){
int x, y; cin >> x >> y;
int check[13] = {-1, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
if(check[x] == checl[y]) cout << "Yes" << endl;
else cout << "No" << endl;
}
int main()
{
solve();
return 0;
} | a.cc: In function 'void solve()':
a.cc:12:18: error: 'checl' was not declared in this scope; did you mean 'check'?
12 | if(check[x] == checl[y]) cout << "Yes" << endl;
| ^~~~~
| check
|
s765474754 | 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==5||y==3||y==7||y==10||y==12){
cout<<"YES";
}
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{
cout<<"NO"<<endl;
}
return 0;}
| a.cc: In function 'int main()':
a.cc:9:39: error: lvalue required as left operand of assignment
9 | if(x==1||x==3||x==5||x==7||x==8||x==10||x=12)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
s050433526 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> S;
S.insert(1);
S.insert(3);
S.insert(5);
S.insert(7);
S.insert(8);
S.insert(10);
S.insert(12);
set<int> B;
B.insert(4);
B.insert(6);
B.insert(9);
B.insert(11);
set<int> C;
C.insert(2);
int a, b ;
cin >> a >> b ;
cout << ( (S.count(a)&&S.count(b))||
(B.count(a)&&N.count(b))||
(C.count(a)&&C.count(b)) ?
"Yes" : "No"
)
<< endl;
} | a.cc: In function 'int main()':
a.cc:30:25: error: 'N' was not declared in this scope
30 | (B.count(a)&&N.count(b))||
| ^
|
s867680009 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> S;
S.insert(1);
S.insert(3);
S.insert(5);
S.insert(7);
S.insert(8);
S.insert(10);
S.insert(12);
set<int> B;
B.insert(4);
B.insert(6);
B.insert(9);
B.insert(11);
set<int> C;
C.insert(2);
int a, b ;
cin >> a >> b ;
cout << ( (S.count(a)&&S.count(b))||
(B.count(a)&&N.count(b))||
(C.count(a)&&C.count(b)) ?
"Yes" : "No"
)
<< endl; | a.cc: In function 'int main()':
a.cc:30:25: error: 'N' was not declared in this scope
30 | (B.count(a)&&N.count(b))||
| ^
a.cc:34:13: error: expected '}' at end of input
34 | << endl;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s325781457 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> S;
S.insert(1);
S.insert(3);
S.insert(5);
S.insert(7);
S.insert(8);
S.insert(10);
S.insert(12);
set<int> B;
B.insert(4);
B.insert(6);
B.insert(9);
B.insert(11);
set<int> C;
C.insert(2);
int a, b ;
cin a >> b ;
cout << ( (S.count(a)&&S.count(b))||
(B.count(a)&&N.count(b))||
(C.count(a)&&C.count(b)) ?
"Yes" : "No"
) | a.cc: In function 'int main()':
a.cc:27:6: error: expected ';' before 'a'
27 | cin a >> b ;
| ^~
| ;
a.cc:30:25: error: 'N' was not declared in this scope
30 | (B.count(a)&&N.count(b))||
| ^
a.cc:33:13: error: expected '}' at end of input
33 | )
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s284140345 | p03711 | C | #include<stdio.h>
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x,y,z;
cin>>x>>y;
if(x==2 || y==2)
cout<<"No"<<endl;
else if(x==4 || x==6 || x==9 || x==12)
if(y==4 || y==6 || y==9 || y==12)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
else if(x== 3 || x==1 || x==5 || x==7 || x==8 || x==10 || x==12)
if(y==3 || y==1 || y==5 || y==7 || y==8 || y==10 || y==12)
cout<<"yes"<<endl;
else
cout<<"No"<<endl;
else
cout<<"No"<<endl;
return 0;
}
| main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
2 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s831257541 | p03711 | C | int main()
{
int x,y,z;
cin>>x>>y;
if(x==2 || y==2)
cout<<"No"<<endl;
else if(x==4 || x==6 || x==9 || x==12)
if(y==4 || y==6 || y==9 || y==12)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
else if(x== 3 || x==1 || x==5 || x==7 || x==8 || x==10 || x==12)
if(y==3 || y==1 || y==5 || y==7 || y==8 || y==10 || y==12)
cout<<"yes"<<endl;
else
cout<<"No"<<endl;
else
cout<<"No"<<endl;
return 0;
}
| main.c: In function 'main':
main.c:4:5: error: 'cin' undeclared (first use in this function)
4 | cin>>x>>y;
| ^~~
main.c:4:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:9: error: 'cout' undeclared (first use in this function)
6 | cout<<"No"<<endl;
| ^~~~
main.c:6:21: error: 'endl' undeclared (first use in this function)
6 | cout<<"No"<<endl;
| ^~~~
|
s071609436 | p03711 | C++ | int main()
{
int x,y,z;
cin>>x>>y;
if(x==2 || y==2)
cout<<"No"<<endl;
else if(x==4 || x==6 || x==9 || x==12)
if(y==4 || y==6 || y==9 || y==12)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
else if(x== 3 || x==1 || x==5 || x==7 || x==8 || x==10 || x==12)
if(y==3 || y==1 || y==5 || y==7 || y==8 || y==10 || y==12)
cout<<"yes"<<endl;
else
cout<<"No"<<endl;
else
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
4 | cin>>x>>y;
| ^~~
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<<"yes"<<endl;
| ^~~~
a.cc:14:26: error: 'endl' was not declared in this scope
14 | cout<<"yes"<<endl;
| ^~~~
a.cc:16:13: error: 'cout' was not declared in this scope
16 | cout<<"No"<<endl;
| ^~~~
a.cc:16:25: error: 'endl' was not declared in this scope
16 | cout<<"No"<<endl;
| ^~~~
a.cc:18:9: error: 'cout' was not declared in this scope
18 | cout<<"No"<<endl;
| ^~~~
a.cc:18:21: error: 'endl' was not declared in this scope
18 | cout<<"No"<<endl;
| ^~~~
|
s652819179 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define INF 1e12
#define PB push_back
#define PF push_front
#define fi first
#define se second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vpi vector<pii>
#define vll vector<ll>
#define vpl vector<pll>
#define vvi vector<vector<int>>
#define vvl vector<vector<ll>>
#define MX(x) *max_element(all(x))
#define MN(x) *min_element(all(x))
#define ios ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define pr_d(x) cout << fixed << setprecision(15) << x << endl
#define ud(c, x) distance(c.begin(), upper_bound(all(c), x))
#define ld(c, x) distance(c.begin(), lower_bound(all(c), x))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define rep3(i, n) for (int i = (n - 1); i >= 0; --i)
#define rep4(i, a, b) for (int i = (a); i > (b); --i)
#define pb push_back
#define out(x) cout << x << "\n"
bool odd(int i) { return i % 2; }
#define all(v) v.begin(), v.end()
#define size(x) int(x.size())
int gcd(int a, int b) { return __gcd(a, b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
void Yes_No(bool f) {
if (f)
printf("Yes\n");
else
printf("No\n");
}
void deb_p(pii p) { printf("pair = %d %d\n", p.fi, p.se); }
void deb_i(int i) { printf("i = %d\n", i); }
void deb_v(vector<int> v) {
printf("v = ");
for (auto i : v) printf("%d ", i);
printf("\n");
}
template <typename T>
bool chmax(T& a, const T& b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
if (a > b) {
a = b;
return true;
}
return false;
}
//-------------------ここから回答する-----------------------
int f(int x) {
switch (x) {
case (1):
case (3):
case (5):
case (7):
case (8):
case (10):
case (12):
return 1;
case (4):
case (6):
case (9):
case (11):
return 2;
case (2):
return 3
}
}
void solve(void) {
int x, y;
cin >> x >> y;
Yes_No(f(x) == f(y));
}
int main(void) { solve(); } | a.cc: In function 'int f(int)':
a.cc:86:15: error: expected ';' before '}' token
86 | return 3
| ^
| ;
87 | }
| ~
a.cc:88:1: warning: control reaches end of non-void function [-Wreturn-type]
88 | }
| ^
|
s302051725 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
#define debug(n) cerr << #n << ':' << n << endl;
#define dline cerr << __LINE__ << endl;
using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;
template<class T>
bool ChangeMax(T&a,const T&b){
if(a >= b) return false;
a = b; return true;
}
template<class T>
bool ChangeMin(T&a,const T&b){
if(a <= b) return false;
a = b; return true;
}
template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
fill((U*)a,(U*)(a+N),v);
}
template<class T>
istream& operator >> (istream&is, vector<T>&v){
for(auto&e:v)is >> e;
return is;
}
int Sum(const string&s){
int n = (int)s.size();
int sum = 0;
for(int i = 0; i < n; ++i)sum += s[i] - '0';
return sum;
}
struct UFT{
int * p;
UFT(int N):p(new int[N]){fill(p,p+N,-1);}
~UFT(){delete[] p;}
int par(int a) { if( p[a] >= 0 ){ p[a] = par( p[a] ); return p[a]; } return a; }
int size(int a) { return -p[par(a)]; }
bool same(int a, int b) { return par(a) == par(b); }
void unite(int a, int b){
a = par(a); b = par(b);
if( a == b ) return;
if( size(a) < size(b) )a^=b^=a^=b;
p[a] -= size(b);
p[b] = a;
}
};
int main(){
UFT uft(13);
uft.unite(4,6);
uft.unite(4,9);
uft.unite(4,11);
uft.unite(1,3);
uft.unite(1,5);
uft.unite(1,7);
uft.unite(1,8);
uft.unite(1,10);
uft.unite(1,12);
int a,b;cin >> a >> b;
cout << (uft.same(a, v) ? "Yes" : "No") << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:76:24: error: 'v' was not declared in this scope
76 | cout << (uft.same(a, v) ? "Yes" : "No") << endl;
| ^
|
s437263433 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
vector<int> A, B;
A = {1, 3, 5, 7, 8, 10, 12};
B = {4, 6, 9, 11};
int C = 12;
int X, Y;
cin >> A >> B;
int Xa = 0;
int Xb = 0;
int Xc = 0;
rep(i, 6) {
if(A.at(i) == X) {
Xa++;
}
}
rep(i,3) {
if(B.at(i) == X) {
Xb++;
}
}
if(C == X) {
Xc++;
}
rep(i, 6) {
if(A.at(i) == Y) {
Xa++;
}
}
rep(i,3) {
if(B.at(i) == Y) {
Xb++;
}
}
if(C == Y) {
Xc++;
}
if(Xa == 2) {
cout << "Yes" << endl;
}
else if(Xb == 2) {
cout << "Yes" << endl;
}
else if(Xc == 2) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:7: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>')
11 | cin >> A >> B;
| ~~~ ^~ ~
| | |
| | std::vector<int>
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from 'std::vector<int>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from 'std::vector<int>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from 'std::vector<int>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from 'std::vector<int>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from 'std::vector<int>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'std::vector<int>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'std::vector<int>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from 'std::vector<int>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
| ~~~~~~~~~~~~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef |
s187082045 | p03711 | C++ | #define _GIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main(void) {
int x, y;
cin >> x >> y;
vector<vector<int>> v = {{1, 3, 5, 7, 8, 10 , 12},
{4, 6, 9, 11},
{2}};
int xg, yg;
rep(j, v.size()) {
rep(i, v[j].size()) {
if (v[j][i] == x) xg = j;
if (v[j][i] == y) yg = j;
}
}
if (xg == yg) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}b | a.cc:31:2: error: 'b' does not name a type
31 | }b
| ^
|
s824853603 | p03711 | C | #include <stdio.h>
int main(void)
{
int a[7]={1,3,5,7,8,10,12};b[4]={4,6,9,11},c=2;
int s1=0,s2=0,x,y,i;
scanf("%d%d",&x,&y);
for(i=0;i<7;i++)
if(x==a[i] || y==a[i])s1++;
for(i=0;i<4;i++)
if(x==b[i] || y==b[i])s2++;
if(s1==2 || s2==2 || x==2 && y==2)printf("Yes");
else printf("No");
return 0;
}
| main.c: In function 'main':
main.c:5:36: error: 'b' undeclared (first use in this function)
5 | int a[7]={1,3,5,7,8,10,12};b[4]={4,6,9,11},c=2;
| ^
main.c:5:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:41: error: expected expression before '{' token
5 | int a[7]={1,3,5,7,8,10,12};b[4]={4,6,9,11},c=2;
| ^
|
s036227272 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int group1 = 0. group2 = 0, group3 = 0;
if (x == 2) {
group3++;
} else if (x == 4 || x == 6 || x == 9 || x == 11) {
group2++;
} else {
group1++;
}
if (y == 2) {
group3++;
} else if (y == 4 || y == 6 || y == 9 || y == 11) {
group2++;
} else {
group1++;
}
if (group1 == 2 || group2 == 2 || group3 == 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:19: error: expected ',' or ';' before 'group2'
7 | int group1 = 0. group2 = 0, group3 = 0;
| ^~~~~~
a.cc:11:5: error: 'group3' was not declared in this scope; did you mean 'group1'?
11 | group3++;
| ^~~~~~
| group1
a.cc:13:5: error: 'group2' was not declared in this scope; did you mean 'group1'?
13 | group2++;
| ^~~~~~
| group1
a.cc:19:5: error: 'group3' was not declared in this scope; did you mean 'group1'?
19 | group3++;
| ^~~~~~
| group1
a.cc:21:5: error: 'group2' was not declared in this scope; did you mean 'group1'?
21 | group2++;
| ^~~~~~
| group1
a.cc:26:22: error: 'group2' was not declared in this scope; did you mean 'group1'?
26 | if (group1 == 2 || group2 == 2 || group3 == 2) {
| ^~~~~~
| group1
a.cc:26:37: error: 'group3' was not declared in this scope; did you mean 'group1'?
26 | if (group1 == 2 || group2 == 2 || group3 == 2) {
| ^~~~~~
| group1
|
s399574276 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9, 11};
int c = 2;
if (x == y) {
cout << "Yes" << endl;
return 0;
}
int x_ = 0;
int y_ = 0;
for (int i=0; i<(int)a.length();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
for (int i=0; i<(int)b.length();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
if (x_ == y_) {
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:17:26: error: request for member 'length' in 'a', which is of non-class type 'int [7]'
17 | for (int i=0; i<(int)a.length();i++){
| ^~~~~~
a.cc:21:26: error: request for member 'length' in 'b', which is of non-class type 'int [4]'
21 | for (int i=0; i<(int)b.length();i++){
| ^~~~~~
|
s653821456 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9, 11};
int c = 2;
if (x == y) {
cout << "Yes" << endl;
return 0;
}
int x_ = 0;
int y_ = 0;
for (int i=0; i<(int)a.size();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
for (int i=0; i<(int)b.size();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
if (x_ == y_) {
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:17:26: error: request for member 'size' in 'a', which is of non-class type 'int [7]'
17 | for (int i=0; i<(int)a.size();i++){
| ^~~~
a.cc:21:26: error: request for member 'size' in 'b', which is of non-class type 'int [4]'
21 | for (int i=0; i<(int)b.size();i++){
| ^~~~
|
s662352279 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9, 11}
int c = 2;
if (x == y) {
cout << "Yes" << endl;
return 0;
}
int x_ = 0;
int y_ = 0;
for (int i=0; i<(int)a.size();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
for (int i=0; i<(int)b.size();i++){
if (a[i] == x) x_ = 1;
if (a[i] == y) y_ = 1;
}
if (x_ == y_) {
cout << "Yes" << endl;
return 0;
}
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
8 | int c = 2;
| ^~~
a.cc:17:26: error: request for member 'size' in 'a', which is of non-class type 'int [7]'
17 | for (int i=0; i<(int)a.size();i++){
| ^~~~
a.cc:21:26: error: request for member 'size' in 'b', which is of non-class type 'int [4]'
21 | for (int i=0; i<(int)b.size();i++){
| ^~~~
|
s126125716 | p03711 | C++ | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))
using namespace std;
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const ll mod=1e9+7;
const ll INF=1e10+100;
int main()
{
ll x,y;
cin >> x >> y;
ll a={1,3,5,7,8,10,12};
ll b={4,6,9,11};
bool ok1=false,ok2=false,ok3=false,ok4=false;
rep(i,7){
if(a[i]==x) ok1=true;
if(a[i]==y) ok2=true;
}
rep(i,4){
if(b[i]==x) ok3=true;
if(b[i]==y) ok4=true;
}
if((ok1 && ok2) || (ok3 && ok4)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:28:8: error: scalar object 'a' requires one element in initializer
28 | ll a={1,3,5,7,8,10,12};
| ^
a.cc:29:8: error: scalar object 'b' requires one element in initializer
29 | ll b={4,6,9,11};
| ^
|
s346344922 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int x, y;
cin >> x >> y;
if((x==2 and y==2)cout << "Yes";
else if(x==2 or y==2) cout << "No";
else if(((x<8 and x%2) or (x>7 and x%2==0)) and ((y<8 and y%2) or (y>7 and y%2==0))) cout << "Yes";
else if((x==4 or x==6 or x==9 or x==11) and (y==4 or y==6 or y==9 or y==11)) cout << "Yes";
else cout << "No";
}
| a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before 'cout'
9 | if((x==2 and y==2)cout << "Yes";
| ^~~~
| ;
a.cc:10:5: error: expected primary-expression before 'else'
10 | else if(x==2 or y==2) cout << "No";
| ^~~~
a.cc:9:37: error: expected ')' before 'else'
9 | if((x==2 and y==2)cout << "Yes";
| ~ ^
| )
10 | else if(x==2 or y==2) cout << "No";
| ~~~~
|
s726575641 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
vector<int> c={ 0,1,3,1,2,1,2,1,1,2,1,2,1 }
if( c.at(a) == c.at(b) ){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
10 | if( c.at(a) == c.at(b) ){
| ^~
a.cc:16:3: error: 'else' without a previous 'if'
16 | else{
| ^~~~
|
s135500735 | 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();
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.println(Yes);
}else{
System.out.println(No);
}
}if(x==2||x==6||x==9||x==11){
if(y==2||y==6||y==9||y==11){
System.out.println(Yes);
}else{
System.out.println(No);
}
}
}
}
| Main.java:9: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:11: error: cannot find symbol
System.out.println(No);
^
symbol: variable No
location: class Main
Main.java:15: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:17: error: cannot find symbol
System.out.println(No);
^
symbol: variable No
location: class Main
4 errors
|
s204793980 | 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();
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.println(Yes);
}else{
System.out.println(No);
}
}if(x=2 || x=6 || x=9 || x=11){
if(y=2 || y=6 || y=9 || y=11){
System.out.println(Yes);
}else{
System.out.println(No);
}
}
}
}
| Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: bad operand types for binary operator '||'
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
first type: int
second type: int
Main.java:7: error: incompatible types: int cannot be converted to boolean
if(x=1 || x=3 || x=5 || x=7 || x=8 || x=10 || x=12){
^
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: bad operand types for binary operator '||'
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
first type: int
second type: int
Main.java:8: error: incompatible types: int cannot be converted to boolean
if(y=1 || y=3 || y=5 || y=7 || y=8 || y=10 || y=12){
^
Main.java:9: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:11: error: cannot find symbol
System.out.println(No);
^
symbol: variable No
location: class Main
Main.java:13: error: bad operand types for binary operator '||'
}if(x=2 || x=6 || x=9 || x=11){
^
first type: int
second type: int
Main.java:13: error: bad operand types for binary operator '||'
}if(x=2 || x=6 || x=9 || x=11){
^
first type: int
second type: int
Main.java:13: error: bad operand types for binary operator '||'
}if(x=2 || x=6 || x=9 || x=11){
^
first type: int
second type: int
Main.java:13: error: incompatible types: int cannot be converted to boolean
}if(x=2 || x=6 || x=9 || x=11){
^
Main.java:14: error: bad operand types for binary operator '||'
if(y=2 || y=6 || y=9 || y=11){
^
first type: int
second type: int
Main.java:14: error: bad operand types for binary operator '||'
if(y=2 || y=6 || y=9 || y=11){
^
first type: int
second type: int
Main.java:14: error: bad operand types for binary operator '||'
if(y=2 || y=6 || y=9 || y=11){
^
first type: int
second type: int
Main.java:14: error: incompatible types: int cannot be converted to boolean
if(y=2 || y=6 || y=9 || y=11){
^
Main.java:15: error: cannot find symbol
System.out.println(Yes);
^
symbol: variable Yes
location: class Main
Main.java:17: error: cannot find symbol
System.out.println(No);
^
symbol: variable No
location: class Main
26 errors
|
s302667472 | 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();
if(x>=1 && x<=12 && y>=1 && y<=12){
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)){
System.out.println("yes");
}else if((x==4||x==6||x==9||x==11)&&(y==4||y==6||y==9||y==11)){
System.out.println("yes");
}else if(x==2 && y==2){
System.out.println("yes");
}else{
System.out.println("no");
}
}else{
System.out.println("入力値が誤っています");
}
}
}
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();
if(x>=1 && x<=12 && y>=1 && y<=12){
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)){
System.out.println("Yes");
}else if((x==4||x==6||x==9||x==11)&&(y==4||y==6||y==9||y==11)){
System.out.println("Yes");
}else if(x==2 && y==2){
System.out.println("Yes");
}else{
System.out.println("No");
}
}else{
System.out.println("入力値が誤っています");
}
}
} | Main.java:28: error: class, interface, enum, or record expected
import java.util.*;
^
1 error
|
s093510701 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int X[] = {0,1,3,1,2,1,2,1,1,2,1,2,1}
int A,B;
cin >> A >> B;
if(X[A] == X[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;
| ^
|
s484291537 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int X[] = {0,1,3,1,2,1,2,1,1,2,1,2,1}
int A,B;
cin >> A >> B;
if(X[A] == X[B]){
cout << "YES" << endl;
}
else{
cout << "YES" << 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;
| ^
|
s633173447 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
bool A=false;
bool B=false;
bool C=true;
int a,b;
cin >> a >> b;
vector<int>N(7);
N.at(0)=1;
N.at(1)=3;
N.at(2)=5;
N.at(3)=7;
N.at(4)=8;
N.at(5)=10;
N.at(6)=12;
vector<int>M(4);
M.at(0)=4;
M.at(1)=6;
M.at(2)=9;
M.at(3)=11;
for(int i=0;i<7;i++){
if(N.at(i)==a){
A=true;
C=false;
}
if(N.at(i)==b){
B=true;
C=false;
}
}
for(int i=0;i<4&&C=true;i++){
if(M.at(i)==a){
A=true;
}
if(M.at(i)==b){
A=true;
}
}
if(A&&B){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:33:18: error: lvalue required as left operand of assignment
33 | for(int i=0;i<4&&C=true;i++){
| ~~~^~~
|
s543893731 | p03711 | C | #incude <stdio.h>
#define GROUP_1_MAX 7
#define GROUP_2_MAX 4
#define GROUP_3_MAX 1
typedef struct {
int group[GROUP_1_MAX];
} GROUP_t;
int checkNum( GROUP_t *a_pstGroup, int x, int y, int groupNum );
int main(){
int x,y,ret;
GROUP_t stGroup1 = { 1, 3, 5, 7, 8, 10, 12 };
GROUP_t stGroup2 = { 4, 6, 9, 11 };
GROUP_t stGroup3 = { 2 };
scanf( "%d", x );
scanf( "%d", y );
if( ( checkNum( &stGroup1, x, y, GROUP_1_MAX ) != 0 ) &&
( checkNum( &stGroup2, x, y, GROUP_2_MAX ) != 0 ) &&
( checkNum( &stGroup3, x, y, GROUP_3_MAX ) != 0 ) ) {
printf( "%s\n", "Yes" );
} else {
printf( "%s\n", "No" );
}
return 0;
}
int checkNum( GROUP_t *a_pstGroup, int x, int y, int groupNum ) {
int i, ret, x_count, y_count;
for( i = 0; i < groupNum; i++ ){
if( x == a_pstGroup->group[i] ){
x_count = 1;
}
if( y == a_pstGroup->group[i] ){
y_count = 1;
}
}
if ( ( x_count == 1 ) && ( y_count == 1 ) ) {
ret = groupNum;
} else {
ret = 0;
}
return ret;
}
| main.c:1:2: error: invalid preprocessing directive #incude; did you mean #include?
1 | #incude <stdio.h>
| ^~~~~~
| include
main.c: In function 'main':
main.c:19:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
19 | scanf( "%d", x );
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | #incude <stdio.h>
main.c:19:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
19 | scanf( "%d", x );
| ^~~~~
main.c:19:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
25 | printf( "%s\n", "Yes" );
| ^~~~~~
main.c:25:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:27:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
27 | printf( "%s\n", "No" );
| ^~~~~~
main.c:27:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s279613819 | p03711 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
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;
cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| a.cc: In function 'int main()':
a.cc:9:47: error: expected '}' at end of input
9 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s923071629 | p03711 | C++ | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
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:8:12: error: 'x' was not declared in this scope
8 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:8:20: error: 'y' was not declared in this scope
8 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:8:47: error: expected '}' at end of input
8 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s608454053 | p03711 | C++ | #include <iostream>
using namespace std;
using Int = long long int;
using UInt = unsigned long long int;
int main(void) {
int x, y;
cin >> x >> y;
int g_num[13] = {0,1,3,1,2,1,2,1,1,2,1,2,1}
if (g_num[x] == g_num[y]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'if'
12 | if (g_num[x] == g_num[y]) {
| ^~
a.cc:14:7: error: 'else' without a previous 'if'
14 | } else {
| ^~~~
|
s334201868 | p03711 | C++ | #include "bits/stdc++.h"
using namespace std;
int main() {
vector<int> g1 {1, 3, 5, 7, 8, 10, 12};
vector<int> g2 {4, 6, 9, 11};
int x, y;
cin >> x >> y;
if (find(g1.begin(), g1.end(), x) != g1.end() && find(g1.begin(), g1.end(), y) != g1.end()) {
cout << "Yes" << endl;
} else if (find(g2.begin(), g2.end(), x) != g2.end() && find(g2.begin(), g2.end(), y) != g2.end()) {
cout << "Yes" << endl;
} else if (x == 2 && y == 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl
}
return 0;
} | a.cc: In function 'int main()':
a.cc:18:29: error: expected ';' before '}' token
18 | cout << "No" << endl
| ^
| ;
19 | }
| ~
|
s311315655 | p03711 | C++ | #include<iostream>
using namespace std;
int main(){
int c[12]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int a,b;
cin>>a>>b;
if(c[a]==c[b])
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:4:39: error: too many initializers for 'int [12]'
4 | int c[12]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s381212552 | p03711 | C++ | #include <bits/stdc=+.h>
using namespace std;
int main() {
int g[]={-1,0,2,0,1,0,1,0,0,1,0,1,0};
int a,b;
cin >> a >> b;
cout << ( g[a]==g[b] ? "Yes" : "no" ) << '\n';
return 0;
} | a.cc:1:10: fatal error: bits/stdc=+.h: No such file or directory
1 | #include <bits/stdc=+.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s441876703 | p03711 | C++ | #include <bits/stdc++.h>
#define INF 2e9
#define MOD 1000000007
#define MOD9 998244353
#define intMAX 51000;
#define PI 3.14159265359
using namespace std;
typedef long long llong;
// typedef long double ldouble;
using Graph = vector<vector<int>>;
// int ctoi(const char c){
// if('0' <= c && c <= '9') return (c-'0');
// return -1;
// }
// int gcd(int a, int b){
// int ma = max(a,b);
// int mi = min(a,b);
// if(mi == 0) return ma;
// return gcd(mi, ma%mi);
// }
// llong POW(llong a, llong b){
// if(b == 0) return 1;
// else{
// if(b%2 == 0) return POW(a * a % MOD, b / 2) % MOD;
// else return a * POW(a * a % MOD, b / 2) % MOD;
// }
// }
int main(){
int x, y;
cin >> x >> y;
int xgroup = 3;
int ygroup = 3;
vector<int> A(7) = {1, 3, 5, 7, 8, 10, 12};
vector<int> B(4) = {4, 6, 9, 11};
for(int i=0; i<7; ++i){
if(x == A[i]) xgroup = 1;
if(y == A[i]) ygroup = 1;
}
for(int i=0; i<4; ++i){
if(x == B[i]) xgroup = 2;
if(y == B[i]) ygroup = 2;
}
if(xgroup == ygroup) cout << "Yes" << endl;
else cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:39:20: error: expected ',' or ';' before '=' token
39 | vector<int> A(7) = {1, 3, 5, 7, 8, 10, 12};
| ^
a.cc:40:20: error: expected ',' or ';' before '=' token
40 | vector<int> B(4) = {4, 6, 9, 11};
| ^
|
s856310568 | 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,10,12};
vector<int> b={4,6,9,11};
bool flag1=false;
bool flag2=false;
if(x==2&&y==2) cout << "Yes" << endl;
else{
for(int i=0;i<7;i++){
if(a.at(i)==x) flag1=true;
if(a.at(i)==y) flag2=true;
}
for(int i=0;i<4;i++){
if(b.at(i)==x) flag1=true;
if(b.at(i)==y)flag2=true;
}
if(flag1&&flag2) cout << "Yes" << endl;
else cout << "No" << endl;
}
}
| a.cc:12:28: error: extended character is not valid in an identifier
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^
a.cc: In function 'int main()':
a.cc:12:28: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^~~~~~~
|
s117741786 | 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,10,12};
vector<int> b={4,6,9,11};
bool flag1=false;
bool flag2=false;
if(x==2&&y==2) cout << "Yes" << endl;
else{
for(int i=0;i<7;i++){
if(a.at(i)==x) flag1=true;
if(a.at(i)==y) flag=true;
}
for(int i=0;i<4;i++){
if(b.at(i)==x) flag1=true;
if(b.at(i)==y)flag2=true;
}
if(flag1&&flag2) cout << "Yes" << endl;
else cout << "No" << endl;
}
}
| a.cc:12:28: error: extended character is not valid in an identifier
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^
a.cc: In function 'int main()':
a.cc:12:28: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^~~~~~~
a.cc:16:28: error: 'flag' was not declared in this scope; did you mean 'flag2'?
16 | if(a.at(i)==y) flag=true;
| ^~~~
| flag2
|
s740149698 | 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,10,12};
vector<int> b={4,6,9,11};
bool flag1=false;
bool flag2=false;
if(x==2&&y==2) cout << "Yes" << endl;
else{
for(int i=0;i<7;i++){
if(a.at(i)==x) flag1=true;
if(a.tt(i)==y) flag=true;
}
for(int i=0;i<4;i++){
if(b.at(i)==x) flag1=true;
if(b.at(i)==y)flag2=true;
}
if(flag1&&flag2) cout << "Yes" << endl;
else cout << "No" << endl;
}
}
| a.cc:12:28: error: extended character is not valid in an identifier
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^
a.cc: In function 'int main()':
a.cc:12:28: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^~~~~~~
a.cc:16:18: error: 'class std::vector<int>' has no member named 'tt'; did you mean 'at'?
16 | if(a.tt(i)==y) flag=true;
| ^~
| at
a.cc:16:28: error: 'flag' was not declared in this scope; did you mean 'flag2'?
16 | if(a.tt(i)==y) flag=true;
| ^~~~
| flag2
|
s616691655 | 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,10,12};
vector<int> b=[4,6,9,11];
bool flag1=false;
bool flag2=false;
if(x==2&&y==2) cout << "Yes" << endl;
else{
for(int i=0;i<7;i++){
if(a.at(i)==x) flag1=true;
if(a.tt(i)==y) flag=true;
}
for(int i=0;i<4;i++){
if(b.at(i)==x) flag1=true;
if(b.at(i)==y)flag2=true;
}
if(flag1&&flag2) cout << "Yes" << endl;
else cout << "No" << endl;
}
}
| a.cc:12:28: error: extended character is not valid in an identifier
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^
a.cc: In function 'int main()':
a.cc:9:20: error: expected identifier before numeric constant
9 | vector<int> b=[4,6,9,11];
| ^
a.cc:9:21: error: expected ']' before ',' token
9 | vector<int> b=[4,6,9,11];
| ^
| ]
a.cc: In lambda function:
a.cc:9:21: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:9:19: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::vector<int>' requested
9 | vector<int> b=[4,6,9,11];
| ^~
a.cc:9:22: error: expected unqualified-id before numeric constant
9 | vector<int> b=[4,6,9,11];
| ^
a.cc:12:28: error: unable to find string literal operator 'operator""\U00003000' with 'const char [4]', 'long unsigned int' arguments
12 | if(x==2&&y==2) cout << "Yes" << endl;
| ^~~~~~~
a.cc:16:18: error: 'class std::vector<int>' has no member named 'tt'; did you mean 'at'?
16 | if(a.tt(i)==y) flag=true;
| ^~
| at
a.cc:16:28: error: 'flag' was not declared in this scope; did you mean 'flag2'?
16 | if(a.tt(i)==y) flag=true;
| ^~~~
| flag2
|
s505274087 | 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 x, y;
cin >> x >> y;
cout <<(a[x] == a[y] ? "Yes" : "No") << endl;
}
| a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'int'
6 | int x, y;
| ^~~
a.cc:7:10: error: 'x' was not declared in this scope
7 | cin >> x >> y;
| ^
a.cc:7:15: error: 'y' was not declared in this scope
7 | cin >> x >> y;
| ^
|
s426122365 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
const int64_t INF=999999999;
int main() {
int x,y;
cin>>x>>y;
vector<int>t={1,3,5,7,8,12};
vector<int>k={4,6,9,11};
int h=2;
if(x==2&&y==2){cout<<"Yes"<<endl;return 0;}
bool xx=false;bool yy=false;
for(int a:t){
if(x==a){xx=true;}
if(y==a){yy=true;}
}
if(xx&&yy){cout<<"Yes"<<endl;return 0;}
xx=false; yy=false;
for(int c:k){
if(x==a){xx=true;}
if(y==a){yy=true;}
}
if(xx&&yy){cout<<"Yes"<<endl;return 0;}
cout<<"No"<<endl;
return 0;} | a.cc: In function 'int main()':
a.cc:22:13: error: 'a' was not declared in this scope
22 | if(x==a){xx=true;}
| ^
a.cc:23:13: error: 'a' was not declared in this scope
23 | if(y==a){yy=true;}
| ^
|
s401524537 | p03711 | Java | import java.util.*;
public Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int[] group = new int[12];
group[0] = 0;
group[1] = 2;
group[2] = 0;
group[3] = 1;
group[4] = 0;
group[5] = 1;
group[6] = 0;
group[7] = 0;
group[8] = 1;
group[9] = 0;
group[10] = 1;
group[11] = 0;
int x = sc.nextInt();
int y = sc.nextInt();
if (group[x - 1] == group[y -1]) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} | Main.java:3: error: class, interface, enum, or record expected
public Main {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String args[]) {
^
(use --enable-preview to enable unnamed classes)
Main.java:29: error: class, interface, enum, or record expected
}
^
3 errors
|
s047713232 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> A = {1,3,5,7,8,10,12};
set<int> B = {4,6,9,11};
set<int> C = {2};
int x,y; cin >> x >> y;
if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
cout << "Yes";
}else{
cout << "No";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:90: error: expected ';' before '{' token
10 | if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
| ^
| ;
a.cc:12:6: error: expected primary-expression before 'else'
12 | }else{
| ^~~~
a.cc:12:6: error: expected ')' before 'else'
12 | }else{
| ^~~~
| )
a.cc:10:7: note: to match this '('
10 | if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
| ^
|
s227007303 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
set<int> A = {1,3,5,7,8,10,12};
set<int> B = {4,6,9,11};
set<int> C = {2};
int x,y; cin >> x >> y;
if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
cout << "Yes";
}else{
cout << "No;
}
return 0;
} | a.cc:13:17: warning: missing terminating " character
13 | cout << "No;
| ^
a.cc:13:17: error: missing terminating " character
13 | cout << "No;
| ^~~~
a.cc: In function 'int main()':
a.cc:10:90: error: expected ';' before '{' token
10 | if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
| ^
| ;
a.cc:12:6: error: expected primary-expression before 'else'
12 | }else{
| ^~~~
a.cc:12:6: error: expected ')' before 'else'
12 | }else{
| ^~~~
| )
a.cc:10:7: note: to match this '('
10 | if((A.count(x) && A.count(y) || B.count(x) && B.count(y) || C.count(x) && C.count(y)){
| ^
|
s394789247 | p03711 | C++ | //#pragma GCC optimize("O3")
//#pragma GCC target("avx")
#include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <optional>
#include <set>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
// Utility
using std::enable_if_t, std::is_same_v, std::is_array_v, std::is_invocable_v,
std::declval;
using std::get, std::make_pair, std::make_tuple, std::apply;
using std::iterator_traits, std::random_access_iterator_tag;
using std::make_optional, std::nullopt;
using std::stoll, std::stold, std::to_string, std::operator""s;
// Types
using std::bitset;
using std::deque, std::list, std::multiset, std::unordered_multimap,
std::unordered_multiset;
using std::nullptr_t, std::pair, std::tuple;
using ll = long long int;
using lf = long double;
using str = std::string;
template <class T> using u_set = std::unordered_set<T>;
template <class T> using vec = std::vector<T>;
using vecl = vec<ll>;
using vecf = vec<lf>;
using vecs = vec<str>;
template <class T> using option = std::optional<T>;
template <class K, class V> using u_map = std::unordered_map<K, V>;
template <class V> using graph = u_map<V, u_set<V>>;
template <typename _Signature> using fun = std::function<_Signature>;
// Algorithms
using std::accumulate, std::partial_sum, std::inclusive_scan,
std::exclusive_scan;
using std::all_of, std::any_of, std::none_of, std::count_if, std::find_if,
std::for_each, std::max_element, std::min_element, std::remove_if,
std::replace_if, std::copy, std::copy_if, std::reverse, std::transform,
std::unique, std::sort, std::next_permutation, std::swap;
using std::back_inserter;
using std::lower_bound, std::upper_bound;
using std::max, std::min, std::clamp, std::lcm, std::gcd;
namespace io {
// Input
using IS = std::istream;
IS &in(IS &);
IS &in(IS &i) { return i; }
template <class T, class... Ts> IS &in(IS &i, T &a, Ts &... as) {
return in(i >> a, as...);
}
template <class V> IS &operator>>(IS &i, vec<V> &a) {
for (auto &ai : a)
i >> ai;
return i;
}
template <class F, class S> IS &operator>>(IS &i, pair<F, S> &p) {
return in(i, p.first, p.second);
}
template <class... Ts> IS &operator>>(IS &i, tuple<Ts...> &t) {
return apply([&](auto &... ts) -> IS & { return in(i, ts...); }, t);
}
// Output
using OS = std::ostream;
OS &out(OS &o, str const &) { return o; }
template <class T> OS &out(OS &o, str const &, T const &a) { return o << a; }
template <class T, class... Ts>
OS &out(OS &o, str const &sep, T const &a, Ts const &... as) {
return out(o << a << sep, sep, as...);
}
template <class F, class S> OS &operator<<(OS &o, pair<F, S> const &p) {
return out(o, ":", p.first, p.second);
}
template <class T> OS &operator<<(OS &o, option<T> const &opt) {
return opt.has_value() ? (o << "Some(" << opt.value() << ")") : (o << "None");
}
template <class... Ts> OS &operator<<(OS &o, tuple<Ts...> const &t) {
auto f = [&](auto const &... ts) -> OS & {
return out(o << "(", ",", ts...);
};
return apply(f, t) << ")";
}
template <class T> struct Joiner {
str const pre;
str const post;
str const sep;
vec<T> const container;
template <class Itr>
Joiner(Itr begin, Itr end, str const &sep, str const &pre, str const &post)
: pre(pre), post(post), sep(sep), container(begin, end) {}
};
template <class T> OS &operator<<(OS &o, Joiner<T> const &joiner) {
auto itr = joiner.container.begin();
auto end = joiner.container.end();
o << joiner.pre;
if (itr != end)
o << *(itr++);
while (itr != end)
o << joiner.sep << *(itr++);
return o << joiner.post;
}
template <class Itr>
auto join(Itr b, Itr e, str const &sep = ""s, str const &pre = ""s,
str const &post = ""s) {
using T = typename iterator_traits<Itr>::value_type;
return Joiner<T>(b, e, sep, pre, post);
}
template <class C, enable_if_t<!is_same_v<C, str> && !is_array_v<C>,
nullptr_t> = nullptr>
OS &operator<<(OS &o, C const &a) {
return o << join(a.begin(), a.end(), ",", "[", "]");
}
} // namespace io
using std::cerr, std::cin, std::cout;
auto init_io = []() {
std::ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
cout << std::fixed << std::setprecision(15);
};
auto input = [](auto &... a) { io::in(cin, a...); };
auto print = [](auto const &... a) { io::out(cout, " ", a...) << "\n"; };
#ifdef JUMPAKU_DEBUG
auto dump = [](auto const &... a) { io::out(cerr, " ", a...) << "\n"; };
#else
auto dump = [](auto const &...) {};
#endif
using io::join;
// Hash
namespace hashcode {
template <class... Ts> ll hash_args(ll h, Ts const &... ts);
ll hash_args(ll h) { return h; }
template <class T, class... Ts>
ll hash_args(ll h, T const &t, Ts const &... ts) {
constexpr std::hash<T> hasher;
return hash_args(((h << 19) - h) ^ hasher(t), ts...);
}
} // namespace hashcode
namespace std {
template <class... Ts> struct hash<tuple<Ts...>> {
size_t operator()(tuple<Ts...> const &t) const {
ll h = apply(
[&](auto const &... ts) { return hashcode::hash_args(17, ts...); }, t);
return h ^ (h >> 32);
}
};
template <class T> struct hash<u_set<T>> {
size_t operator()(u_set<T> const &t) const {
auto hasher = std::hash<T>{};
return accumulate(
t.begin(), t.end(), (decltype(hasher(declval<T>())))0,
[&](auto acc, auto const &ti) { return acc + hasher(ti); });
}
};
} // namespace std
// Range
namespace ranges {
template <class T, class Itr> struct iterator_base {
using difference_type = ll;
using value_type = T;
using pointer = T *;
using reference = T &;
using iterator_category = random_access_iterator_tag;
ll i;
iterator_base(ll const &i) : i(i) {}
bool operator==(Itr const &itr) const { return i == itr.i; }
bool operator!=(Itr const &itr) const { return i != itr.i; }
ll operator-(Itr const &itr) const { return i - itr.i; }
Itr operator++(int) { return with(i++); }
Itr operator--(int) { return with(i--); }
Itr operator+(ll const &n) const { return with(i + n); }
Itr operator-(ll const &n) const { return with(i - n); }
Itr &operator+=(ll const &n) {
i += n;
return self();
}
Itr &operator-=(ll const &n) { return self() += (-n); }
Itr &operator++() { return self() += 1; }
Itr &operator--() { return self() -= 1; }
protected:
virtual Itr with(ll i) const = 0;
virtual Itr &self() = 0;
};
template <class T> struct seq_base {
ll const b;
ll const e;
seq_base(ll b, ll e) : b(b), e(max(b, e)) {}
ll size() const { return e - b; }
bool empty() const { return size() == 0; }
};
template <class T> struct seq : seq_base<T> {
struct iterator : iterator_base<T, iterator> {
seq<T> const &s;
iterator(seq<T> const &s, ll const &i)
: iterator_base<T, iterator>(i), s(s) {}
iterator with(ll i) const override { return iterator(s, i); }
iterator &self() override { return *this; }
T operator*() const { return s[this->i]; }
iterator &operator=(iterator const &itr) {
this->i = itr.i;
return *this;
}
};
fun<T(ll)> const f;
seq(ll b, ll e, fun<T(ll)> const &f) : seq_base<T>(b, e), f(f) {}
iterator begin() const { return iterator(*this, 0); }
iterator end() const { return iterator(*this, this->size()); }
T operator[](ll i) const { return f(i + this->b); }
};
template <class F>
seq(ll b, ll e, F const &f)->seq<typename std::invoke_result<F, ll>::type>;
struct range : seq_base<ll> {
struct iterator : iterator_base<ll, iterator> {
iterator(ll const &i) : iterator_base<ll, iterator>(i) {}
iterator with(ll i) const override { return iterator(i); }
iterator &self() override { return *this; }
ll operator*() const { return i; }
};
range(ll n) : range(0LL, n) {}
range(ll b, ll e) : seq_base<ll>(b, e) {}
iterator begin() const { return iterator(b); }
iterator end() const { return iterator(e); }
bool has(ll x) const { return b <= x && x < e; }
ll operator[](ll i) const { return i + b; }
};
} // namespace ranges
using range = ranges::range;
range::iterator end(ll i) { return range::iterator(i); }
range::iterator begin(ll i = 0LL) { return range::iterator(i); }
template <class F> auto seq(ll n, F const &f) { return ranges::seq(0LL, n, f); }
bool odd(ll n) { return n & 1; }
bool even(ll n) { return !odd(n); }
bool imply(bool p, bool q) { return !p || q; }
bool iff(bool p, bool q) { return p == q; }
constexpr ll MOD = 1e9 + 7;
void solve();
int main() {
init_io();
ll t = 1;
/** input(t); /**/
while (t--)
solve();
cout.flush();
}
void solve() {
ll x, y;
input(x, y);
u_set<ll> A{2}, B{4, 6, 9, 11}, C{1, 3, 5, 7, 8, 10, 12};
print(((A.find(x) != A.end() && A.find(y) != A.end()) ||
(B.find(x) != B.end() && B.find(y) != B.end()) ||
(C.find(x) != C.end() && C.find(y) != C.end()))
? "Yes"s
: "No"s);
}
| a.cc:48:49: error: 'function' in namespace 'std' does not name a template type
48 | template <typename _Signature> using fun = std::function<_Signature>;
| ^~~~~~~~
a.cc:23:1: note: 'std::function' is defined in header '<functional>'; this is probably fixable by adding '#include <functional>'
22 | #include <vector>
+++ |+#include <functional>
23 |
a.cc:225:3: error: 'fun' does not name a type
225 | fun<T(ll)> const f;
| ^~~
a.cc:226:19: error: 'fun' has not been declared
226 | seq(ll b, ll e, fun<T(ll)> const &f) : seq_base<T>(b, e), f(f) {}
| ^~~
a.cc:226:22: error: expected ',' or '...' before '<' token
226 | seq(ll b, ll e, fun<T(ll)> const &f) : seq_base<T>(b, e), f(f) {}
| ^
a.cc: In constructor 'ranges::seq<T>::seq(ll, ll, int)':
a.cc:226:61: error: class 'ranges::seq<T>' does not have any field named 'f'
226 | seq(ll b, ll e, fun<T(ll)> const &f) : seq_base<T>(b, e), f(f) {}
| ^
a.cc:226:63: error: 'f' was not declared in this scope
226 | seq(ll b, ll e, fun<T(ll)> const &f) : seq_base<T>(b, e), f(f) {}
| ^
|
s060348691 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> a={0,1,3,1,2,1,2,1,1,2,1,2,1}
int x,y;
cin >> x >> y;
if(a.at(x)==a.at(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:10: error: 'x' was not declared in this scope
7 | cin >> x >> y;
| ^
a.cc:7:15: error: 'y' was not declared in this scope
7 | cin >> x >> y;
| ^
|
s031917048 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int group[12]=[1,2,1,3,1,3,1,1,3,1,3,1];
int a,b;
cin>>a>>b;
if(group[a-1]==group[b-1]){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:5:18: error: expected identifier before numeric constant
5 | int group[12]=[1,2,1,3,1,3,1,1,3,1,3,1];
| ^
a.cc:5:19: error: expected ']' before ',' token
5 | int group[12]=[1,2,1,3,1,3,1,1,3,1,3,1];
| ^
| ]
a.cc: In lambda function:
a.cc:5:19: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:5:17: error: array must be initialized with a brace-enclosed initializer
5 | int group[12]=[1,2,1,3,1,3,1,1,3,1,3,1];
| ^~
a.cc:5:20: error: expected unqualified-id before numeric constant
5 | int group[12]=[1,2,1,3,1,3,1,1,3,1,3,1];
| ^
|
s924733668 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9, 11};
int c[] = {2};
int x, y;
cin >> x >> y;
char xg, yg;
for(int i=0; i<7; i++){
if(x==a[i]) xg='a';
if(y==a[i]) yg='a';
}
for(int i=0; i<4.size(); i++){
if(x==b[i]) xg='b';
if(y==b[i]) yg='b';
}
for(int i=0; i<1; i++){
if(x==c[i]) xg='c';
if(y==c[i]) yg='c';
}
if(xg==yg) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:17:18: error: unable to find numeric literal operator 'operator""size'
17 | for(int i=0; i<4.size(); i++){
| ^~~~~~
|
s542781798 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9, 11};
int c[] = {2};
int x, y;
cin >> x >> y;
char xg, yg;
for(int i=0; i<a.size(); i++){
if(x==a[i]) xg='a';
if(y==a[i]) yg='a';
}
for(int i=0; i<b.size(); i++){
if(x==b[i]) xg='b';
if(y==b[i]) yg='b';
}
for(int i=0; i<c.size(); i++){
if(x==c[i]) xg='c';
if(y==c[i]) yg='c';
}
if(xg==yg) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:20: error: request for member 'size' in 'a', which is of non-class type 'int [7]'
13 | for(int i=0; i<a.size(); i++){
| ^~~~
a.cc:17:20: error: request for member 'size' in 'b', which is of non-class type 'int [4]'
17 | for(int i=0; i<b.size(); i++){
| ^~~~
a.cc:21:20: error: request for member 'size' in 'c', which is of non-class type 'int [1]'
21 | for(int i=0; i<c.size(); i++){
| ^~~~
|
s458430713 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int a[] = {1, 3, 5, 7, 8, 10, 12};
int b[] = {4, 6, 9. 11};
int c[] = {2};
int x, y;
cin >> x >> y;
char xg, yg;
for(int i=0; i<a.size(); i++){
if(x==a[i]) xg='a';
if(y==a[i]) yg='a';
}
for(int i=0; i<b.size(); i++){
if(x==b[i]) xg='b';
if(y==b[i]) yg='b';
}
for(int i=0; i<c.size(); i++){
if(x==c[i]) xg='c';
if(y==c[i]) yg='c';
}
if(xg==yg) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:23: error: expected '}' before numeric constant
8 | int b[] = {4, 6, 9. 11};
| ~ ^~
a.cc:8:20: error: narrowing conversion of '9.0e+0' from 'double' to 'int' [-Wnarrowing]
8 | int b[] = {4, 6, 9. 11};
| ^~
a.cc: At global scope:
a.cc:11:3: error: 'cin' does not name a type
11 | cin >> x >> y;
| ^~~
a.cc:13:3: error: expected unqualified-id before 'for'
13 | for(int i=0; i<a.size(); i++){
| ^~~
a.cc:13:16: error: 'i' does not name a type
13 | for(int i=0; i<a.size(); i++){
| ^
a.cc:13:28: error: 'i' does not name a type
13 | for(int i=0; i<a.size(); i++){
| ^
a.cc:17:3: error: expected unqualified-id before 'for'
17 | for(int i=0; i<b.size(); i++){
| ^~~
a.cc:17:16: error: 'i' does not name a type
17 | for(int i=0; i<b.size(); i++){
| ^
a.cc:17:28: error: 'i' does not name a type
17 | for(int i=0; i<b.size(); i++){
| ^
a.cc:21:3: error: expected unqualified-id before 'for'
21 | for(int i=0; i<c.size(); i++){
| ^~~
a.cc:21:16: error: 'i' does not name a type
21 | for(int i=0; i<c.size(); i++){
| ^
a.cc:21:28: error: 'i' does not name a type
21 | for(int i=0; i<c.size(); i++){
| ^
a.cc:25:3: error: expected unqualified-id before 'if'
25 | if(xg==yg) cout << "Yes" << endl;
| ^~
a.cc:26:3: error: expected unqualified-id before 'else'
26 | else cout << "No" << endl;
| ^~~~
a.cc:27:3: error: expected unqualified-id before 'return'
27 | return 0;
| ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
28 | }
| ^
|
s964382135 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
int b,c;
cin>>b>>c;
if(a[b-1]==c[c-1]) {
cout<<"Yes"<<endl;
}
else {
cout<<"No"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: invalid types 'int[int]' for array subscript
7 | if(a[b-1]==c[c-1]) {
| ^
|
s899264606 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int table[] = {0,1,3,1,2,1,2,1,1,2,1,2,1};
int a,b;
cin >> a >> b;
if (table.at(a) == table.at(b)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:13: error: request for member 'at' in 'table', which is of non-class type 'int [13]'
7 | if (table.at(a) == table.at(b)) {
| ^~
a.cc:7:28: error: request for member 'at' in 'table', which is of non-class type 'int [13]'
7 | if (table.at(a) == table.at(b)) {
| ^~
|
s682912553 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
int S = {1, 3, 5, 7, 8, 10, 12}
int T = {4, 6, 9, 11}
if (A == S && B == S) {
cout << "Yes" << endl;
} else if (A == T && B == T) {
cout << "Yes" << endl;
} else if (A == S && B == T) {
cout << "No" << endl;
} else if (A == T && B == S) {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:7: error: scalar object 'S' requires one element in initializer
8 | int S = {1, 3, 5, 7, 8, 10, 12}
| ^
a.cc:9:3: error: expected ',' or ';' before 'int'
9 | int T = {4, 6, 9, 11}
| ^~~
a.cc:13:19: error: 'T' was not declared in this scope
13 | } else if (A == T && B == T) {
| ^
|
s731932387 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
vector<int> group={0,1,3,1,2,1,2,1,1,2,1,2,1};
if(group.at(x)==group.at(y){
cout << "Yes" << endl;
}else{
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:8:32: error: expected ')' before '{' token
8 | if(group.at(x)==group.at(y){
| ~ ^
| )
a.cc:13:1: error: expected primary-expression before '}' token
13 | }
| ^
|
s515542648 | p03711 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
vector<int> a(12);
a = {1,3,1,2,1,2,1,1,2,1,2,1}
int x, y;
cin >> x >> y;
if(a[x-1] == a[y-1]) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:32: error: expected ';' before 'int'
9 | a = {1,3,1,2,1,2,1,1,2,1,2,1}
| ^
| ;
10 | int x, y;
| ~~~
a.cc:11:10: error: 'x' was not declared in this scope
11 | cin >> x >> y;
| ^
a.cc:11:15: error: 'y' was not declared in this scope
11 | cin >> x >> y;
| ^
|
s549890276 | p03711 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int x, y;
cin >> x >> y;
if (x == 2 || y == 2) cout << "No" << endl;
else if (abs(a-b) == 2) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:16: error: 'a' was not declared in this scope
11 | else if (abs(a-b) == 2) cout << "Yes" << endl;
| ^
a.cc:11:18: error: 'b' was not declared in this scope
11 | else if (abs(a-b) == 2) cout << "Yes" << endl;
| ^
|
s270793260 | p03711 | C++ | #include<stdio.h>
#include<math.h>
#include<string.h>
void main()
{
int i,x,y;
int a[1],b[7],c[4];
a[1]='2';
b[7]={1,3,5,7,8,10,12};
c[4]={4,6,9,11};
scanf("%d %d",&x,&y);
for(i=0;i<4;i++)
{
if(x==c[i])
{
for(i=0;i<4;i++)
{
if(y==c[i])
printf("yes"); exit(0);
}
}
}
for(i=0;i<7;i++)
{
if(x==b[i])
{
for(i=0;i<7;i++)
{
if(y==b[i])
printf("yes"); exit(0);
}
}
}
printf("no");
}
| a.cc:4:1: error: '::main' must return 'int'
4 | void main()
| ^~~~
a.cc: In function 'int main()':
a.cc:9:22: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
9 | b[7]={1,3,5,7,8,10,12};
| ^
a.cc:10:15: error: cannot convert '<brace-enclosed initializer list>' to 'int' in assignment
10 | c[4]={4,6,9,11};
| ^
|
s709031800 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int x,y;
cin >>x>>y;
int a[7]={1,3,5,7,8,10,12};
int b[4]={4,6,9,11};
int q=0;
int w=0;
rep(i,7){
if(x==a[i]) q=1;
if(y==a[i]) q=1
}
if(x==2) q=2;
if(y==2) w=2;
if(q==w) cout << "Yes" << endl;
else cout <<"No" <<endl;
}
| a.cc: In function 'int main()':
a.cc:23:24: error: expected ';' before '}' token
23 | if(y==a[i]) q=1
| ^
| ;
24 | }
| ~
|
s929651679 | 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,10,12};
vector<int> B={4,6,9,11};
if(x==2 || y==2){
cout << "No" <<endl;
return 0;
}
if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
cout << "Yes" << endl;
}
else if(count(B.begin(), B.end(), x)==find(B.begin(), B.end(), y)){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:16:34: error: no match for 'operator==' (operand types are 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'} and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | __gnu_cxx::__normal_iterator<int*, std::vector<int> >
| std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type {aka long 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:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::__cxx11::sub_match<_BiIter>'
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::pair<_T1, _T2>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:16:62: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/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:16:62: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/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:16:62: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__iterator_traits<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, void>::difference_type' {aka 'long int'}
16 | if(count(A.begin(), A.end(), x)==find(A.begin(), A.end(), y)){
| ^
/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 ar |
s436268344 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main () {
array<int, 12> 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";
cout << "No";
} | a.cc: In function 'int main()':
a.cc:7:21: error: 'b' was not declared in this scope
7 | if (a[x + 1] == b[y + 1]) cout << "Yes";
| ^
|
s214775497 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
int ans = 0;
vector<int>vec = {1,3,5,7,8,10,12};
vector<int>usi = {4,6,9,11};
if(x == 2 || y == 2)cout << "No" << endl;
else if(x == y) cout << "Yes" <<endl;
for(int i = 0; i < 7; i++){
for(int j = 0; j < 7; j++){
if(x == vec[i] && y == vec[j]){
ans++;
}
}
}
for(int i = 0; i < 4; i++){
for(int j = 0; j < 4; j++){
if(x == usi[i] && y == usi[j]){
ans++;
}
}
}
else if(ans >= 1){
cout << "Yes" <<endl;
}
else{
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:26:4: error: 'else' without a previous 'if'
26 | else if(ans >= 1){
| ^~~~
|
s246978606 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
int s[12]={1,2,1,3,1,3,1,1,3,1,3,1}
if(s[a-1]==s[b-1]){
cout << "Yes";
}else{
cout << "No";
}
}
| a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'if'
7 | if(s[a-1]==s[b-1]){
| ^~
a.cc:9:4: error: 'else' without a previous 'if'
9 | }else{
| ^~~~
|
s381462207 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
int s[12]={1,2,1,3,1,3,,1,1,3,1,3,1}
if(s[a-1]==s.[b-1]){
cout << "Yes";
}else{
cout << "No";
}
} | a.cc: In function 'int main()':
a.cc:6:26: error: expected primary-expression before ',' token
6 | int s[12]={1,2,1,3,1,3,,1,1,3,1,3,1}
| ^
a.cc:9:4: error: 'else' without a previous 'if'
9 | }else{
| ^~~~
|
s779184178 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin>>x>>y;
if(x==2&&y==2)
cout<<"Yes"<<ebdl;
else if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11)
cout<<"Yes"<<endl;
}
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)
cout<<"No"<<endl;
}
else
cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:18: error: 'ebdl' was not declared in this scope
8 | cout<<"Yes"<<ebdl;
| ^~~~
|
s246637676 | p03711 | C | #include<stdio.h>
int main(void){
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
scanf("%d %d",&x,&y);
char ans[5]=(a[x]==a[y] ? "Yes" : "No");
printf("%s",ans);
return 0;
} | main.c: In function 'main':
main.c:6:15: error: invalid initializer
6 | char ans[5]=(a[x]==a[y] ? "Yes" : "No");
| ^
|
s803334326 | 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 ;
}
#include<stdio.h>
int main(void){
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
scanf("%d %d",&x,&y);
char ans[5]=(a[x]==a[y] ? "Yes" : "No");
printf("%s",ans);
return 0;
} | main.c: In function 'main':
main.c:4:13: error: 'cin' undeclared (first use in this function)
4 | int x , y ; cin >> x >> y ;
| ^~~
main.c:4:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:1: error: 'cout' undeclared (first use in this function)
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
main.c:5:53: error: 'endl' undeclared (first use in this function)
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
main.c: At top level:
main.c:9:5: error: redefinition of 'main'
9 | int main(void){
| ^~~~
main.c:1:5: note: previous definition of 'main' with type 'int()'
1 | int main () {
| ^~~~
main.c: In function 'main':
main.c:13:15: error: invalid initializer
13 | char ans[5]=(a[x]==a[y] ? "Yes" : "No");
| ^
|
s004078718 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int x, y; cin >> x >> y;
vector<int> s = {4, 6, 9, 11}; bool j1 = false;
for(int i = 0; i < 4; i++) {
if(s[i] == x) z++;
if(s[i] == y) z++;
} if(z % 2 == 0) j1 = true;
cout << (((x != 2 && y != 2) && j1) ? "Yes" : "No") << endl;
}
| a.cc: In function 'int main()':
a.cc:7:19: error: 'z' was not declared in this scope
7 | if(s[i] == x) z++;
| ^
a.cc:8:19: error: 'z' was not declared in this scope
8 | if(s[i] == y) z++;
| ^
a.cc:9:8: error: 'z' was not declared in this scope
9 | } if(z % 2 == 0) j1 = true;
| ^
|
s396916188 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
string x, y; cin >> x >> y;
vector<int> s = {4, 6, 9, 11}; bool j1 = false;
for(int i = 0; i < 4; i++) {
if(s[i] == x) z++;
if(s[i] == y) z++;
} if(z % 2 == 0) j1 = true;
cout << (((x != 2 && y != 2) && j1) ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
7 | if(s[i] == x) z++;
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::__cxx11::match_results<_BiIter, _Alloc>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::pair<_T1, _T2>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
486 | operator==(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::reverse_iterator<_Iterator>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1667 | operator==(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1737 | operator==(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::move_iterator<_IteratorL>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::fpos<_StateT>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: mismatched types 'const std::allocator<_CharT>' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
7 | if(s[i] == x) z++;
| ^
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<_Cha |
s991393614 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
10 | if(vec.at(x-1) == vec.at(y-1)) {
| ^~
a.cc:14:3: error: 'else' without a previous 'if'
14 | else {
| ^~~~
|
s901559786 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
if (vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
10 | if (vec.at(x-1) == vec.at(y-1)) {
| ^~
a.cc:14:3: error: 'else' without a previous 'if'
14 | else {
| ^~~~
|
s479754105 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
10 | if(vec.at(x-1) == vec.at(y-1)) {
| ^~
a.cc:14:3: error: 'else' without a previous 'if'
14 | else {
| ^~~~
|
s512272194 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
long long x,y;
cin >> x >> y;
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'long'
8 | long long x,y;
| ^~~~
a.cc:9:10: error: 'x' was not declared in this scope
9 | cin >> x >> y;
| ^
a.cc:9:15: error: 'y' was not declared in this scope; did you mean 'yn'?
9 | cin >> x >> y;
| ^
| yn
|
s833601032 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
int A,B;
cin >> A >> B;
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
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;
| ^
a.cc:11:13: error: 'x' was not declared in this scope
11 | if(vec.at(x-1) == vec.at(y-1)) {
| ^
a.cc:11:28: error: 'y' was not declared in this scope; did you mean 'yn'?
11 | if(vec.at(x-1) == vec.at(y-1)) {
| ^
| yn
|
s721216714 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
int x,y;
cin >> x >> y;
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
8 | int x,y;
| ^~~
a.cc:9:10: error: 'x' was not declared in this scope
9 | cin >> x >> y;
| ^
a.cc:9:15: error: 'y' was not declared in this scope; did you mean 'yn'?
9 | cin >> x >> y;
| ^
| yn
|
s908306590 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> vec = {1,3,1,2,1,2,1,1,2,1,2,1}
int x,y;
cin >> x >> y;
if(vec.at(x-1) == vec.at(y-1)) {
cout << "Yes" <<endl;
}
else {
cout << "No" <<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
8 | int x,y;
| ^~~
a.cc:9:10: error: 'x' was not declared in this scope
9 | cin >> x >> y;
| ^
a.cc:9:15: error: 'y' was not declared in this scope; did you mean 'yn'?
9 | cin >> x >> y;
| ^
| yn
|
s373249024 | p03711 | C++ | x, y = gets.chomp.split.map(&:to_i)
g1 = [1, 3, 5, 7, 8 ,10, 12]
g2 = [4, 6, 9, 11]
if (g1.include?(x) && g1.include?(y)) || (g2.include?(x) && g2.include?(y))
puts 'Yes'
else
puts 'No'
end | a.cc:6:8: warning: multi-character character constant [-Wmultichar]
6 | puts 'Yes'
| ^~~~~
a.cc:8:8: warning: multi-character character constant [-Wmultichar]
8 | puts 'No'
| ^~~~
a.cc:1:1: error: 'x' does not name a type
1 | x, y = gets.chomp.split.map(&:to_i)
| ^
|
s982538122 | p03711 | C | #include <stdio.h>
int main (void)
{
int a[12],x=0,y=0;
a[12]={"0,2,0,1,0,1,0,0,1,0,1,0"};
scanf("%d%d",&x,&y);
if(a[x]=a[y])
printf("Yes\n");
else
printf("No\n");
return 0 ;
}
| main.c: In function 'main':
main.c:5:11: error: expected expression before '{' token
5 | a[12]={"0,2,0,1,0,1,0,0,1,0,1,0"};
| ^
|
s651913140 | p03711 | C | #include <stdio.h>
int main (void)
{
int a[12],x=0,y=0;
a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
scanf("%d%d",&x,&y);
if(a[x]=a[y])
printf("Yes\n");
else
printf("No\n");
return 0 ;
}
| main.c: In function 'main':
main.c:5:11: error: expected expression before '{' token
5 | a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
| ^
|
s847914195 | p03711 | C | #include <stdio.h>
int main (void)
{
int a[12]={0,2,0,1,0,1,0,0,1,0,1,0},x=0,y=0;
scanf"%d%d",&x,&y);
if(a[x]=a[y])
printf("Yes\n");
else
printf("No\n");
return 0 ;
}
| main.c: In function 'main':
main.c:5:10: error: expected ';' before string constant
5 | scanf"%d%d",&x,&y);
| ^~~~~~
| ;
main.c:5:22: error: expected statement before ')' token
5 | scanf"%d%d",&x,&y);
| ^
|
s035168038 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
int a[12]={1,3,1,2,1,2,1,1,2,1,2,1}
if(a[x-1]==a[y-1]){
cout<<"Yes"<<endl;
}
else{
COUT<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'if'
7 | if(a[x-1]==a[y-1]){
| ^~
a.cc:10:3: error: 'else' without a previous 'if'
10 | else{
| ^~~~
a.cc:12:3: error: 'COUT' was not declared in this scope
12 | COUT<<"No"<<endl;
| ^~~~
|
s531892403 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int> a;
a={1,3,5,7,8,10,12};
vector<int> b;
b={4,6,9,11};
vector<int> c;
c={2};
for(int i=0;i<7;i++){
if(x==a.at(i)&&y==a.at(i)){
cout<<"Yes"<<endl;
break;
}
}
for(int j=0;j<4;j++){
if(x==b.at(j)&&y==b.at(j)){
cout<<"Yes"<<endl;
break;
}
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:26:2: error: 'else' without a previous 'if'
26 | else{
| ^~~~
|
s825629889 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string x,y;
cin>>x>>y;
vector<char> a;
a={1,3,5,7,8,10,12};
vector<char> b;
b={4,6,9,11};
vector<char> c;
c={2};
for(int i=0;i<7;i++){
if(x==a.at(i)&&y==a.at(i)){
cout<<"Yes"<<endl;
}
}
for(int j=0;j<4;j++){
if(x==b.at(j)&&y==b.at(j)){
cout<<"Yes"<<endl;
}
}
cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:14:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
14 | if(x==a.at(i)&&y==a.at(i)){
| ~^~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1103 | operator==(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1103:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1199:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1199 | operator==(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1199:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1274:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator==(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1274 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1274:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1366:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1366 | operator==(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1366:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1441:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1441 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1441:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1534:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1534 | operator==(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1534:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:1613:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator==(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1613 | operator==(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1613:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/usr/include/c++/14/bits/regex.h:2186:5: note: candidate: 'template<class _Bi_iter, class _Alloc> bool std::__cxx11::operator==(const match_results<_BiIter, _Alloc>&, const match_results<_BiIter, _Alloc>&)'
2186 | operator==(const match_results<_Bi_iter, _Alloc>& __m1,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:2186:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::__cxx11::match_results<_BiIter, _Alloc>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
441 | operator==(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/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:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/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:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
/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:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
In file included from /usr/include/c++/14/string:43:
/usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)'
235 | operator==(const allocator<_T1>&, const allocator<_T2>&)
| ^~~~~~~~
/usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed:
a.cc:14:15: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::allocator<_CharT>'
14 | if(x==a.at(i)&&y==a.at(i)){
| ^
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, clas |
s084329570 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int x,y;
cin >>x>>y;
if (x == 2 || y == 2) cout << "No" <<endl;
else if (y <= 7 || x >= 8) {
if (x + y % 2 == 0) cout << "Yes" << endl;
else cout << "No" << endl;
else {
if (x + y % 2 == 0) cout << "No" << endl;
else cout << "Yes" << endl;
} | a.cc: In function 'int main()':
a.cc:12:3: error: expected '}' before 'else'
12 | else {
| ^~~~
a.cc:9:30: note: to match this '{'
9 | else if (y <= 7 || x >= 8) {
| ^
a.cc:15:2: error: expected '}' at end of input
15 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main() {
| ^
|
s538667905 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >>H>>W;
vector<string> vec(i)
for (int i = 0;i < H;i++) {
cin >> vec(i)
}
for (int i = 0;i < W+1;i++) cout <<"#";
cout<<endl;
for (int i = 0;i < H;i++) cout <<"#"<<vec(i)<<"#"<<endl;
for(int i = 0;i < H;i++) {
cin >> vec(i)
}
}
| a.cc: In function 'int main()':
a.cc:7:22: error: 'i' was not declared in this scope
7 | vector<string> vec(i)
| ^
a.cc:8:3: error: expected ',' or ';' before 'for'
8 | for (int i = 0;i < H;i++) {
| ^~~
a.cc:13:44: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
13 | for (int i = 0;i < H;i++) cout <<"#"<<vec(i)<<"#"<<endl;
| ~~~^~~
a.cc:15:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
15 | cin >> vec(i)
| ~~~^~~
|
s210293113 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y,a[13]={0,1,3,1,2,1,2,1,1,2,1,2,1}
cin >> x >> y;
if(a[x]==a[y])cout<<"Yes";
else cout << "No";
}
| a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'cin'
5 | cin >> x >> y;
| ^~~
|
s466153256 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,a[13]={0,1,3,1,2,1,2,1,1,2,1,2,1}
cin >> x >> y;
if(a[x]==a[y])cout<<"Yes";
else cout << "No";
} | a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'cin'
5 | cin >> x >> y;
| ^~~
a.cc:6:14: error: 'y' was not declared in this scope
6 | if(a[x]==a[y])cout<<"Yes";
| ^
|
s100076333 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define fin(ans) cout << (ans) << endl;
#define blank(ans) cout << (ans) << " ";
#define mp(p, q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
typedef long long ll;
typedef long long lli;
typedef unsigned long long ull;
typedef long double ld;
typedef string str;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<ld> vd;
typedef vector<str> vs;
typedef vector<ll> vll;
typedef vector<pair<ll, ll>> vpll;
typedef vector<pair<ll, str>> vpls;
typedef vector<tuple<str, ll, ll>> vtsl;
typedef vector<vector<ll>> vvll;
typedef vector<vector<char>> vvc;
typedef vector<vector<str>> vvs;
const ld PI = acos(-1.0);
const ll MAX = 9000000000000000000;
const ll MIN = -9000000000000000000;
const ld DMAX = 4500;
const ld DMIN = -4500;
const ll MOD = 1000000007;
//実行部
void Main()
{
ll a, b; cin >> a >> b;
ll ans[13] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}
if(ans[a] == ans[b]) fin("Yes")
else fin("No")
}
//前処理
int main()
{
//ios::sync_with_stdio(false);
//cin.tie(0);
cout << fixed << setprecision(20); //高精度少数表示
Main();
return 0;
}
| a.cc: In function 'void Main()':
a.cc:42:3: error: expected ',' or ';' before 'if'
42 | if(ans[a] == ans[b]) fin("Yes")
| ^~
a.cc:43:3: error: 'else' without a previous 'if'
43 | else fin("No")
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.