submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s480972788 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main() {
int H,W;
cin >> H,W >> endl;
H += 2
for (int i = 0;i < H;i++) {
cout << "#" << endl;
}
cout << "#";
vector <string> A(N);
for (int i =0;i < N;i++) {
cin >> A.at(i) >> endl;
cout << A.at(i);
}
cout << "#" << endl;
cout << "#";
vector <string> B(N);
for (int i =0;i < N;i++) {
cin >> B.at(i) >> endl;
cout << B.at(i);
}
cout << "#" << endl;
for (int i = 0;i < H;i++) {
cout << "#" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>'
6 | cin >> H,W >> endl;
| ~~^~~~~~~
a.cc:7:9: error: expected ';' before 'for'
7 | H += 2
| ^
| ;
8 |
9 | for (int i = 0;i < H;i++) {
| ~~~
a.cc:9:18: error: 'i' was not declared in this scope
9 | for (int i = 0;i < H;i++) {
| ^
a.cc:13:21: error: 'N' was not declared in this scope
13 | vector <string> A(N);
| ^
a.cc:15:20: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>' and '<unresolved overloaded function type>')
15 | cin >> A.at(i) >> endl;
| ~~~~~~~~~~~~~~~^~~~~~~
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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' 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 '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
13 |
s004473348 | p03711 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <stack>
#include <istream>
#include <map>
#include <set>
#include <queue>
#define rep0(i,n) for (int i = 0; i < (n); ++i) //0スタート
#define rep1(i,n) for (int i = 1; i < (n); ++i) //1スタート
#define REP(i,a,b) for (int i = a; i < (b); ++i) //aからbまで
#define print(x) cout<<x<<endl //xを改行付きで出力
#define scan(x) cin>>x //xを入力
const int INF = 1e9 + 7; //最大値兼MOD
typedef long long ll;
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; }
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
/*
./a.exe
*/
vector<int>a(13) = {0,1,3,1,2,1,2,1,1,2,1,2,1};
int c,b;
cin>>c>>b;
if(a[c] == a[b])cout<<"Yes"<<endl;
else P("No");
return 0;
}
| a.cc: In function 'int main()':
a.cc:29:18: error: expected ',' or ';' before '=' token
29 | vector<int>a(13) = {0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:33:6: error: 'P' was not declared in this scope
33 | else P("No");
| ^
|
s281097923 | 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++)
typedef long long ll;
int main() {
int x, y;
cin >> x >> y;
vector<int> A(7);
vector<int> B(4)
A = {1, 3, 5, 7, 8, 10, 12};
B = {4, 6, 9, 11};
bool flagX = false;
bool flagY = false;
for (int i = 0; i < 7; i++){
if (A[i] == x){
flagX = true;
}
else if (A[i] == y){
flagY = true;
}
}
if (flagX && flagY){
cout << "Yes" << endl;
}
else{
flagX = false;
flagY = false;
for (int i = 0; i < 4; i++){
if (B[i] == x){
flagX = true;
}
else if (B[i] == y){
flagY = true;
}
}
if (flagX && flagY) {
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'A'
12 | A = {1, 3, 5, 7, 8, 10, 12};
| ^
|
s149318244 | 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++)
typedef long long ll;
int main() {
int x, y;
cin >> x >> y;
vector<int> A, B, C;
A = {1, 3, 5, 7, 8, 10, 12};
B = {4, 6, 9, 11};
bool flagX = false;
bool flagY = false;
for (int i = 0; i < 7; i++){
if (A[i] == x){
flagX = true;
}
else if (A[i] == y){
flagY == true;
}
}
if (flagX && flagY){
cout << "Yes" << endl;
}
else{
flagX = false;
flagY = false;
for (int i = 0; i < 4; i++){
if (B[i] == x){
flagX = true;
}
else if (B[i] == y){
flagY = true;
}
}
if (flagX && flagY) {
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
}
}
| a.cc:1:1: error: 'include' does not name a type
1 | include <bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >> x >> y;
| ^~~
a.cc:10:5: error: 'vector' was not declared in this scope
10 | vector<int> A, B, C;
| ^~~~~~
a.cc:10:12: error: expected primary-expression before 'int'
10 | vector<int> A, B, C;
| ^~~
a.cc:11:5: error: 'A' was not declared in this scope
11 | A = {1, 3, 5, 7, 8, 10, 12};
| ^
a.cc:12:5: error: 'B' was not declared in this scope
12 | B = {4, 6, 9, 11};
| ^
a.cc:24:9: error: 'cout' was not declared in this scope
24 | cout << "Yes" << endl;
| ^~~~
a.cc:24:26: error: 'endl' was not declared in this scope
24 | cout << "Yes" << endl;
| ^~~~
a.cc:38:13: error: 'cout' was not declared in this scope
38 | cout << "Yes" << endl;
| ^~~~
a.cc:38:30: error: 'endl' was not declared in this scope
38 | cout << "Yes" << endl;
| ^~~~
a.cc:41:13: error: 'cout' was not declared in this scope
41 | cout << "No" << endl;
| ^~~~
a.cc:41:29: error: 'endl' was not declared in this scope
41 | cout << "No" << endl;
| ^~~~
|
s580850104 | p03711 | C++ | #include<stdio.h>
int main(void)
{
int x,y;
scanf("%d %d",&x,&y);
if(x==2||y==2) {
printf("No\n");
}
if(x==4||x==6||x==9||x==11) {
if(y==4||y==6||y==9||y==11) {
printf("Yes\n");
}
slse {
printf("No\n");
}
}
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) {
printf("Yes\n");
}
slse {
printf("No\n");
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:13:17: error: 'slse' was not declared in this scope
13 | slse {
| ^~~~
a.cc:21:17: error: 'slse' was not declared in this scope
21 | slse {
| ^~~~
|
s699916855 | p03711 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#include<iomanip>
#include<stack>
#include<map>
#include<queue>
#include<set>
#define int long long
using namespace std;
const int INF = 1e10;
const int ZERO = 0;
signed main() {
int x,y;
cin >> x >> y;
vector<int> vec(12) = {0,1,0,2,0,2,0,0,2,0,2,0};
if(vec.at(x - 1) == vec.at(y - 1)) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:21:29: error: expected ',' or ';' before '=' token
21 | vector<int> vec(12) = {0,1,0,2,0,2,0,0,2,0,2,0};
| ^
|
s354872023 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pop pop_back
#define V vector
#define P pair
template<class T>
void cou(vector<vector<T>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}
//template<>
void cou(vector<vector<char>> a){
int b=a.size();
int c=a[0].size();
fo(i,b){
fo(j,c){
cout<<a[i][j];
if(j==c-1)
cout<<endl;
else
cout<<' ';
}
}
}
int wari(int a,int b) {
if(a%b==0)
return a/b;
else
return a/b+1;
}
int keta(int a){
double b=a;
b=log10(b);
int c=b;
return c+1;
}
int souwa(int a){
return a*(a+1)/2;
}
int lcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return d*e/f;
}
int gcm(int a,int b){
int d=a,e=b,f;
if(a<b)
swap(a,b);
int c,m=1;
while(m){
c=a%b;
if(c==0){
f=b;
m--;
}
else{
a=b;
b=c;
}
}
return f;
}
bool prime(int a){
if(a<2)
return false;
else if(a==2)
return true;
else if(a%2==0)
return false;
double b=sqrt(a);
for(int i=3;i<=b;i+=2){
if(a%i==0){
return false;
}
}
return true;
}
struct Union{
vector<int> par;
Union(int n){
par= vector<int>(n, -1);
}
int find(int x){
if(par[x]<0)
return x;
else
return par[x]=find(par[x]);
}
bool same(int a,int b){
return find(a)==find(b);
}
int Size(int a){
return -par[find(a)];
}
void unite(int a,int b){
a=find(a);
b=find(b);
if(a==b)
return;
if(Size(b)>Size(a))
swap<int>(a,b);
par[a]+=par[b];
par[b]=a;
}
};
int ketas(int a){
string b=to_string(a);
int c=0;
fo(i,keta(a)){
c+=b[i]-'0';
}
return c;
}
signed main(){
int a,b;
cin>>a>>b;
if(a==2){
if(b==2)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
else if(a==4||a==6||a==9||a==11){
if(b==4||b==6||b==9||b==11)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
else {
if(b!=2&&b!=4&&b!=6&&b!=9|&&b!=11)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:163:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
163 | if(b!=2&&b!=4&&b!=6&&b!=9|&&b!=11)
| ~~~^~~~
a.cc:163:33: error: label 'b' used but not defined
163 | if(b!=2&&b!=4&&b!=6&&b!=9|&&b!=11)
| ^
|
s929945379 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int x,gx,gy;
int main(){
if(x==2){
gx=1;
}else if((x==4)||(x==6)||(x==9)||(x==11)){
gx=2;
}else{
gx=3;
}
if(y==2){
gy=1;
}else if((y==4)||(y==6)||(y==9)||(y==11)){
gy=2;
}else{
gy=3;
}
if(gx==gy){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:15:9: error: 'y' was not declared in this scope; did you mean 'yn'?
15 | if(y==2){
| ^
| yn
|
s195690597 | p03711 | C++ | #include<iostream>
#include<string>
#include<utility>
#include<cmath>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(void) {
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;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:23: error: narrowing conversion of '1.3e+0' from 'double' to 'int' [-Wnarrowing]
15 | int a[] = { 0,1.3,1.2,1,2,1,1,2,1,2,1 };
| ^~~
a.cc:15:27: error: narrowing conversion of '1.2e+0' from 'double' to 'int' [-Wnarrowing]
15 | int a[] = { 0,1.3,1.2,1,2,1,1,2,1,2,1 };
| ^~~
|
s737885428 | p03711 | C++ | #include<iostream>
#include<string>
#include<utility>
#include<cmath>
#include<map>
#include<queue>
#include<stack>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(int i=0;i<(int)n;i++)
int main(void) {
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;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:23: error: narrowing conversion of '1.3e+0' from 'double' to 'int' [-Wnarrowing]
15 | int a[] = { 0,1.3,1.2,1,2,1,1,2,1,2,1 };
| ^~~
a.cc:15:27: error: narrowing conversion of '1.2e+0' from 'double' to 'int' [-Wnarrowing]
15 | int a[] = { 0,1.3,1.2,1,2,1,1,2,1,2,1 };
| ^~~
|
s937082414 | p03711 | C++ | #include<stdio.h>
int main(void)
{
int x,y;
scanf("%d",&x);
scanf("%d",&y);
if(x==1||x==3||x==5||x==7||x==8||x==10||x==12){
if(x==y||y==3||y==5||y==7||y==8||y==10||y==12){
printf("yes\n");
}
}
if(x==4||x==6||x==9||x==11||){
if(y==4||y==6||y==9||y==11||){
printf("Yes\n");
}
}
if(x==2){
if(y==2){
printf("Yes\n");
}
}
else{
printf("No\n");
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:37: error: expected primary-expression before ')' token
12 | if(x==4||x==6||x==9||x==11||){
| ^
a.cc:13:45: error: expected primary-expression before ')' token
13 | if(y==4||y==6||y==9||y==11||){
| ^
|
s081131453 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> a() = {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:4:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^~
a.cc:4:16: note: remove parentheses to default-initialize a variable
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^~
| --
a.cc:4:17: warning: declaration of 'std::vector<int> a()' has 'extern' and is initialized
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:22: error: invalid pure specifier (only '= 0' is allowed) before numeric constant
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:15: error: function 'std::vector<int> a()' is initialized like a variable
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:45: error: expected ',' or ';' before '}' token
4 | vector<int> a() = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc: At global scope:
a.cc:6:3: error: 'cin' does not name a type
6 | cin >> x >> y;
| ^~~
a.cc:7:3: error: expected unqualified-id before 'if'
7 | if(a.at(x) == a.at(y)) {
| ^~
a.cc:9:4: error: expected unqualified-id before 'else'
9 | }else {
| ^~~~
a.cc:12:1: error: expected declaration before '}' token
12 | }
| ^
|
s191458006 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y,gx, gy
cin >> x >> y ;
if (x==2){
gx = 1
}else if{((x==4)|| (x=6) || (x==9) || (x==11))
gx=2
}else gx=3
if (y==2){
gy = 1
}else if {((y==4)|| (y=6) || (y==9) || (y==11))
gy=2
}else gy=3
if (gx==gy){
cout << "Yes" << endl;
else
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'cin'
5 | cin >> x >> y ;
| ^~~
a.cc:7:15: error: expected ';' before '}' token
7 | gx = 1
| ^
| ;
8 | }else if{((x==4)|| (x=6) || (x==9) || (x==11))
| ~
a.cc:8:9: error: expected '(' before '{' token
8 | }else if{((x==4)|| (x=6) || (x==9) || (x==11))
| ^
| (
a.cc:10:2: error: 'else' without a previous 'if'
10 | }else gx=3
| ^~~~
a.cc:10:11: error: expected ';' before 'if'
10 | }else gx=3
| ^
| ;
11 | if (y==2){
| ~~
a.cc:13:2: error: 'else' without a previous 'if'
13 | }else if {((y==4)|| (y=6) || (y==9) || (y==11))
| ^~~~
a.cc:13:10: error: expected '(' before '{' token
13 | }else if {((y==4)|| (y=6) || (y==9) || (y==11))
| ^
| (
a.cc:15:2: error: 'else' without a previous 'if'
15 | }else gy=3
| ^~~~
a.cc:15:7: error: 'gy' was not declared in this scope; did you mean 'gx'?
15 | }else gy=3
| ^~
| gx
a.cc:20:2: error: expected '}' at end of input
20 | }
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s617358179 | p03711 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int[] array1 = {1,3,5,7,8,10,12};
int[] array2 = {4,6,9,11};
if((array1.contains(x)&&array1.contains(y))||(array2.contains(x)&&array2.contains(y)))
System.out.println("Yes");
else System.out.println("No");
}
} | Main.java:9: error: cannot find symbol
if((array1.contains(x)&&array1.contains(y))||(array2.contains(x)&&array2.contains(y)))
^
symbol: method contains(int)
location: variable array1 of type int[]
Main.java:9: error: cannot find symbol
if((array1.contains(x)&&array1.contains(y))||(array2.contains(x)&&array2.contains(y)))
^
symbol: method contains(int)
location: variable array1 of type int[]
Main.java:9: error: cannot find symbol
if((array1.contains(x)&&array1.contains(y))||(array2.contains(x)&&array2.contains(y)))
^
symbol: method contains(int)
location: variable array2 of type int[]
Main.java:9: error: cannot find symbol
if((array1.contains(x)&&array1.contains(y))||(array2.contains(x)&&array2.contains(y)))
^
symbol: method contains(int)
location: variable array2 of type int[]
4 errors
|
s710944033 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x,y;
cin >> x >> y;
vector<int> v(12)={1,3,1,2,1,2,1,1,2,1,2,1};
if (v[x-1]==v[y-1]){
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:20: error: expected ',' or ';' before '=' token
7 | vector<int> v(12)={1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s245530978 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
vector<int> a;
a={0,1,2,1,3,1,3,1,1,3,1,3,1};
int a,b;
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:7: error: conflicting declaration 'int a'
6 | int a,b;
| ^
a.cc:4:15: note: previous declaration as 'std::vector<int> a'
4 | vector<int> a;
| ^
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;
| ^
|
s823927985 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
vector<int> a(13) {0,1,3,1,2,1,2,1,1,2,1,2,1}
if(a.at(x) ==a.at(y){
cout << "Yes" << endl;
}
else{
cout <<"No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:21: error: expected ',' or ';' before '{' token
8 | vector<int> a(13) {0,1,3,1,2,1,2,1,1,2,1,2,1}
| ^
a.cc:9:23: error: expected ')' before '{' token
9 | if(a.at(x) ==a.at(y){
| ~ ^
| )
a.cc:15:1: error: expected primary-expression before '}' token
15 | }
| ^
|
s863918216 | p03711 | C++ | #[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::{stderr, stdin, stdout, BufWriter, StdoutLock, Write};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[allow(unused_imports)]
use std::{i64, u64, usize};
#[allow(unused_macros)]
macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; let mut next = || { iter . next ( ) . unwrap ( ) } ; input_inner ! { next , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let stdin = std :: io :: stdin ( ) ; let mut bytes = std :: io :: Read :: bytes ( std :: io :: BufReader :: new ( stdin . lock ( ) ) ) ; let mut next = move || -> String { bytes . by_ref ( ) . map ( | r | r . unwrap ( ) as char ) . skip_while ( | c | c . is_whitespace ( ) ) . take_while ( | c |! c . is_whitespace ( ) ) . collect ( ) } ; input_inner ! { next , $ ( $ r ) * } } ; }
#[allow(unused_macros)]
macro_rules ! input_inner { ( $ next : expr ) => { } ; ( $ next : expr , ) => { } ; ( $ next : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ next , $ t ) ; input_inner ! { $ next $ ( $ r ) * } } ; ( $ next : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ next , $ t ) ; input_inner ! { $ next $ ( $ r ) * } } ; }
#[allow(unused_macros)]
macro_rules ! read_value { ( $ next : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ next , $ t ) ) ,* ) } ; ( $ next : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ next , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ next : expr , [ $ t : tt ] ) => { { let len = read_value ! ( $ next , usize ) ; ( 0 .. len ) . map ( | _ | read_value ! ( $ next , $ t ) ) . collect ::< Vec < _ >> ( ) } } ; ( $ next : expr , chars ) => { read_value ! ( $ next , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ next : expr , bytes ) => { read_value ! ( $ next , String ) . into_bytes ( ) } ; ( $ next : expr , usize1 ) => { read_value ! ( $ next , usize ) - 1 } ; ( $ next : expr , $ t : ty ) => { $ next ( ) . parse ::<$ t > ( ) . expect ( "Parse error" ) } ; }
#[allow(dead_code)]
struct Writer {
s: String,
}
#[allow(unused_imports)]
use std::fmt::Display;
#[allow(dead_code)]
#[doc = " let mut writer = Writer::new();"]
#[doc = " writer.writeln(hoge);"]
#[doc = " writer.flush()"]
impl Writer {
#[allow(dead_code)]
pub fn new() -> Writer {
Writer { s: String::new() }
}
#[allow(dead_code)]
pub fn flush(&mut self) {
print!("{}", self.s);
self.s.clear();
}
pub fn write<T: Display>(&mut self, x: T) {
self.s.push_str(&format!("{}", x));
}
pub fn writeln<T: Display>(&mut self, x: T) {
self.s.push_str(&format!("{}", x));
self.s.push('\n');
}
#[allow(dead_code)]
pub fn write_vec<T: Display>(&mut self, xs: &Vec<T>) {
if xs.len() == 0 {
self.writeln("");
return;
}
self.write(&format!("{}", xs[0]));
for i in 1..xs.len() {
self.write(&format!(" {}", xs[i]));
}
self.writeln("");
}
}
#[allow(unused_macros)]
macro_rules ! dbg { ( $ ( $ a : expr ) ,* ) => { writeln ! ( & mut stderr ( ) , concat ! ( $ ( stringify ! ( $ a ) , " = {:?}, " ) ,* ) , $ ( $ a ) ,* ) . unwrap ( ) ; } }
#[allow(dead_code)]
const INF_U: u64 = 1_000_000_000_000_000;
#[allow(dead_code)]
const INF_I: i64 = 1_000_000_000_000_000;
#[allow(non_snake_case)]
#[allow(dead_code)]
fn main() {
input! {
x: u64,
y: u64
}
let a = vec![1, 3, 5, 7, 8, 10, 12];
let b = vec![4, 6, 9, 11];
let mut flag = false;
for aa in a {
if aa == x || aa == y {
if flag {
println!("Yes");
return;
}
flag = true;
}
}
flag = false;
for bb in b {
if bb == x || bb == y {
if flag {
println!("Yes");
return;
}
flag = true;
}
}
println!("No");
} | a.cc:1:2: error: invalid preprocessing directive #[
1 | #[allow(unused_imports)]
| ^
a.cc:3:2: error: invalid preprocessing directive #[
3 | #[allow(unused_imports)]
| ^
a.cc:5:2: error: invalid preprocessing directive #[
5 | #[allow(unused_imports)]
| ^
a.cc:7:2: error: invalid preprocessing directive #[
7 | #[allow(unused_imports)]
| ^
a.cc:9:2: error: invalid preprocessing directive #[
9 | #[allow(unused_imports)]
| ^
a.cc:11:2: error: invalid preprocessing directive #[
11 | #[allow(unused_macros)]
| ^
a.cc:13:2: error: invalid preprocessing directive #[
13 | #[allow(unused_macros)]
| ^
a.cc:15:2: error: invalid preprocessing directive #[
15 | #[allow(unused_macros)]
| ^
a.cc:17:2: error: invalid preprocessing directive #[
17 | #[allow(dead_code)]
| ^
a.cc:21:2: error: invalid preprocessing directive #[
21 | #[allow(unused_imports)]
| ^
a.cc:23:2: error: invalid preprocessing directive #[
23 | #[allow(dead_code)]
| ^
a.cc:24:2: error: invalid preprocessing directive #[
24 | #[doc = " let mut writer = Writer::new();"]
| ^
a.cc:25:2: error: invalid preprocessing directive #[
25 | #[doc = " writer.writeln(hoge);"]
| ^
a.cc:26:2: error: invalid preprocessing directive #[
26 | #[doc = " writer.flush()"]
| ^
a.cc:28:6: error: invalid preprocessing directive #[
28 | #[allow(dead_code)]
| ^
a.cc:32:6: error: invalid preprocessing directive #[
32 | #[allow(dead_code)]
| ^
a.cc:44:6: error: invalid preprocessing directive #[
44 | #[allow(dead_code)]
| ^
a.cc:51:18: error: too many decimal points in number
51 | for i in 1..xs.len() {
| ^~~~~~~~~
a.cc:57:2: error: invalid preprocessing directive #[
57 | #[allow(unused_macros)]
| ^
a.cc:59:2: error: invalid preprocessing directive #[
59 | #[allow(dead_code)]
| ^
a.cc:61:2: error: invalid preprocessing directive #[
61 | #[allow(dead_code)]
| ^
a.cc:63:2: error: invalid preprocessing directive #[
63 | #[allow(non_snake_case)]
| ^
a.cc:64:2: error: invalid preprocessing directive #[
64 | #[allow(dead_code)]
| ^
a.cc:2:1: error: 'use' does not name a type
2 | use std::cmp::{max, min, Ordering};
| ^~~
a.cc:4:1: error: 'use' does not name a type
4 | use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
| ^~~
a.cc:6:1: error: 'use' does not name a type
6 | use std::io::{stderr, stdin, stdout, BufWriter, StdoutLock, Write};
| ^~~
a.cc:8:1: error: 'use' does not name a type
8 | use std::iter::FromIterator;
| ^~~
a.cc:10:1: error: 'use' does not name a type
10 | use std::{i64, u64, usize};
| ^~~
a.cc:12:1: error: 'macro_rules' does not name a type
12 | macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; let mut next = || { iter . next ( ) . unwrap ( ) } ; input_inner ! { next , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let stdin = std :: io :: stdin ( ) ; let mut bytes = std :: io :: Read :: bytes ( std :: io :: BufReader :: new ( stdin . lock ( ) ) ) ; let mut next = move || -> String { bytes . by_ref ( ) . map ( | r | r . unwrap ( ) as char ) . skip_while ( | c | c . is_whitespace ( ) ) . take_while ( | c |! c . is_whitespace ( ) ) . collect ( ) } ; input_inner ! { next , $ ( $ r ) * } } ; }
| ^~~~~~~~~~~
a.cc:14:1: error: 'macro_rules' does not name a type
14 | macro_rules ! input_inner { ( $ next : expr ) => { } ; ( $ next : expr , ) => { } ; ( $ next : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ next , $ t ) ; input_inner ! { $ next $ ( $ r ) * } } ; ( $ next : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ next , $ t ) ; input_inner ! { $ next $ ( $ r ) * } } ; }
| ^~~~~~~~~~~
a.cc:16:1: error: 'macro_rules' does not name a type
16 | macro_rules ! read_value { ( $ next : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ next , $ t ) ) ,* ) } ; ( $ next : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ next , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ next : expr , [ $ t : tt ] ) => { { let len = read_value ! ( $ next , usize ) ; ( 0 .. len ) . map ( | _ | read_value ! ( $ next , $ t ) ) . collect ::< Vec < _ >> ( ) } } ; ( $ next : expr , chars ) => { read_value ! ( $ next , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ next : expr , bytes ) => { read_value ! ( $ next , String ) . into_bytes ( ) } ; ( $ next : expr , usize1 ) => { read_value ! ( $ next , usize ) - 1 } ; ( $ next : expr , $ t : ty ) => { $ next ( ) . parse ::<$ t > ( ) . expect ( "Parse error" ) } ; }
| ^~~~~~~~~~~
a.cc:19:5: error: 's' does not name a type
19 | s: String,
| ^
a.cc:22:5: error: expected initializer before 'std'
22 | use std::fmt::Display;
| ^~~
a.cc:27:1: error: 'impl' does not name a type
27 | impl Writer {
| ^~~~
a.cc:58:1: error: 'macro_rules' does not name a type
58 | macro_rules ! dbg { ( $ ( $ a : expr ) ,* ) => { writeln ! ( & mut stderr ( ) , concat ! ( $ ( stringify ! ( $ a ) , " = {:?}, " ) ,* ) , $ ( $ a ) ,* ) . unwrap ( ) ; } }
| ^~~~~~~~~~~
a.cc:60:12: error: found ':' in nested-name-specifier, expected '::'
60 | const INF_U: u64 = 1_000_000_000_000_000;
| ^
| ::
a.cc:60:7: error: 'INF_U' does not name a type
60 | const INF_U: u64 = 1_000_000_000_000_000;
| ^~~~~
a.cc:62:12: error: found ':' in nested-name-specifier, expected '::'
62 | const INF_I: i64 = 1_000_000_000_000_000;
| ^
| ::
a.cc:62:7: error: 'INF_I' does not name a type
62 | const INF_I: i64 = 1_000_000_000_000_000;
| ^~~~~
a.cc:65:1: error: 'fn' does not name a type
65 | fn main() {
| ^~
|
s754875557 | p03711 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
#include <cassert>
#include <functional>
#include <string>
#include <sstream>
using namespace std;
int main(){
int x, y; cin >> x, y;
map<int, int> m;
m[1] = 1;
m[2] = 3;
m[3] = 1;
m[4] = 2;
m[5] = 1;
m[6] = 2;
m[7] = 1;
m[8] = 1;
m[9] = 2;
m[10] = 1;
m[11] = 2;
m[12] = 1;
if(m[x] == m[y]) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:16:3: error: 'map' was not declared in this scope
16 | map<int, int> m;
| ^~~
a.cc:11:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
10 | #include <sstream>
+++ |+#include <map>
11 | using namespace std;
a.cc:16:7: error: expected primary-expression before 'int'
16 | map<int, int> m;
| ^~~
a.cc:17:3: error: 'm' was not declared in this scope
17 | m[1] = 1;
| ^
|
s325115821 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[] = {1,3,1,2,1,2,1,1,2,1,2,1};
int x,y;
cin >>x>>y;
string ans;
a[x-1]==a[y-1] ? ans="Yes" : ans="No"
cout <<ans<< endl;
}
| a.cc: In function 'int main()':
a.cc:10:40: error: expected ';' before 'cout'
10 | a[x-1]==a[y-1] ? ans="Yes" : ans="No"
| ^
| ;
11 | cout <<ans<< endl;
| ~~~~
|
s748309567 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a[]={0,2,0,1,0,1,0,0,1,0,1,0};
intx,y;
cin>>x>>y;
if(a[x-1]==a[y-1]){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:5: error: 'intx' was not declared in this scope; did you mean 'int'?
6 | intx,y;
| ^~~~
| int
a.cc:6:10: error: 'y' was not declared in this scope
6 | intx,y;
| ^
a.cc:7:10: error: 'x' was not declared in this scope
7 | cin>>x>>y;
| ^
|
s470686409 | 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;1 3
}
| a.cc: In function 'int main()':
a.cc:6:44: error: expected ';' before numeric constant
6 | cout << (a[x]==a[y]?"Yes":"No") << endl;1 3
| ^~
| ;
|
s837806422 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
map<int,int> m;
m[1] = 1;
m[2] = 3;
m[3] = 1;
m[4] = 2;
m[5] = 1;
m[6] = 2;
m[7] = 1;
m[8] = 1;
m[9] = 2;
m[10] = 1;
m[11] = 2;
m[12] = 1;
int x, y;
cin >> x >> y;
if(map.at(x) == map.at(y))
cout << "Yes" << endl;
else
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:20:9: error: expected unqualified-id before '.' token
20 | if(map.at(x) == map.at(y))
| ^
|
s861537594 | p03711 | Java |
import java.util.Scanner;
class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
if (x == y && y == 2){
System.out.println("Yes");
}
if (x == 4 || x == 6 || x == 9 || x == 11){
if (y == 4 || y == 6 || y == 9 || y == 11){
}
System.out.println("Yes");
}
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");
}
}
}
//途中
| Main.java:16: error: illegal character: '\u3000'
if (x ==?4 || x == 6 || x == 9 || x == 11){
^
Main.java:16: error: not a statement
if (x ==?4 || x == 6 || x == 9 || x == 11){
^
Main.java:16: error: ';' expected
if (x ==?4 || x == 6 || x == 9 || x == 11){
^
3 errors
|
s035846483 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int group(int x){
if (x==2)
g=3;
else if (x==4 || x==6 || x==9 || x==11)
g=2;
else
g=1;
return g;
}
int main() {
int x{};
int y{};
cin >> x >> y;
if (group(x)==group(y))
cout << "Yes";
else
cout << "No";
return 0;
}
| a.cc: In function 'int group(int)':
a.cc:6:9: error: 'g' was not declared in this scope
6 | g=3;
| ^
a.cc:8:9: error: 'g' was not declared in this scope
8 | g=2;
| ^
a.cc:10:9: error: 'g' was not declared in this scope
10 | g=1;
| ^
a.cc:11:8: error: 'g' was not declared in this scope
11 | return g;
| ^
|
s072385922 | p03711 | C++ | #include <iostream>
using namespace std;
int group(x)
{
int g;
if (x==2)
g=3;
else if (x==4 || x==6 || x==9 || x==11)
g=2;
else
g=1;
return g;
}
int main()
{
int x{};
int y{};
cin >> x >> y;
if (group(x)==group(y))
cout << "Yes";
else
cout << "No";
return 0;
}
| a.cc:4:11: error: 'x' was not declared in this scope
4 | int group(x)
| ^
a.cc: In function 'int main()':
a.cc:20:14: error: 'group' cannot be used as a function
20 | if (group(x)==group(y))
| ~~~~~^~~
a.cc:20:24: error: 'group' cannot be used as a function
20 | if (group(x)==group(y))
| ~~~~~^~~
|
s270603346 | p03711 | C++ | #include <iostream>
using namespace std;
int group(x)
{
int g;
if (x==2)
g=3;
else if (x==4 || x==6 || x==9 || x==11)
g=2;
else
g=1
return g;
}
int main()
{
int x{};
int y{};
cin >> x >> y;
if (group(x)==group(y))
cout << "Yes";
else
cout << "No";
return 0;
} | a.cc:4:11: error: 'x' was not declared in this scope
4 | int group(x)
| ^
a.cc: In function 'int main()':
a.cc:20:14: error: 'group' cannot be used as a function
20 | if (group(x)==group(y))
| ~~~~~^~~
a.cc:20:24: error: 'group' cannot be used as a function
20 | if (group(x)==group(y))
| ~~~~~^~~
|
s162902658 | p03711 | C | #include<stdio.h>
#include<string.h>
int check(int &x){
if(x==4 || x==6 || x==9 || x==11){
return 2;
}else if(x==2){
return 3;
}else{
return 1;
}
}
int main(void){
int x,y;
int gx,gy;
scanf("%d%d",&x,&y);
gx = check(x);
gy = check(y);
if(gx==gy){
printf("Yes\n");
}else{
printf("No\n");
}
}
| main.c:4:15: error: expected ';', ',' or ')' before '&' token
4 | int check(int &x){
| ^
main.c: In function 'main':
main.c:20:8: error: implicit declaration of function 'check' [-Wimplicit-function-declaration]
20 | gx = check(x);
| ^~~~~
|
s655154627 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b;
vector<int> grp1 = {1,3,5,7,8,10,12};
vector<int> grp2 = {4,6,9,11};
vector <int> grp3 = {2};
cin >> a >> b;
if ((find(grp1.begin(), grp1.end(), a) == grp1.end()) && (find(grp1.begin(), grp1.end(), b) == grp1.end())){
if ((find(grp2.begin(), grp2.end(), a) == grp2.end()) && (find(grp2.begin(), grp2.end(), b) == grp2.end())){
if ((x == 2) && (y == 2)){
cout << "Yes\n";
}else{
cout << "No\n";
}
}else{
cout << "Yes\n"
}
}else{
cout << "Yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:6: error: 'x' was not declared in this scope
15 | if ((x == 2) && (y == 2)){
| ^
a.cc:15:18: error: 'y' was not declared in this scope
15 | if ((x == 2) && (y == 2)){
| ^
a.cc:21:16: error: expected ';' before '}' token
21 | cout << "Yes\n"
| ^
| ;
22 | }
| ~
|
s925552567 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b;
vector<int> grp1 = {1,3,5,7,8,10,12};
vector<int> grp2 = {4,6,9,11};
vector <int> grp3 = {2};
cin >> a >> b;
if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
if ((x == 2) && (y == 2)){
cout << "Yes\n";
}else{
cout << "No\n";
}
}else{
cout << "Yes\n"
}
}else{
cout << "Yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:14:53: error: no match for 'operator&&' (operand types are 'bool' and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| bool __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:14:53: note: candidate: 'operator&&(bool, bool)' (built-in)
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:53: note: no known conversion for argument 2 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'bool'
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const valarray<_Tp>&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::valarray<_Tp>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::valarray<_Tp>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::valarray<_Tp>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
a.cc:14:89: error: expected ')' before '{' token
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~ ^
| )
a.cc:23:1: error: expected primary-expression before '}' token
23 | }else{
| ^
|
s462479018 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b;
int grp1[] = {1,3,5,7,8,10,12};
int grp2[] = {4,6,9,11};
int grp3[] = {2};
cin >> a >> b;
if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
if ((x == 2) && (y == 2)){
cout << "Yes\n";
}else{
cout << "No\n";
}
}else{
cout << "Yes\n"
}
}else{
cout << "Yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:15: error: request for member 'begin' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~~~
a.cc:13:29: error: request for member 'end' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:47: error: request for member 'end' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:66: error: request for member 'begin' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~~~
a.cc:13:80: error: request for member 'end' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:98: error: request for member 'end' in 'grp1', which is of non-class type 'int [7]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:14:15: error: request for member 'begin' in 'grp2', which is of non-class type 'int [4]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~~~
a.cc:14:29: error: request for member 'end' in 'grp2', which is of non-class type 'int [4]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:47: error: request for member 'end' in 'grp2', which is of non-class type 'int [4]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:66: error: request for member 'begin' in 'grp2', which is of non-class type 'int [4]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~~~
a.cc:14:80: error: request for member 'end' in 'grp2', which is of non-class type 'int [4]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:89: error: expected ')' before '{' token
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~ ^
| )
a.cc:23:1: error: expected primary-expression before '}' token
23 | }else{
| ^
|
s215246825 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b;
int grp1[] = [1,3,5,7,8,10,12];
int grp2[] = [4,6,9,11];
int grp3[] = [2];
cin >> a >> b;
if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
if ((x == 2) && (y == 2)){
cout << "Yes\n";
}else{
cout << "No\n";
}
}else{
cout << "Yes\n"
}
}else{
cout << "Yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:15: error: expected identifier before numeric constant
9 | int grp1[] = [1,3,5,7,8,10,12];
| ^
a.cc:9:16: error: expected ']' before ',' token
9 | int grp1[] = [1,3,5,7,8,10,12];
| ^
| ]
a.cc: In lambda function:
a.cc:9:16: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:9:14: error: initializer fails to determine size of 'grp1'
9 | int grp1[] = [1,3,5,7,8,10,12];
| ^~
a.cc:9:14: error: array must be initialized with a brace-enclosed initializer
a.cc:9:17: error: expected unqualified-id before numeric constant
9 | int grp1[] = [1,3,5,7,8,10,12];
| ^
a.cc:10:15: error: expected identifier before numeric constant
10 | int grp2[] = [4,6,9,11];
| ^
a.cc:10:16: error: expected ']' before ',' token
10 | int grp2[] = [4,6,9,11];
| ^
| ]
a.cc: In lambda function:
a.cc:10:16: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:10:14: error: initializer fails to determine size of 'grp2'
10 | int grp2[] = [4,6,9,11];
| ^~
a.cc:10:14: error: array must be initialized with a brace-enclosed initializer
a.cc:10:17: error: expected unqualified-id before numeric constant
10 | int grp2[] = [4,6,9,11];
| ^
a.cc:11:15: error: expected identifier before numeric constant
11 | int grp3[] = [2];
| ^
a.cc: In lambda function:
a.cc:11:17: error: expected '{' before ';' token
11 | int grp3[] = [2];
| ^
a.cc: In function 'int main()':
a.cc:11:14: error: initializer fails to determine size of 'grp3'
11 | int grp3[] = [2];
| ^~~
a.cc:11:14: error: array must be initialized with a brace-enclosed initializer
a.cc:13:15: error: request for member 'begin' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~~~
a.cc:13:29: error: request for member 'end' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:47: error: request for member 'end' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:66: error: request for member 'begin' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~~~
a.cc:13:80: error: request for member 'end' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:13:98: error: request for member 'end' in 'grp1', which is of non-class type 'int [1]'
13 | if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
| ^~~
a.cc:14:15: error: request for member 'begin' in 'grp2', which is of non-class type 'int [1]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~~~
a.cc:14:29: error: request for member 'end' in 'grp2', which is of non-class type 'int [1]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:47: error: request for member 'end' in 'grp2', which is of non-class type 'int [1]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:66: error: request for member 'begin' in 'grp2', which is of non-class type 'int [1]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~~~
a.cc:14:80: error: request for member 'end' in 'grp2', which is of non-class type 'int [1]'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^~~
a.cc:14:89: error: expected ')' before '{' token
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~ ^
| )
a.cc:23:1: error: expected primary-expression before '}' token
23 | }else{
| ^
|
s235227702 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b;
vector <int> grp1 = [1,3,5,7,8,10,12];
vector <int> grp2 = [4,6,9,11];
vector <int> grp3 = [2];
cin >> a >> b;
if (find(grp1.begin(), grp1.end(), a) == grp1.end() && find(grp1.begin(), grp1.end(), b) == grp1.end()){
if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
if ((x == 2) && (y == 2)){
cout << "Yes\n";
}else{
cout << "No\n";
}
}else{
cout << "Yes\n"
}
}else{
cout << "Yes\n";
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:22: error: expected identifier before numeric constant
9 | vector <int> grp1 = [1,3,5,7,8,10,12];
| ^
a.cc:9:23: error: expected ']' before ',' token
9 | vector <int> grp1 = [1,3,5,7,8,10,12];
| ^
| ]
a.cc: In lambda function:
a.cc:9:23: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:9:21: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::vector<int>' requested
9 | vector <int> grp1 = [1,3,5,7,8,10,12];
| ^~
a.cc:9:24: error: expected unqualified-id before numeric constant
9 | vector <int> grp1 = [1,3,5,7,8,10,12];
| ^
a.cc:10:22: error: expected identifier before numeric constant
10 | vector <int> grp2 = [4,6,9,11];
| ^
a.cc:10:23: error: expected ']' before ',' token
10 | vector <int> grp2 = [4,6,9,11];
| ^
| ]
a.cc: In lambda function:
a.cc:10:23: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:10:21: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::vector<int>' requested
10 | vector <int> grp2 = [4,6,9,11];
| ^~
a.cc:10:24: error: expected unqualified-id before numeric constant
10 | vector <int> grp2 = [4,6,9,11];
| ^
a.cc:11:22: error: expected identifier before numeric constant
11 | vector <int> grp3 = [2];
| ^
a.cc: In lambda function:
a.cc:11:24: error: expected '{' before ';' token
11 | vector <int> grp3 = [2];
| ^
a.cc: In function 'int main()':
a.cc:11:21: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::vector<int>' requested
11 | vector <int> grp3 = [2];
| ^~~
a.cc:14:53: error: no match for 'operator&&' (operand types are 'bool' and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| bool __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:14:53: note: candidate: 'operator&&(bool, bool)' (built-in)
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:14:53: note: no known conversion for argument 2 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'bool'
In file included from /usr/include/c++/14/valarray:605,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
from a.cc:1:
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray<typename _Dom::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/bits/valarray_after.h:415:5: note: candidate: 'template<class _Dom> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__logical_and, typename _Dom1::value_type>::result_type> std::operator&&(const valarray<typename _Dom::value_type>&, const _Expr<_Dom1, typename _Dom1::value_type>&)'
415 | _DEFINE_EXPR_BINARY_OPERATOR(&&, struct std::__logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/valarray_after.h:415:5: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const valarray<_Tp>&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::valarray<_Tp>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: mismatched types 'const std::valarray<_Tp>' and 'bool'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
/usr/include/c++/14/valarray:1206:1: note: candidate: 'template<class _Tp> std::_Expr<std::__detail::_BinClos<std::__logical_and, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__logical_and, _Tp>::result_type> std::operator&&(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)'
1206 | _DEFINE_BINARY_OPERATOR(&&, __logical_and)
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/valarray:1206:1: note: template argument deduction/substitution failed:
a.cc:14:88: note: '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'const std::valarray<_Tp>'
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ^
a.cc:14:89: error: expected ')' before '{' token
14 | if (find(grp2.begin(), grp2.end(), a) == grp2.end() && find(grp2.begin(), grp2.end(), b){
| ~ ^
| |
s806912251 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define INF 999999999
#define rep(i, n) for(int i = 0;i < n;i++)
#define pb(n) push_back(n)
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define Vecpr vector<pair<lli,lli>>
int main() {
lli A,B,C,D;
cin >>A>>B;
vector<int>P{1,2,1,3,1,3,1,1,3,1,3,1}
if(P[A]==P[B])Out("Yes");
else Out("No");
} | a.cc: In function 'int main()':
a.cc:15:3: error: expected ',' or ';' before 'if'
15 | if(P[A]==P[B])Out("Yes");
| ^~
a.cc:16:3: error: 'else' without a previous 'if'
16 | else Out("No");
| ^~~~
|
s133216350 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define INF 999999999
#define rep(i, n) for(int i = 0;i < n;i++)
#define pb(n) push_back(n)
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define Vecpr vector<pair<lli,lli>>
int main() {
lli A,B,C,D;
cin >>A>>B;
if(A==1||3||5||7||8||10){
if(B==3||5||7||8||10||12)Out("Yes")
}
else if(A==4||6||9){
if(B==6||9||11)Out("Yes")
}
else Out("No");
} | a.cc: In function 'int main()':
a.cc:16:3: error: expected ';' before '}' token
16 | }
| ^
a.cc:19:3: error: expected ';' before '}' token
19 | }
| ^
|
s748826635 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin>>a>>b;
if((a==1&&b==1)||(a==1&&b==3)||(a==1&&b==5)||(a==1&&b==7)||(a==1&&b==8)||(a==1&&b==10)||(a==1&&b==12)||(a==3&&b==1)||(a==3&&b==3)||(a==3&&b==5)||(a==3&&b==7)||(a==3&&b=8)||(a==3&&b==10)||(a==3&&b==12)||(a==5&&b==1)||(a==5&&b==3)||(a==5&&b==5)||(a==5&&b==7)||(a==5&&b==8)||(a==5&&b==10)||(a==5&&b==12)||(a==7&&b==1)||(a==7&&b==3)||(a==7&&b==5)||(a==7&&b==7)||(a==7&&b==8)||(a==7&&b==10)||(a==7&&b==12)||(a==8&&b==1)||(a==8&&b==3)||(a==8&&b==5)||(a==8&&b==7)||(a==8&&b==8)||(a==8&&b==10)||(a==8&&b==12)||(a==10&&b==1)||(a==10&&b==3)||(a==10&&b==5)||(a==10&&b==7)||(a==10&&b==8)||(a==10&&b==10)||(a==10&&b==12)||(a==12&&b==1)||(a==12&&b==3)||(a==12&&b==5)||(a==12&&b==7)||(a==12&&b==8)||(a==12&&b==10)||(a==12&&b==12)||(a==4&&b==4)||(a==4&&b==6)||(a==4&&b==9)||(a==4&&b==11)||(a==6&&b==4)||(a==6&&b==6)||(a==6&&b==9)||(a==6&&b==11)||(a==9&&b==4)||(a==9&&b==6)||(a==9&&b==9)||(a==9&&b==11)||(a==11&&b==4)||(a==11&&b==6)||(a==11&&b==9)||(a==11&&b==11)||(a==2&&b==2)|| )
cout<<"Yes";
else
cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:6:165: error: lvalue required as left operand of assignment
6 | if((a==1&&b==1)||(a==1&&b==3)||(a==1&&b==5)||(a==1&&b==7)||(a==1&&b==8)||(a==1&&b==10)||(a==1&&b==12)||(a==3&&b==1)||(a==3&&b==3)||(a==3&&b==5)||(a==3&&b==7)||(a==3&&b=8)||(a==3&&b==10)||(a==3&&b==12)||(a==5&&b==1)||(a==5&&b==3)||(a==5&&b==5)||(a==5&&b==7)||(a==5&&b==8)||(a==5&&b==10)||(a==5&&b==12)||(a==7&&b==1)||(a==7&&b==3)||(a==7&&b==5)||(a==7&&b==7)||(a==7&&b==8)||(a==7&&b==10)||(a==7&&b==12)||(a==8&&b==1)||(a==8&&b==3)||(a==8&&b==5)||(a==8&&b==7)||(a==8&&b==8)||(a==8&&b==10)||(a==8&&b==12)||(a==10&&b==1)||(a==10&&b==3)||(a==10&&b==5)||(a==10&&b==7)||(a==10&&b==8)||(a==10&&b==10)||(a==10&&b==12)||(a==12&&b==1)||(a==12&&b==3)||(a==12&&b==5)||(a==12&&b==7)||(a==12&&b==8)||(a==12&&b==10)||(a==12&&b==12)||(a==4&&b==4)||(a==4&&b==6)||(a==4&&b==9)||(a==4&&b==11)||(a==6&&b==4)||(a==6&&b==6)||(a==6&&b==9)||(a==6&&b==11)||(a==9&&b==4)||(a==9&&b==6)||(a==9&&b==9)||(a==9&&b==11)||(a==11&&b==4)||(a==11&&b==6)||(a==11&&b==9)||(a==11&&b==11)||(a==2&&b==2)|| )
| ~~~~^~~
a.cc:6:964: error: expected primary-expression before ')' token
6 | if((a==1&&b==1)||(a==1&&b==3)||(a==1&&b==5)||(a==1&&b==7)||(a==1&&b==8)||(a==1&&b==10)||(a==1&&b==12)||(a==3&&b==1)||(a==3&&b==3)||(a==3&&b==5)||(a==3&&b==7)||(a==3&&b=8)||(a==3&&b==10)||(a==3&&b==12)||(a==5&&b==1)||(a==5&&b==3)||(a==5&&b==5)||(a==5&&b==7)||(a==5&&b==8)||(a==5&&b==10)||(a==5&&b==12)||(a==7&&b==1)||(a==7&&b==3)||(a==7&&b==5)||(a==7&&b==7)||(a==7&&b==8)||(a==7&&b==10)||(a==7&&b==12)||(a==8&&b==1)||(a==8&&b==3)||(a==8&&b==5)||(a==8&&b==7)||(a==8&&b==8)||(a==8&&b==10)||(a==8&&b==12)||(a==10&&b==1)||(a==10&&b==3)||(a==10&&b==5)||(a==10&&b==7)||(a==10&&b==8)||(a==10&&b==10)||(a==10&&b==12)||(a==12&&b==1)||(a==12&&b==3)||(a==12&&b==5)||(a==12&&b==7)||(a==12&&b==8)||(a==12&&b==10)||(a==12&&b==12)||(a==4&&b==4)||(a==4&&b==6)||(a==4&&b==9)||(a==4&&b==11)||(a==6&&b==4)||(a==6&&b==6)||(a==6&&b==9)||(a==6&&b==11)||(a==9&&b==4)||(a==9&&b==6)||(a==9&&b==9)||(a==9&&b==11)||(a==11&&b==4)||(a==11&&b==6)||(a==11&&b==9)||(a==11&&b==11)||(a==2&&b==2)|| )
| ^
|
s471584768 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin>a>>b;
if((a==1&&b==1)||(a==1&&b==3)||(a==1&&b==5)||(a==1&&b==7)||(a==1&&b==8)||(a==1&&b==10)||(a==1&&b==12)||(a==3&&b==1)||(a==3&&b==3)||(a==3&&b==5)||(a==3&&b==7)||(a==3&&b=8)||(a==3&&b==10)||(a==3&&b==12)||(a==5&&b==1)||(a==5&&b==3)||(a==5&&b==5)||(a==5&&b==7)||(a==5&&b==8)||(a==5&&b==10)||(a==5&&b==12)||(a==7&&b==1)||(a==7&&b==3)||(a==7&&b==5)||(a==7&&b==7)||(a==7&&b==8)||(a==7&&b==10)||(a==7&&b==12)||(a==8&&b==1)||(a==8&&b==3)||(a==8&&b==5)||(a==8&&b==7)||(a==8&&b==8)||(a==8&&b==10)||(a==8&&b==12)||(a==10&&b==1)||(a==10&&b==3)||(a==10&&b==5)||(a==10&&b==7)||(a==10&&b==8)||(a==10&&b==10)||(a==10&&b==12)||(a==12&&b==1)||(a==12&&b==3)||(a==12&&b==5)||(a==12&&b==7)||(a==12&&b==8)||(a==12&&b==10)||(a==12&&b==12)||(a==4&&b==4)||(a==4&&b==6)||(a==4&&b==9)||(a==4&&b==11)||(a==6&&b==4)||(a==6&&b==6)||(a==6&&b==9)||(a==6&&b==11)||(a==9&&b==4)||(a==9&&b==6)||(a==9&&b==9)||(a==9&&b==11)||(a==11&&b==4)||(a==11&&b==6)||(a==11&&b==9)||(a==11&&b==11)||(a==2&&b==2)|| )
cout<<"Yes";
else
cout<<"No";
}
| a.cc: In function 'int main()':
a.cc:5:4: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
5 | cin>a>>b;
| ~~~^~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:5:4: note: candidate: 'operator>(int, int)' (built-in)
5 | cin>a>>b;
| ~~~^~~~~
a.cc:5:4: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
5 | cin>a>>b;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
5 | cin>a>>b;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
5 | cin>a>>b;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:5:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
5 | cin>a>>b;
| ^
/usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
|
s363918376 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
if(a ==1,3,5,7,8,10,12){
a== 1;
}
else if(a=4,6,9,11){
a== 2;
}
if(b ==1,3,5,7,8,10,12){
b== 1;
}
else if(b=4,6,9,11){
b== 2;
}
if(a ==b){
cout << Yes <<endl;
}
else{
cout << No <<endl;
} | a.cc: In function 'int main()':
a.cc:20:13: error: 'Yes' was not declared in this scope
20 | cout << Yes <<endl;
| ^~~
a.cc:23:13: error: 'No' was not declared in this scope
23 | cout << No <<endl;
| ^~
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s098971211 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a<=7&&a%2!=0||a>=8&&a%2==0&&a<=7&&a%2!=0||a>=8&&a%2==0)
cout << "Yes" <<endl;
else if(4<=a&&a<=6&&a%2||a>=9&&a%2!=0&&4<=b&&b<=6&&b%2||b>=9&&b%2!=0)
else cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before 'else'
9 | else cout<<"Yes"<<endl;
| ^~~~
|
s030413856 | p03711 | C++ |
#include<iostream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<string>
//#include<windows.h>
using namespace std;
#define Int int64_t
#define dump(x) cout << (x) << endl
#define fi first
#define se second
Int mod = 1e9 + 7;
Int INF = 1e18;
double EPS = 0.00000001;
//Int mod = 1e6+3;
int main() {
int a[13] = {0,1,2,1,3,1,3,1,1,3,1,3,1};
int x, y;
cin >> x >> y;
if (a[x] == a[y]) {
Cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:31:17: error: 'Cout' was not declared in this scope
31 | Cout << "Yes" << endl;
| ^~~~
|
s062076412 | p03711 | C++ | // template
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<long long, long long> LP;
#define INF 999999999
#define MOD 1000000007
#define REP(i, n) for(ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP_AB(i, a, b) for (ll i = ll(a); i <= ll(b); ++i)
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define UNIQUE(v) sort(ALL(v));v.erase(unique(ALL(v)), v.end());
#define SIZE(x) ((ll)(x).size())
#define REVERSE(v) reverse(ALL(v))
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a / gcd(a, b)) * b;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
#define out cout
#define in cin
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
// template end
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
ll x, y;
in >> x >> y;
vector<ll> g1 = {1, 3, 5, 7, 8, 10, 12};
vector<ll> g2 = {4, 6, 9, 11};
vector<ll> g3 = {2};
ll xg, xy;
REP(i, g1.size()){
if(g1[i] == x) xg = 1;
if(g1[i] == y) yg = 1;
}
REP(i, g2.size()){
if(g2[i] == x) xg = 2;
if(g2[i] == y) yg = 2;
}
REP(i, g3.size()){
if(g3[i] == x) xg = 3;
if(g3[i] == y) yg = 3;
}
if(xg == yg) out << "Yes" << endl;
else out << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:39:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
39 | if(g1[i] == y) yg = 1;
| ^~
| xg
a.cc:43:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
43 | if(g2[i] == y) yg = 2;
| ^~
| xg
a.cc:47:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
47 | if(g3[i] == y) yg = 3;
| ^~
| xg
a.cc:49:14: error: 'yg' was not declared in this scope; did you mean 'xg'?
49 | if(xg == yg) out << "Yes" << endl;
| ^~
| xg
|
s213940884 | p03711 | C++ | // template
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<long long, long long> LP;
#define INF 999999999
#define MOD 1000000007
#define REP(i, n) for(ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP_AB(i, a, b) for (ll i = ll(a); i <= ll(b); ++i)
#define ALL(v) v.begin(), v.end()
#define SORT(v) sort(ALL(v))
#define UNIQUE(v) sort(ALL(v));v.erase(unique(ALL(v)), v.end());
#define SIZE(x) ((ll)(x).size())
#define REVERSE(v) reverse(ALL(v))
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a / gcd(a, b)) * b;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
#define out cout
#define in cin
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
// template end
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
ll x, y;
in >> x >> y;
vector<ll> g1 = {1, 3, 5, 7, 8, 10, 12};
vector<ll> g2 = {4, 6, 9, 11};
vector<ll> g3 = {2};
ll xg, xy;
REP(i, g1.size()){
if(g1[i] == x) xg = "g1";
if(g1[i] == y) yg = "g1";
}
REP(i, g2.size()){
if(g2[i] == x) xg = "g2";
if(g2[i] == y) yg = "g2";
}
REP(i, g3.size()){
if(g3[i] == x) xg = "g3";
if(g3[i] == y) yg = "g3";
}
if(xg == yg) out << "Yes" << endl;
else out << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:38:29: error: invalid conversion from 'const char*' to 'll' {aka 'long long int'} [-fpermissive]
38 | if(g1[i] == x) xg = "g1";
| ^~~~
| |
| const char*
a.cc:39:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
39 | if(g1[i] == y) yg = "g1";
| ^~
| xg
a.cc:42:29: error: invalid conversion from 'const char*' to 'll' {aka 'long long int'} [-fpermissive]
42 | if(g2[i] == x) xg = "g2";
| ^~~~
| |
| const char*
a.cc:43:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
43 | if(g2[i] == y) yg = "g2";
| ^~
| xg
a.cc:46:29: error: invalid conversion from 'const char*' to 'll' {aka 'long long int'} [-fpermissive]
46 | if(g3[i] == x) xg = "g3";
| ^~~~
| |
| const char*
a.cc:47:24: error: 'yg' was not declared in this scope; did you mean 'xg'?
47 | if(g3[i] == y) yg = "g3";
| ^~
| xg
a.cc:49:14: error: 'yg' was not declared in this scope; did you mean 'xg'?
49 | if(xg == yg) out << "Yes" << endl;
| ^~
| xg
|
s101543846 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int x,y;cin>>x>>y;
int a[]={1,3,5,7,8,10,12};
int b[]={4,6,9,11};
int t=0;
for(int i=0;i<n;i++){
if(a[i]==x||a[i]==y){
t++;
}
}
if(t==2){cout<<"Yes"<<endl;return 0;}
t=0;
for(int i=0;i<n;i++){
if(b[i]==x||b[i]==y){
t++;
}
}
if(t==2){cout<<"Yes"<<endl;return 0;}
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main(int, char**)':
a.cc:16:17: error: 'n' was not declared in this scope
16 | for(int i=0;i<n;i++){
| ^
a.cc:23:17: error: 'n' was not declared in this scope
23 | for(int i=0;i<n;i++){
| ^
|
s324915429 | p03711 | C++ | #include <iostream>
#include <cstring>
#include <map>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#include <queue>
#include <list>
#include <numeric>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <math.h>
#include <stack>
#include <climits>
#include <bitset>
using namespace std;
typedef long long ll;
//最小公倍数
ll gcd(ll x, ll y) {
ll tmp = 0;
if (x < y){
tmp=x;
x=y;
y=tmp;
}
while (y > 0) {
ll r = x % y;
x = y;
y = r;
}
return x;
}
//最大公倍数
ll lcm(ll x,ll y){
return x/gcd(x,y)*y;
}
//階乗
ll kaijo(ll k){
ll sum = 1;
for (ll i = 1; i <= k; ++i)
{
sum *= i;
sum%=1000000000+7;
}
return sum;
}
//for(int i = ; i < ; i++){}
int main(){
int x,y;
cin>>x>>y;
if(x%2==1&&y%2==1) {
cout<<"Yes"<<endl;
return 0;
}
else if(x%2==0&&y%2==0){
if(x==2&&y==2) cout<<"Yes"<<endl;
else if(x>=4&&y>=4){
cout<<"Yes"<<endl
}
return 0;
}
cout<<"No"<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:67:24: error: expected ';' before '}' token
67 | cout<<"Yes"<<endl
| ^
| ;
68 | }
| ~
|
s991556870 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int g[12] = {1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
if (g[x - 1] == g[y - 1]) cout << "Yes" << endl;
else << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:10:8: error: expected primary-expression before '<<' token
10 | else << "No" << endl;
| ^~
|
s793379748 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int x, y;
cin >> x >> y;
if (a[x] == a[y]){ cout << "Yes" << endl; }
else { cout << "No" <> endl; }
}
| a.cc: In function 'int main()':
a.cc:11:30: error: expected primary-expression before '>' token
11 | else { cout << "No" <> endl; }
| ^
|
s653202125 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int>vec(12)={0,1,0,2,0,2,0,0,2,0,2,0};
int X,Y;
cin >>X>>Y;
if(vec[X]==vec[Y]){
cout <<"Yes";
}
else{
cout <<"No";
}
}
| a.cc: In function 'int main()':
a.cc:5:19: error: expected ',' or ';' before '=' token
5 | vector<int>vec(12)={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
|
s076752718 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
int X,Y;
cin >>X>>Y;
if(vec[X]==vec[Y]){
cout <<"Yes";
}
else{
cout <<"No";
}
}
| a.cc: In function 'int main()':
a.cc:5:21: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:23: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:25: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:27: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:29: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:31: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:33: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:35: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:37: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:39: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:41: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
a.cc:5:43: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
5 | vector<int>vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^
|
s306496647 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
int X,Y;
cin >>X>>Y;
if(vec[X]==vec[Y]){
cout <<"Yes";
}
else{
cout <<"No";
}
}
| a.cc: In function 'int main()':
a.cc:5:1: error: 'vec' was not declared in this scope
5 | vec[12]={0,1,0,2,0,2,0,0,2,0,2,0};
| ^~~
|
s321103154 | p03711 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main() {
int f1[] = { 1,3,5,7,8,10,12 };
int f2[] = {4,6,9,11};
int x, y; cin >> x >> y;
bool f = false;
if (x == 2 || y == 2) cout << "No" << endl;
auto search = [&](auto sf){
for (auto s1: sf) {
if (s1 == x) {
for (auto ss1 : sf) {
if (ss1 == y) f = true;
}
}
}
};
search(f1); search(f2);
if (f == true) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In instantiation of 'main()::<lambda(auto:1)> [with auto:1 = int*]':
a.cc:20:8: required from here
20 | search(f1); search(f2);
| ~~~~~~^~~~
a.cc:12:17: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
12 | for (auto s1: sf) {
| ^~~
| std::begin
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
a.cc:12:17: error: 'end' was not declared in this scope; did you mean 'std::end'?
12 | for (auto s1: sf) {
| ^~~
| std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
a.cc:14:33: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
14 | for (auto ss1 : sf) {
| ^~~
| std::begin
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
114 | template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
| ^~~~~
a.cc:14:33: error: 'end' was not declared in this scope; did you mean 'std::end'?
14 | for (auto ss1 : sf) {
| ^~~
| std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
116 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
| ^~~
|
s835641135 | p03711 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
using ll = long long;
#define ld long double
#define ull unsigned long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++) // (i, 10) i=0~i=9まで
#define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10~i=0まで
#define FOR(i, m, n) for (int i = m; i < n; i++) // (i, 3, 10) i=3~i=9まで
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define pb push_back
#define ret return
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<long long> vl;
// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main() {
// cin.tie(0);
// ios::sync_with_stdio(false);
// cout << fixed << setprecision(5);
// 入力
int x, y;
cin >> x >> y;
int group[] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1};
// 処理
// 出力
cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:42:14: error: 'groug' was not declared in this scope; did you mean 'group'?
42 | cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
| ^~~~~
| group
a.cc:42:51: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
42 | cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
|
s450806545 | p03711 | C++ | #include <bits/stdc++.h>
#include <ctype.h>
using namespace std;
using ll = long long;
#define ld long double
#define ull unsigned long long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++) // (i, 10) i=0~i=9まで
#define repr(i, n) for (int i = n; i >= 0; i--) // (i, 10) i=10~i=0まで
#define FOR(i, m, n) for (int i = m; i < n; i++) // (i, 3, 10) i=3~i=9まで
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define pb push_back
#define ret return
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<long long> vl;
// 総数を1000000007で割った余り
const long long mod = 1e9 + 7;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main() {
// cin.tie(0);
// ios::sync_with_stdio(false);
// cout << fixed << setprecision(5);
// 入力
int x, y;
cin >> x >> y;
int group[] = {1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1};
// 処理
// 出力
cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:42:14: error: 'groug' was not declared in this scope; did you mean 'group'?
42 | cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
| ^~~~~
| group
a.cc:42:51: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
42 | cout << (groug[x] == group[y]) ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
|
s364796411 | p03711 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repi(i,a,b) for (int i = (a); i < (b); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vc = vector<char>;
using vvc = vector<vc>;
using vs = vector<string>;
int main() {
int x, y;
cin >> x >> y;
vi a = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}
cout << (a.at(x) == a.at(y) ? "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:22:3: error: expected ',' or ';' before 'cout'
22 | cout << (a.at(x) == a.at(y) ? "Yes" : "No") << endl;
| ^~~~
|
s896434844 | p03711 | C++ | #include"bits/stdc++.h"
#define int long long
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(a);i<(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define itr(i,x) for(auto i=(x).begin();i!=(x).end();++i)
#define All(x) (x).begin(),(x).end()
#define gridif(a,x,b) if((a)<=(x)&&(x)<(b))
using namespace std;
using Graph = vector<vector<int>>;
typedef pair<int,int> P;
const int mod=1000000007;
int digitsum(int n,int b){
if(b<2) return -1;
if(n<b) return n;
return digitsum(n/b,b)+n%b;
}
int mpow(int a,int x);
int m_inv(int n);
vector<int> split(int n,int a);
string xal_number(int n,int x);
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int lcm(int x,int y){return x*y/gcd(x,y);}
class Factorial{
private:
vector<int> fac;
public:
Factorial(int N){
fac.push_back(1);
rep(i,N) fac.push_back(fac[i]*(i+1)%mod);
}
int fact(int a){return fac[a];}
int ifac(int a){return m_inv(fac[a]);}
int cmb(int n,int r);
};
struct UnionFind {
vector<int> par; // 親ノード
UnionFind(int n = 1) { init(n);}
void init(int n = 1) {
par.resize(n);
rep(i,n) par[i] = -1;
}
int root(int x) {
if (par[x] <0) return x;
else return par[x] = root(par[x]);
}
int size(int x){ return -par[root(x)];}
bool issame(int x, int y) {return root(x)==root(y);}
bool connect(int x, int y);
};
signed main(){
int x,y;
cin>>x>>y;
UnionFind uni(13);
uni.connect(1,3);uni.connect(1,5);uni.connect(1,7);uni.connect(1,8);uni.connect(1,10);uni.connect(1,12);
uni.connect(4,6);uni.connect(4,9);uni.connect(4,11);
if(uni.issame(x,y)) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
} | /usr/bin/ld: /tmp/ccEBzGbO.o: in function `main':
a.cc:(.text+0x12e): undefined reference to `UnionFind::connect(long long, long long)'
/usr/bin/ld: a.cc:(.text+0x144): undefined reference to `UnionFind::connect(long long, long long)'
/usr/bin/ld: a.cc:(.text+0x15a): undefined reference to `UnionFind::connect(long long, long long)'
/usr/bin/ld: a.cc:(.text+0x170): undefined reference to `UnionFind::connect(long long, long long)'
/usr/bin/ld: a.cc:(.text+0x186): undefined reference to `UnionFind::connect(long long, long long)'
/usr/bin/ld: /tmp/ccEBzGbO.o:a.cc:(.text+0x19c): more undefined references to `UnionFind::connect(long long, long long)' follow
collect2: error: ld returned 1 exit status
|
s699800690 | p03711 | C++ | using System;
using System.Linq;
using System.Collections.Generic;
namespace program
{
class Program
{
static void Main()
{
int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
int[] S = Input.ScanIntArray();
Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
}
}
static class Input
{
static public int ScanInt() { return int.Parse(Console.ReadLine()); }
static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
static public long ScanLong() { return long.Parse(Console.ReadLine()); }
static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
static public int[] ScanIntArray() { return Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); }
static public uint[] ScanUintArray() { return Console.ReadLine().Split(' ').Select(x => uint.Parse(x)).ToArray(); }
static public long[] ScanLongArray() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); }
static public ulong[] ScanUlongArray() { return Console.ReadLine().Split(' ').Select(x => ulong.Parse(x)).ToArray(); }
static public string ScanStr() { return Console.ReadLine(); }
static public string[] ScanStrArray() { return ScanStr().Split(' '); }
}
static class MyMath
{
public static int GCD(int a, int b)
{
Func<int, int, int> gcd = null;
gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
return a > b ? gcd(a, b) : gcd(b, a);
}
public static ulong GCD(ulong a, ulong b)
{
Func<ulong, ulong, ulong> gcd = null;
gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
return a > b ? gcd(a, b) : gcd(b, a);
}
public static int LCM(int a, int b)
{
return a * b / GCD(a, b);
}
public static ulong LCM(ulong a, ulong b)
{
return a * b / GCD(a, b);
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections.Generic;
| ^~~~~~
a.cc:15:6: error: expected ';' after class definition
15 | }
| ^
| ;
a.cc: In static member function 'static void program::Program::Main()':
a.cc:11:14: error: structured binding declaration cannot have type 'int'
11 | int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
| ^~
a.cc:11:14: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:14: error: empty structured binding declaration
a.cc:11:17: error: expected initializer before 'day'
11 | int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
| ^~~
a.cc:12:16: error: structured binding declaration cannot have type 'int'
12 | int[] S = Input.ScanIntArray();
| ^~
a.cc:12:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:16: error: empty structured binding declaration
a.cc:12:19: error: expected initializer before 'S'
12 | int[] S = Input.ScanIntArray();
| ^
a.cc:13:11: error: 'Console' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^~~~~~~
a.cc:13:30: error: 'groug' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^~~~~
a.cc:13:36: error: 'S' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^
a.cc:13:47: error: 'group' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^~~~~
a.cc:13:60: error: expected ')' before ']' token
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^
a.cc:13:29: note: to match this '('
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]] ? "Yes" : "No");
| ^
a.cc: At global scope:
a.cc:19:16: error: expected unqualified-id before 'public'
19 | static public int ScanInt() { return int.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:20:16: error: expected unqualified-id before 'public'
20 | static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:21:16: error: expected unqualified-id before 'public'
21 | static public long ScanLong() { return long.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:22:16: error: expected unqualified-id before 'public'
22 | static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:23:16: error: expected unqualified-id before 'public'
23 | static public int[] ScanIntArray() { return Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:24:16: error: expected unqualified-id before 'public'
24 | static public uint[] ScanUintArray() { return Console.ReadLine().Split(' ').Select(x => uint.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:25:16: error: expected unqualified-id before 'public'
25 | static public long[] ScanLongArray() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:26:16: error: expected unqualified-id before 'public'
26 | static public ulong[] ScanUlongArray() { return Console.ReadLine().Split(' ').Select(x => ulong.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:28:16: error: expected unqualified-id before 'public'
28 | static public string ScanStr() { return Console.ReadLine(); }
| ^~~~~~
a.cc:29:16: error: expected unqualified-id before 'public'
29 | static public string[] ScanStrArray() { return ScanStr().Split(' '); }
| ^~~~~~
a.cc:30:6: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc:17:5: error: a storage class can only be specified for objects and functions
17 | static class Input
| ^~~~~~
a.cc:34:15: error: expected ':' before 'static'
34 | public static int GCD(int a, int b)
| ^~~~~~~
| :
a.cc:40:15: error: expected ':' before 'static'
40 | public static ulong GCD(ulong a, ulong b)
| ^~~~~~~
| :
a.cc:40:23: error: 'ulong' does not name a type; did you mean 'long'?
40 | public static ulong GCD(ulong a, ulong b)
| ^~~~~
| long
a.cc:46:15: error: expected ':' before 'static'
46 | public static int LCM(int a, int b)
| ^~~~~~~
| :
a.cc:50:15: error: expected ':' before 'static'
50 | public static ulong LCM(ulong a, ulong b)
| ^~~~~~~
| :
a.cc:50:23: error: 'ulong' does not name a type; did you mean 'long'?
50 | public static ulong LCM(ulong a, ulong b)
| ^~~~~
| long
a.cc:54:6: error: expected ';' after class definition
54 | }
| ^
| ;
a.cc: In static member function 'static int program::MyMath::GCD(int, int)':
a.cc:36:13: error: 'Func' was not declared in this scope
36 | Func<int, int, int> gcd = null;
| ^~~~
a.cc:36:18: error: expected primary-expression before 'int'
36 | Func<int, int, int> gcd = null;
| ^~~
a.cc:37:13: error: 'gcd' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^~~
a.cc:37:20: error: 'x' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc:37:23: error: 'y' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc:37:27: error: expected primary-expression before '>' token
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc: At global scope:
a.cc:32:5: error: a storage class can only be specified for objects and functions
32 | static class MyMath
| ^~~~~~
|
s005155244 | p03711 | C++ | using System;
using System.Linq;
using System.Collections.Generic;
namespace program
{
class Program
{
static void Main()
{
int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
int[] S = Input.ScanIntArray();
Console.WriteLine((groug[S[0]-1] == group[S[1]-1]) ? "Yes" : "No");
}
}
static class Input
{
static public int ScanInt() { return int.Parse(Console.ReadLine()); }
static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
static public long ScanLong() { return long.Parse(Console.ReadLine()); }
static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
static public int[] ScanIntArray() { return Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); }
static public uint[] ScanUintArray() { return Console.ReadLine().Split(' ').Select(x => uint.Parse(x)).ToArray(); }
static public long[] ScanLongArray() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); }
static public ulong[] ScanUlongArray() { return Console.ReadLine().Split(' ').Select(x => ulong.Parse(x)).ToArray(); }
static public string ScanStr() { return Console.ReadLine(); }
static public string[] ScanStrArray() { return ScanStr().Split(' '); }
}
static class MyMath
{
public static int GCD(int a, int b)
{
Func<int, int, int> gcd = null;
gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
return a > b ? gcd(a, b) : gcd(b, a);
}
public static ulong GCD(ulong a, ulong b)
{
Func<ulong, ulong, ulong> gcd = null;
gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
return a > b ? gcd(a, b) : gcd(b, a);
}
public static int LCM(int a, int b)
{
return a * b / GCD(a, b);
}
public static ulong LCM(ulong a, ulong b)
{
return a * b / GCD(a, b);
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Collections.Generic;
| ^~~~~~
a.cc:15:6: error: expected ';' after class definition
15 | }
| ^
| ;
a.cc: In static member function 'static void program::Program::Main()':
a.cc:11:14: error: structured binding declaration cannot have type 'int'
11 | int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
| ^~
a.cc:11:14: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:14: error: empty structured binding declaration
a.cc:11:17: error: expected initializer before 'day'
11 | int[] day = {0,2,0,1,0,1,0,0,1,0,1,0};
| ^~~
a.cc:12:16: error: structured binding declaration cannot have type 'int'
12 | int[] S = Input.ScanIntArray();
| ^~
a.cc:12:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:16: error: empty structured binding declaration
a.cc:12:19: error: expected initializer before 'S'
12 | int[] S = Input.ScanIntArray();
| ^
a.cc:13:11: error: 'Console' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]) ? "Yes" : "No");
| ^~~~~~~
a.cc:13:30: error: 'groug' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]) ? "Yes" : "No");
| ^~~~~
a.cc:13:36: error: 'S' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]) ? "Yes" : "No");
| ^
a.cc:13:47: error: 'group' was not declared in this scope
13 | Console.WriteLine((groug[S[0]-1] == group[S[1]-1]) ? "Yes" : "No");
| ^~~~~
a.cc: At global scope:
a.cc:19:16: error: expected unqualified-id before 'public'
19 | static public int ScanInt() { return int.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:20:16: error: expected unqualified-id before 'public'
20 | static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:21:16: error: expected unqualified-id before 'public'
21 | static public long ScanLong() { return long.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:22:16: error: expected unqualified-id before 'public'
22 | static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
| ^~~~~~
a.cc:23:16: error: expected unqualified-id before 'public'
23 | static public int[] ScanIntArray() { return Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:24:16: error: expected unqualified-id before 'public'
24 | static public uint[] ScanUintArray() { return Console.ReadLine().Split(' ').Select(x => uint.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:25:16: error: expected unqualified-id before 'public'
25 | static public long[] ScanLongArray() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:26:16: error: expected unqualified-id before 'public'
26 | static public ulong[] ScanUlongArray() { return Console.ReadLine().Split(' ').Select(x => ulong.Parse(x)).ToArray(); }
| ^~~~~~
a.cc:28:16: error: expected unqualified-id before 'public'
28 | static public string ScanStr() { return Console.ReadLine(); }
| ^~~~~~
a.cc:29:16: error: expected unqualified-id before 'public'
29 | static public string[] ScanStrArray() { return ScanStr().Split(' '); }
| ^~~~~~
a.cc:30:6: error: expected ';' after class definition
30 | }
| ^
| ;
a.cc:17:5: error: a storage class can only be specified for objects and functions
17 | static class Input
| ^~~~~~
a.cc:34:15: error: expected ':' before 'static'
34 | public static int GCD(int a, int b)
| ^~~~~~~
| :
a.cc:40:15: error: expected ':' before 'static'
40 | public static ulong GCD(ulong a, ulong b)
| ^~~~~~~
| :
a.cc:40:23: error: 'ulong' does not name a type; did you mean 'long'?
40 | public static ulong GCD(ulong a, ulong b)
| ^~~~~
| long
a.cc:46:15: error: expected ':' before 'static'
46 | public static int LCM(int a, int b)
| ^~~~~~~
| :
a.cc:50:15: error: expected ':' before 'static'
50 | public static ulong LCM(ulong a, ulong b)
| ^~~~~~~
| :
a.cc:50:23: error: 'ulong' does not name a type; did you mean 'long'?
50 | public static ulong LCM(ulong a, ulong b)
| ^~~~~
| long
a.cc:54:6: error: expected ';' after class definition
54 | }
| ^
| ;
a.cc: In static member function 'static int program::MyMath::GCD(int, int)':
a.cc:36:13: error: 'Func' was not declared in this scope
36 | Func<int, int, int> gcd = null;
| ^~~~
a.cc:36:18: error: expected primary-expression before 'int'
36 | Func<int, int, int> gcd = null;
| ^~~
a.cc:37:13: error: 'gcd' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^~~
a.cc:37:20: error: 'x' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc:37:23: error: 'y' was not declared in this scope
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc:37:27: error: expected primary-expression before '>' token
37 | gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
| ^
a.cc: At global scope:
a.cc:32:5: error: a storage class can only be specified for objects and functions
32 | static class MyMath
| ^~~~~~
|
s535751413 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y; cin >> x >> y;
set<int> s;
s = {4, 6, 9, 11);
if (x == 2 || y == 2) {
cout << "No" << endl;
}
else if (s.count(x) == 1 && s.count(y) == 1) {
cout << "Yes" << endl;
}
else if (s.count(x) == 0 && s.count(y) == 0) {
cout << "Yes" << endl;
}
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:19: error: expected '}' before ')' token
7 | s = {4, 6, 9, 11);
| ~ ^
a.cc:7:19: error: expected ';' before ')' token
7 | s = {4, 6, 9, 11);
| ^
| ;
|
s185530544 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> data(12)={0,2,0,1,0,1,0,0,1,0,1,0};
int a, b; cin >> a >> b;
int A=data[a], B=data[b];
if(A==B){
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:4:23: error: expected ',' or ';' before '=' token
4 | vector<int> data(12)={0,2,0,1,0,1,0,0,1,0,1,0};
| ^
|
s450590189 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x[]={1,3,1,2,1,2,1,1,2,1,2,1};
int a,b;
cin >>a>>b;
if (x.at(a-1)==x.at(b-1)) {
cout <<"Yes"<<endl;
}
else {
cout <<"No"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'at' in 'x', which is of non-class type 'int [12]'
7 | if (x.at(a-1)==x.at(b-1)) {
| ^~
a.cc:7:20: error: request for member 'at' in 'x', which is of non-class type 'int [12]'
7 | if (x.at(a-1)==x.at(b-1)) {
| ^~
|
s336500469 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
int x,y;
vector<int> a={0,1,2,1,3,1,3,1,1,3,1,3,1};
cin >> x >> y;
if(a.at(x)==a.at(y)) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
| a.cc: In function 'int main()':
a.cc:9:18: error: expected '}' at end of input
9 | return 0;
| ^
a.cc:3:15: note: to match this '{'
3 | int main(void){
| ^
|
s191912400 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
vector<int> a = { 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0 };
if (a[x-1] == a[y-1]) {
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
}
| a.cc:6:17: error: extended character is not valid in an identifier
6 | cin >> x >> y;
| ^
a.cc:8:3: error: extended character is not valid in an identifier
8 |
| ^
a.cc: In function 'int main()':
a.cc:6:17: error: '\U00003000' was not declared in this scope
6 | cin >> x >> y;
| ^~
a.cc:8:5: error: expected ';' before 'if'
8 |
| ^
| ;
9 | if (a[x-1] == a[y-1]) {
| ~~
a.cc:12:3: error: 'else' without a previous 'if'
12 | else {
| ^~~~
|
s180288188 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y ;
cin >> x >> y ;
if ((x<y) && ((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x ==12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12)) ){
cout << "Yes" << endl;
}
else if((x<y) && ((x == 4 || x == 6 || x == 9 || x == 11 ) && (y == 4 || y == 6 || y == 9 || y == 11){
cout << "Yes" << endl;
}
else {
cout << " No " << endl;
}
}
| a.cc: In function 'int main()':
a.cc:11:106: error: expected ')' before '{' token
11 | else if((x<y) && ((x == 4 || x == 6 || x == 9 || x == 11 ) && (y == 4 || y == 6 || y == 9 || y == 11){
| ~ ^
| )
a.cc:13:6: error: expected ')' before 'else'
13 | }
| ^
| )
14 | else {
| ~~~~
a.cc:11:12: note: to match this '('
11 | else if((x<y) && ((x == 4 || x == 6 || x == 9 || x == 11 ) && (y == 4 || y == 6 || y == 9 || y == 11){
| ^
a.cc:17:23: error: expected primary-expression before '}' token
17 | }
| ^
|
s390735016 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y ;
cin >> x >> y ;
if ((x<y) && ((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x ==12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12) ){
cout << "Yes" << endl;
}
else if((x<y) && ((x == 4 || x == 6 || x == 9 || x == 11 ) && (y == 4 || y == 6 || y == 9 || y == 11){
cout << "Yes" << endl;
}
else {
cout << " No " << endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:162: error: expected ')' before '{' token
8 | if ((x<y) && ((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x ==12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12) ){
| ~ ^
| )
a.cc:17:23: error: expected primary-expression before '}' token
17 | }
| ^
|
s148879693 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin >> x >> y;
int anko = {0,1,3,1,2,1,2,1,1,2,1,2,1};
if(a[x] == a[y]) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:7: error: scalar object 'anko' requires one element in initializer
7 | int anko = {0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^~~~
a.cc:8:6: error: 'a' was not declared in this scope
8 | if(a[x] == a[y]) cout << "Yes" << endl;
| ^
|
s146242101 | 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;
if (a[x]==a[y]){
cout << "Yes" << endl;
}
else {
cout << "No" << endl;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'int'
5 | int x,y;
| ^~~
a.cc:6:10: error: 'x' was not declared in this scope
6 | cin >> x >> y;
| ^
a.cc:6:15: error: 'y' was not declared in this scope
6 | cin >> x >> y;
| ^
|
s048218646 | p03711 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <climits>
#include <bitset>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pair<int,int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
#define rep(i,n) for(int i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define P 1000000007
#define STI(s) atoi(s.c_str())//string to int
#define mp(p,q) make_pair(p,q)
#define Sort(a) sort(a.begin(),a.end())
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 int INF = INT_MAX;
const long long LLINF = 1LL<<60;
//g++ -std=c++1z temp.cpp
//./a.exe
int main(void){ios::sync_with_stdio(false);cin.tie(0);
//////////////////////////////////////////////////////
int x,y;
cin >> x >> y;
if (x == 2 || y == 2) {
cout << "No" << endl;
return 0;
}
else if (x == 4 || x == 6 || x == 9 || x == 11) {
if (y == 4 || y == 6 || y == 9 || y == 11) {
cout << "Yes" << endl;
return 0;
}
else {
cout << "No" << endl;
}
}
else {
if (y == 4 || y == 6 || y == 9 || y == 11) {
cout << "No" << endl;
return 0;
}
else {
cout << "Yes" << endl;
}
}
}
//////////////////////////////////////////////////////
return 0;} | a.cc:71:1: error: expected unqualified-id before 'return'
71 | return 0;}
| ^~~~~~
a.cc:71:10: error: expected declaration before '}' token
71 | return 0;}
| ^
|
s938758720 | p03711 | C++ | #include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
int main() {
int a[]={-1,0,2,0,1,0,1,0,0,1,0,1,0};
int x,y;
cin >> x>> y;
string ans;
if(a[x]==a[y])ans="Yes";
else ans = "No";
cout << ans << endl;
}
| a.cc:13:3: error: extended character is not valid in an identifier
13 | int a[]={-1,0,2,0,1,0,1,0,0,1,0,1,0};
| ^
a.cc: In function 'int main()':
a.cc:13:3: error: '\U00003000int' was not declared in this scope
13 | int a[]={-1,0,2,0,1,0,1,0,0,1,0,1,0};
| ^~~~~
a.cc:17:8: error: 'a' was not declared in this scope
17 | if(a[x]==a[y])ans="Yes";
| ^
|
s946579735 | p03711 | C++ | #include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
int main() {
int a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
int x,y;
cin >> x>> y;
string ans;
if(a[x]==a[y])ans="Yes";
else ans = "No";
cout << ans << endl;
}
| a.cc:13:3: error: extended character is not valid in an identifier
13 | int a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
| ^
a.cc: In function 'int main()':
a.cc:13:3: error: '\U00003000int' was not declared in this scope
13 | int a[12]={0,2,0,1,0,1,0,0,1,0,1,0};
| ^~~~~
a.cc:17:8: error: 'a' was not declared in this scope
17 | if(a[x]==a[y])ans="Yes";
| ^
|
s566942270 | p03711 | C++ | #include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)
int main() {
int a[12]={0,2,0,1,0,1,0,0,1,0,1,0}
int x,y;
cin >> x>> y;
string ans;
if(a[x]==a[y])ans="Yes";
else ans = "No";
cout << ans << endl;
} | a.cc:13:3: error: extended character is not valid in an identifier
13 | int a[12]={0,2,0,1,0,1,0,0,1,0,1,0}
| ^
a.cc: In function 'int main()':
a.cc:13:3: error: '\U00003000int' was not declared in this scope
13 | int a[12]={0,2,0,1,0,1,0,0,1,0,1,0}
| ^~~~~
a.cc:17:8: error: 'a' was not declared in this scope
17 | if(a[x]==a[y])ans="Yes";
| ^
|
s233250921 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin>>x>>y;
int x, y;
vector<int> X={0,1,3,1,2,1,2,1,1,2,1,2,1,};
if (X[x]=X[y]){
cout<<"Yes"<<endl;
}
else{cout<<"No"<<endl;}
} | a.cc: In function 'int main()':
a.cc:5:8: error: 'x' was not declared in this scope
5 | cin>>x>>y;
| ^
a.cc:5:11: error: 'y' was not declared in this scope; did you mean 'yn'?
5 | cin>>x>>y;
| ^
| yn
|
s926768069 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int x, y;
cin >> x >> y;
if(x==2){
cout << "No" << endl;
}
if(x==4||x==6||x==9||x==11){
if(y==4||y==6||y==9||y==11){
cout << "Yes" << endl;
}
else{
cout << "No" << endl;
}
else{
if(y==2||y==4||y==6||y==9||y==11){
cout << "No" << endl;
}
else{
cout << "Yes" << endl;
}
}
} | a.cc: In function 'int main()':
a.cc:19:3: error: expected '}' before 'else'
19 | else{
| ^~~~
a.cc:10:30: note: to match this '{'
10 | if(x==4||x==6||x==9||x==11){
| ^
|
s387856800 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a==2||b==2){
cout<<No<<endl;
}
else if(b<8){
if(b-a==2){
cout<<Yes<<endl;
}
else{
cout<<No<<endl;
}
}
else{
if(b-a==2){
cout<<Yes<<endl;
}
else{
cout<<No<<endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:8:11: error: 'No' was not declared in this scope
8 | cout<<No<<endl;
| ^~
a.cc:12:13: error: 'Yes' was not declared in this scope
12 | cout<<Yes<<endl;
| ^~~
a.cc:15:13: error: 'No' was not declared in this scope
15 | cout<<No<<endl;
| ^~
a.cc:20:13: error: 'Yes' was not declared in this scope
20 | cout<<Yes<<endl;
| ^~~
a.cc:23:13: error: 'No' was not declared in this scope
23 | cout<<No<<endl;
| ^~
|
s306325659 | p03711 | C++ | #include<bits/stdc++>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a==2||b==2){
cout<<No<<endl;
}
else if(b<8){
if(b-a==2){
cout<<Yes<<endl;
}
else{
cout<<No<<endl;
}
}
else{
if(b-a==2){
cout<<Yes<<endl;
}
else{
cout<<No<<endl;
}
}
}
| a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s059058090 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int a,b;
cin>>a>>b;,
vector<int> s={0,1,2,1,3,1,3,1,1,3,1,3,1};
cout<<(s.at(a)==s.at(b)?"Yes":"No")<<endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ',' token
6 | cin>>a>>b;,
| ^
a.cc:7:15: error: expected primary-expression before 's'
7 | vector<int> s={0,1,2,1,3,1,3,1,1,3,1,3,1};
| ^
a.cc:8:10: error: 's' was not declared in this scope
8 | cout<<(s.at(a)==s.at(b)?"Yes":"No")<<endl;
| ^
|
s905463059 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int a,b;
cin>>a>>b;,
vector<int> s={0,1,2,1,3,1,3,1,1,3,1,3,1};
cout<<s.at(a)==s.at(b)?"Yes":"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ',' token
6 | cin>>a>>b;,
| ^
a.cc:7:15: error: expected primary-expression before 's'
7 | vector<int> s={0,1,2,1,3,1,3,1,1,3,1,3,1};
| ^
a.cc:8:9: error: 's' was not declared in this scope
8 | cout<<s.at(a)==s.at(b)?"Yes":"No"<<endl;
| ^
a.cc:8:36: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout<<s.at(a)==s.at(b)?"Yes":"No"<<endl;
| ~~~~^~~~~~
|
s532621126 | p03711 | C | #include <stdio.h>
int main() {
int group_name[12] = {0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0};
scanf("%d %d", &number_x, &number_y);
if(group_name[number_x-1] == group_name[number_y-1]) {
printf("Yes\n");
} else {
printf("No\n");
}
return 0;
}
| main.c: In function 'main':
main.c:5:19: error: 'number_x' undeclared (first use in this function)
5 | scanf("%d %d", &number_x, &number_y);
| ^~~~~~~~
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:30: error: 'number_y' undeclared (first use in this function)
5 | scanf("%d %d", &number_x, &number_y);
| ^~~~~~~~
|
s526473744 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
void main() {
unordered_set<int> set2;
set2.insert(4);
set2.insert(6);
set2.insert(9);
set2.insert(1);
int x, y;
cin >> x >> y;
if (x == 2 || y == 2) {
cout << "No" << endl;
} else if (set2.count(x) && set2.count(y)) {
cout << "Yes" << endl;
} else if (!set2.count(x) && !set2.count(y)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| a.cc:5:1: error: '::main' must return 'int'
5 | void main() {
| ^~~~
|
s551070541 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<int>abc(12) = {1,3,1,2,1,2,1,1,2,1,2,1};
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
#include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<int>abc = {1,3,1,2,1,2,1,1,2,1,2,1};
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:22: error: expected ',' or ';' before '=' token
8 | vector<int>abc(12) = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc: At global scope:
a.cc:20:5: error: redefinition of 'int main()'
20 | int main(void){
| ^~~~
a.cc:4:5: note: 'int main()' previously defined here
4 | int main(void){
| ^~~~
|
s177897590 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<int>abc(12) = {1,3,1,2,1,2,1,1,2,1,2,1};
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: expected ',' or ';' before '=' token
8 | vector<int>abc(12) = {1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s443652006 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<char>abc(12) = {'a','c','a','b','a','b','a','a','b','a','b','a'};
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0; | a.cc: In function 'int main()':
a.cc:8:23: error: expected ',' or ';' before '=' token
8 | vector<char>abc(12) = {'a','c','a','b','a','b','a','a','b','a','b','a'};
| ^
a.cc:15:12: error: expected '}' at end of input
15 | return 0;
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
s639578871 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<char>abc(12);
abc = ['a','c','a','b','a','b','a','a','b','a','b','a'];
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0; | a.cc: In function 'int main()':
a.cc:9:10: error: expected identifier before 'a'
9 | abc = ['a','c','a','b','a','b','a','a','b','a','b','a'];
| ^~~
a.cc:9:13: error: expected ']' before ',' token
9 | abc = ['a','c','a','b','a','b','a','a','b','a','b','a'];
| ^
| ]
a.cc: In lambda function:
a.cc:9:13: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:9:13: error: no match for 'operator=' (operand types are 'std::vector<char>' and 'main()::<lambda()>')
In file included from /usr/include/c++/14/vector:72,
from a.cc: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 = char; _Alloc = std::allocator<char>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'main()::<lambda()>' to 'const std::vector<char>&'
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 = char; _Alloc = std::allocator<char>]'
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 'main()::<lambda()>' to 'std::vector<char>&&'
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 = char; _Alloc = std::allocator<char>]'
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 'main()::<lambda()>' to 'std::initializer_list<char>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:16:12: error: expected '}' at end of input
16 | return 0;
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
s277874045 | p03711 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void){
int a,b;
cin >> a >> b;
vector<char>abc(12) = ['a','c','a','b','a','b','a','a','b','a','b','a'];
if(abc[a - 1] == abc[b - 1])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:23: error: expected ',' or ';' before '=' token
8 | vector<char>abc(12) = ['a','c','a','b','a','b','a','a','b','a','b','a'];
| ^
|
s351620803 | p03711 | C++ | #include <iostream>
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:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | int x , y ; cin >> x >> y ;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:5:53: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s922382554 | p03711 | C++ | #include<stdio.h>
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:4:13: error: 'cin' was not declared in this scope
4 | int x , y ; cin >> x >> y ;
| ^~~
a.cc:5:1: error: 'cout' was not declared in this scope
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
a.cc:5:53: error: 'endl' was not declared in this scope
5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ;
| ^~~~
|
s971710112 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>vec1={1,3,5,7,8,10,12};
vector<int>vec2={4,6,9,11}
int sum1=0;
int sum2=0;
for(int i=0;i<vec1.size() ;i++ ){
if(vec1.at(i)==x){
sum1++;
}
else if(vec1.at(i)==y){
sum1++;
}
}
for(int j=0;j<vec2.size(); j++){
if(vec2.at(j)==x){
sum2++;
}
else if(vec2.at(j)==y){
sum2++;
}
}
if(sum1==2||sum2==2){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
10 | int sum1=0;
| ^~~
a.cc:17:7: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
17 | sum1++;
| ^~~~
| sum2
a.cc:20:7: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
20 | sum1++;
| ^~~~
| sum2
a.cc:37:6: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
37 | if(sum1==2||sum2==2){
| ^~~~
| sum2
|
s245561756 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>vec1={1,3,5,7,8,10,12};
vector<int>vec2={4,6,9,11};
int sum1=0;
int sum2=0;
for((int i=0,int j=0);(i<vec1.size(),j<vec1.size());(i++,j++)){
if(vec1.at(i)==x&&vec.at(j)==y){
sum1++;
}
}
for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
if(vec2.at(i)==x&&vec2.at(j)==y){
sum2++;
}
}
if(sum1==1||sum2==1){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:8: error: expected primary-expression before 'int'
14 | for((int i=0,int j=0);(i<vec1.size(),j<vec1.size());(i++,j++)){
| ^~~
a.cc:14:8: error: expected ')' before 'int'
14 | for((int i=0,int j=0);(i<vec1.size(),j<vec1.size());(i++,j++)){
| ~^~~
| )
a.cc:14:26: error: 'i' was not declared in this scope
14 | for((int i=0,int j=0);(i<vec1.size(),j<vec1.size());(i++,j++)){
| ^
a.cc:14:40: error: 'j' was not declared in this scope
14 | for((int i=0,int j=0);(i<vec1.size(),j<vec1.size());(i++,j++)){
| ^
a.cc:15:23: error: 'vec' was not declared in this scope; did you mean 'vec2'?
15 | if(vec1.at(i)==x&&vec.at(j)==y){
| ^~~
| vec2
a.cc:19:38: error: expected ')' before ';' token
19 | for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
| ~ ^
| )
a.cc:19:39: error: 'j' was not declared in this scope
19 | for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
| ^
a.cc:19:53: error: 'i' was not declared in this scope
19 | for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
| ^
|
s061009858 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>vec1={1,3,5,7,8,10,12};
vector<int>vec2={4,6,9,11}
int sum1=0;
int sum2=0;
for(int i=0;int j=0;i<vec1.size();j<vec1.size();i++;j++){
if(vec1.at(i)==x&&vec.at(j)==y){
sum1++;
}
}
for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
if(vec2.at(i)==x&&vec2.at(j)==y){
sum2++;
}
}
if(sum1==1||sum2==1){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
10 | int sum1=0;
| ^~~
a.cc:14:36: error: expected ')' before ';' token
14 | for(int i=0;int j=0;i<vec1.size();j<vec1.size();i++;j++){
| ~ ^
| )
a.cc:14:37: error: 'j' was not declared in this scope
14 | for(int i=0;int j=0;i<vec1.size();j<vec1.size();i++;j++){
| ^
a.cc:14:51: error: 'i' was not declared in this scope
14 | for(int i=0;int j=0;i<vec1.size();j<vec1.size();i++;j++){
| ^
a.cc:19:38: error: expected ')' before ';' token
19 | for(int i=0;int j=0;i<vec2.size();j<vec2.size();i++;j++){
| ~ ^
| )
a.cc:29:6: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
29 | if(sum1==1||sum2==1){
| ^~~~
| sum2
|
s488951994 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>vec1={1,3,5,7,8,10,12};
vector<int>vec2={4,6,9,11}
int sum1=0;
int sum2=0;
for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
if(vec1.at(i)==x&&vec.at(j)==y){
sum1++;
}
}
for(int i=0,int j=0;i<vec2.size(),j<vec2.size();i++,j++){
if(vec2.at(i)==x&&vec2.at(j)==y){
sum2++;
}
}
if(sum1==1||sum2==1){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
10 | int sum1=0;
| ^~~
a.cc:14:15: error: expected unqualified-id before 'int'
14 | for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
| ^~~
a.cc:14:15: error: expected ';' before 'int'
14 | for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
| ^~~
| ;
a.cc:14:50: error: expected ')' before ';' token
14 | for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
| ~ ^
| )
a.cc:14:51: error: 'i' was not declared in this scope
14 | for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
| ^
a.cc:14:55: error: 'j' was not declared in this scope
14 | for(int i=0,int j=0;i<vec1.size(),j<vec1.size();i++,j++){
| ^
a.cc:19:17: error: expected unqualified-id before 'int'
19 | for(int i=0,int j=0;i<vec2.size(),j<vec2.size();i++,j++){
| ^~~
a.cc:19:17: error: expected ';' before 'int'
19 | for(int i=0,int j=0;i<vec2.size(),j<vec2.size();i++,j++){
| ^~~
| ;
a.cc:19:52: error: expected ')' before ';' token
19 | for(int i=0,int j=0;i<vec2.size(),j<vec2.size();i++,j++){
| ~ ^
| )
a.cc:29:6: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
29 | if(sum1==1||sum2==1){
| ^~~~
| sum2
|
s373003538 | p03711 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
vector<int>vec1={1,3,5,7,8,10,12};
vector<int>vec2={4,6,9,11}
int sum1=0;
int sum2=0;
for(int i=0 int j=0;i<vec1.size() j<vec1.size();i++ j++){
if(vec1.at(i)==x&&vec.at(j)==y){
sum1++;
}
}
for(int i=0 int j=0;i<vec2.size() j<vec2.size();i++ j++){
if(vec2.at(i)==x&&vec2.at(j)==y){
sum2++;
}
}
if(sum1==1||sum2==1){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'int'
10 | int sum1=0;
| ^~~
a.cc:14:14: error: expected ';' before 'int'
14 | for(int i=0 int j=0;i<vec1.size() j<vec1.size();i++ j++){
| ^~~~
| ;
a.cc:14:36: error: expected ')' before 'j'
14 | for(int i=0 int j=0;i<vec1.size() j<vec1.size();i++ j++){
| ~ ^~
| )
a.cc:14:51: error: 'i' was not declared in this scope
14 | for(int i=0 int j=0;i<vec1.size() j<vec1.size();i++ j++){
| ^
a.cc:19:16: error: expected ';' before 'int'
19 | for(int i=0 int j=0;i<vec2.size() j<vec2.size();i++ j++){
| ^~~~
| ;
a.cc:19:38: error: expected ')' before 'j'
19 | for(int i=0 int j=0;i<vec2.size() j<vec2.size();i++ j++){
| ~ ^~
| )
a.cc:29:6: error: 'sum1' was not declared in this scope; did you mean 'sum2'?
29 | if(sum1==1||sum2==1){
| ^~~~
| sum2
|
s168160730 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int arr[12] = {-1, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int x, y;
cin >> x >> y;
cout << (arr[x] == arr[y] ? "Yes" : "No") << '\n';
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:58: error: too many initializers for 'int [12]'
8 | int arr[12] = {-1, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
| ^
|
s966637009 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll x,y;
if(x==1||x==3||x==5||x==7||x==8||x==10||x==12&&y==1||y==3||y==5||y==7||y==8||y==10||y==12) cout<<"Yes"<<endl;
else if(x==4||x==6||x==9||x==11&&y==4||y==6||y==9||y=11) cout<<"Yes"<<endl;
else if(x==2&&y==2) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:8:52: error: lvalue required as left operand of assignment
8 | else if(x==4||x==6||x==9||x==11&&y==4||y==6||y==9||y=11) cout<<"Yes"<<endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
s893212343 | p03711 | C++ | #include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x,y;
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>x>>y;
if(a[x]==a[y])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main() {
int x,y;
int a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
cin>>x>>y;
if(a[x]==a[y])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
} | a.cc:25:2: error: stray '#' in program
25 | }#include <math.h>
| ^
a.cc:25:3: error: 'include' does not name a type
25 | }#include <math.h>
| ^~~~~~~
a.cc:42:5: error: redefinition of 'int main()'
42 | int main() {
| ^~~~
a.cc:18:5: note: 'int main()' previously defined here
18 | int main() {
| ^~~~
|
s519830623 | p03711 | C++ | #include <stdio.h>
int main()
{
int a[13] = {0,1,2,1,3,1,3,1,1,3,1,3,1};
int x,y;
scanf("%d%d",&x,&y)){
printf(a[x] - a[y] ? "No" : "Yes");
printf("\n");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:20: error: expected ';' before ')' token
7 | scanf("%d%d",&x,&y)){
| ^
| ;
|
s853043821 | p03711 | C++ | int main() {
int a[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
int x, y; cin >> x >> y;
if(A[x]==A[y]){
cout<<"YES"<<endl;
}
else{cout<<"NO"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:3:12: error: 'cin' was not declared in this scope
3 | int x, y; cin >> x >> y;
| ^~~
a.cc:4:6: error: 'A' was not declared in this scope
4 | if(A[x]==A[y]){
| ^
a.cc:5:5: error: 'cout' was not declared in this scope
5 | cout<<"YES"<<endl;
| ^~~~
a.cc:5:18: error: 'endl' was not declared in this scope
5 | cout<<"YES"<<endl;
| ^~~~
a.cc:7:8: error: 'cout' was not declared in this scope
7 | else{cout<<"NO"<<endl;
| ^~~~
a.cc:7:20: error: 'endl' was not declared in this scope
7 | else{cout<<"NO"<<endl;
| ^~~~
|
s869698970 | p03711 | C++ | int main() {
int a[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; // 配列の添字は 0 から始まるので,a[0] は 0 にしている. int x, y; cin >> x >> y;
cout << (a[x] == a[y] ? "Yes" : "No") << endl;
}
| a.cc: In function 'int main()':
a.cc:3:1: error: 'cout' was not declared in this scope
3 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^~~~
a.cc:3:12: error: 'x' was not declared in this scope
3 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:3:20: error: 'y' was not declared in this scope
3 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^
a.cc:3:42: error: 'endl' was not declared in this scope
3 | cout << (a[x] == a[y] ? "Yes" : "No") << endl;
| ^~~~
|
s610510609 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
/* メモリ食い過ぎ注意 */
#define int long long
typedef long long ll;
ll gcd(ll a, ll b)
{
if (a < b)
gcd(b, a);
if (b == 0)
return a;
int r;
while ((r = a % b))
{
a = b;
b = r;
}
return b;
}
/* define const */
const ll INF = (1ll << 60);
const ll MOD = (ll)1e9 + 7;
/* end defineing */
signed main()
{
int x, y;
cin >> x >> y;
int arr[] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1};
if (a[x] == a[y])
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:36:9: error: 'a' was not declared in this scope
36 | if (a[x] == a[y])
| ^
|
s874771395 | 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;
string ans;
if(a[x]==a[y]){
ans="YES";
}
else{
ans="NO";
}
cout << ans << endl;
} | a.cc: In function 'int main()':
a.cc:4:20: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:22: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:24: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:26: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:28: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:30: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:32: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:34: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:36: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:38: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:40: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:42: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
a.cc:4:44: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
4 | vector<int> a[]={0,1,3,1,2,1,2,1,1,2,1,2,1};
| ^
|
s148582895 | p03711 | C++ | #include<bits/stdc++>
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;
string ans;
if(a[x]==a[y]){
ans="YES";
}
else{
ans="NO";
}
cout << ans << endl;
} | a.cc:1:9: fatal error: bits/stdc++: No such file or directory
1 | #include<bits/stdc++>
| ^~~~~~~~~~~~~
compilation terminated.
|
s488346624 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A==2 && B==2) cout<<"Yes";
else if(A==4||A==6||A==9||A==11){
if(B==4||B==6||B==9||B==11)cout<<"Yes";
else cout<<"No";
}
else if(A==1||A==3||A==5||A=7||A==8||A==10||A==12){
if(B==1||B==3||B==5||B==7||B==8||B==10||B==12)cout<<"Yes";
else cout<<"No";
}
else cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:12:29: error: lvalue required as left operand of assignment
12 | else if(A==1||A==3||A==5||A=7||A==8||A==10||A==12){
| ~~~~~~~~~~~~~~~~^~~
|
s062717771 | p03711 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin>>A>>B;
if(A==2 && B==2) cout<<"Yes";
else if(A==4||A==6||A==9||A==11){
if(B==4||B==6||B==9||B==11)cout<<"Yes";
else cout<<"No";
}
else if(A==1||A==3||A==5||A=7||A==8||A==10||A=12){
if(B==1||B==3||B==5||B==7||B==8||B==10||B=12)cout<<"Yes";
else cout<<"No";
}
else cout<<"Yes";
} | a.cc: In function 'int main()':
a.cc:12:47: error: lvalue required as left operand of assignment
12 | else if(A==1||A==3||A==5||A=7||A==8||A==10||A=12){
| ~~~~~~~~~~~~~~^~~
a.cc:13:45: error: lvalue required as left operand of assignment
13 | if(B==1||B==3||B==5||B==7||B==8||B==10||B=12)cout<<"Yes";
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.