submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s011208804
p03711
Java
import java.util.Scanner; public class practice{ public static void main(String arg[]){ Scanner scan=new Scanner(System.in); int x=scan.nextInt(); int y=scan.nextInt(); if(x==2){ if(y!=2){ System.out.println("No"); } else{ System.out.println("Yes"); } } else if(x==4||x==6||x==9||x==11){ if(x==4||x==6||x==9||x==11){ System.out.println("Yes"); } else{ System.out.println("No"); } } else if(x==1||x==3||x==5||x==7||x==8||x==10||x==12){ if(y==4||y==6||y==9||y==11||y==2){ System.out.println("No"); } else{ System.out.println("Yes"); } } } }
Main.java:2: error: class practice is public, should be declared in a file named practice.java public class practice{ ^ 1 error
s406728603
p03711
C
#include <stdio.h> int main() { int b[13] = {0,1,3,1,2,1,2,1,1,2,1,2,1}; int a[4]; scanf("%d%d",&a[0],&a[1]); else if (b[a[0]] == b[a[1]]) printf("Yes"); else printf("No"); }
main.c: In function 'main': main.c:8:3: error: 'else' without a previous 'if' 8 | else if (b[a[0]] == b[a[1]]) | ^~~~
s396488366
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define INF 1999999999 #define MODA 1000000007 int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; vector<int> group1 = {1, 3, 5, 7, 8, 10, 12}; vector<int> group1 = {4, 6, 9, 11}; int count1 = 0; for(int i = 0; i < group1.size(); i++) { if(group1[i] == x || group1[i] == y) { count1++; } } int count2 = 0; for(int i = 0; i < group2.size(); i++) { if(group2[i] == x || group2[i] == y) { count2++; } } if(count1 == 2 || count2 == 2) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:17: error: redeclaration of 'std::vector<int> group1' 17 | vector<int> group1 = {4, 6, 9, 11}; | ^~~~~~ a.cc:16:17: note: 'std::vector<int> group1' previously declared here 16 | vector<int> group1 = {1, 3, 5, 7, 8, 10, 12}; | ^~~~~~ a.cc:29:24: error: 'group2' was not declared in this scope; did you mean 'group1'? 29 | for(int i = 0; i < group2.size(); i++) | ^~~~~~ | group1
s121445355
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define INF 1999999999 #define MODA 1000000007 int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; vector<int> group1 = {1, 3, 5, 7, 8, 10, 12}; vector<int> group2 = {4, 6, 9, 11}; int count1 = 0; for(int i = 0; i < group1.size(); i++) { if(group1[i] == x || group1[i] == y) { count1++; } } int count2 = 0; for(int i = 0; i < group2.size(); i++) { if(group2[i] == x || group2[i] == y) { count2++; } } if(count1 == 2 || count == 2) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:37:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator==' 37 | if(count1 == 2 || count == 2) | ~~~~~~^~~~
s446392660
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define INF 1999999999 #define MODA 1000000007 int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; vector<int> group1 = {1, 3, 5, 7, 8, 10, 12}; vector<int> group1 = {4, 6, 9, 11}; int count1 = 0; for(int i = 0; i < group1.size(); i++) { if(group1[i] == x || group1[i] == y) { count1++; } } int count2 = 0; for(int i = 0; i < group2.size(); i++) { if(group2[i] == x || group2[i] == y) { count2++; } } if(count1 == 2 || count == 2) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:17: error: redeclaration of 'std::vector<int> group1' 17 | vector<int> group1 = {4, 6, 9, 11}; | ^~~~~~ a.cc:16:17: note: 'std::vector<int> group1' previously declared here 16 | vector<int> group1 = {1, 3, 5, 7, 8, 10, 12}; | ^~~~~~ a.cc:29:24: error: 'group2' was not declared in this scope; did you mean 'group1'? 29 | for(int i = 0; i < group2.size(); i++) | ^~~~~~ | group1 a.cc:37:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator==' 37 | if(count1 == 2 || count == 2) | ~~~~~~^~~~
s509043193
p03711
C++
a = [1,3,5,7,8,10,12] b = [4,6,9,11] c = [2] x,y = map(int,input().split()) ans = 'No' if x in a and y in a or x in b and y in b or x in c and y in c: ans = 'Yes' print(ans)
a.cc:5:7: warning: multi-character character constant [-Wmultichar] 5 | ans = 'No' | ^~~~ a.cc:7:11: warning: multi-character character constant [-Wmultichar] 7 | ans = 'Yes' | ^~~~~ a.cc:1:1: error: 'a' does not name a type 1 | a = [1,3,5,7,8,10,12] | ^
s701965691
p03711
C
#include<bits/stdc++.h> using namespace std; int main() { int x,y,a=1,b=1; cin >> x >> y; vector<int> A = {1,3,5,7,8,10,12}; vector<int> B = {4,6,9,11}; if(x == 2) { if(x == y) cout << "Yes" << endl; else cout << "No" << endl; } for(int i : A) { if(x == i) a = 0; if(y == i) b = 0; } if(a == b) cout << "Yes" << endl; else cout << "No" << endl; }
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s595502299
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if ((x||y)==2) cout "No"; else if ((x-1)%7%2==(y-1)%7%2) cout "Yes"; else cout "No"; }
a.cc: In function 'int main()': a.cc:7:22: error: expected ';' before string constant 7 | if ((x||y)==2) cout "No"; | ^~~~~ | ; a.cc:9:38: error: expected ';' before string constant 9 | else if ((x-1)%7%2==(y-1)%7%2) cout "Yes"; | ^~~~~~ | ; a.cc:11:12: error: expected ';' before string constant 11 | else cout "No"; | ^~~~~ | ;
s688887166
p03711
C++
#include <iostream> #include <vector> #include <string> #include <math.h> #include <algorithm> #include <set> #include <iomanip> #include <stdio.h> #include <sstream> #include <string> using namespace std; int main(void){ int x,y; cin>>x>>y; if(x==2||y==2){ cout<<"No"<<endl; }else{ if((x==1||x==3||x==5||x==7||x==8||x==10||x==12)&&(y==1||y==3||y==5||y==7||y==8||y==10||y==12)){ cout<<"Yes"<<endl; }else if((x==4||x==6||x==9||x==11)&&(y==4||y==6~~y==9||y==11)){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } } }
a.cc: In function 'int main()': a.cc:20:52: error: expected ')' before '~' token 20 | }else if((x==4||x==6||x==9||x==11)&&(y==4||y==6~~y==9||y==11)){ | ~ ^ | ) a.cc:22:6: error: expected ')' before 'else' 22 | }else{ | ^~~~ | ) a.cc:20:13: note: to match this '(' 20 | }else if((x==4||x==6||x==9||x==11)&&(y==4||y==6~~y==9||y==11)){ | ^ a.cc:25:3: error: expected primary-expression before '}' token 25 | } | ^
s510343067
p03711
C++
#include<iostream> using namespace std; int main(void) { int x,y; cin>>x>>y; int g[]={1,3,1,2,1,2,1,1,2,1,2,1}; cout<<(g[x-1]==g[y-1])?"Yes":"No"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:36: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout<<(g[x-1]==g[y-1])?"Yes":"No"<<endl; | ~~~~^~~~~~
s886136610
p03711
C++
#include <bits/stdc++.h> using namespace std; #define COUT(x) cout << #x << " = " << (x) << ", " template<class T> ostream& operator << (ostream &s, vector<T> P) { for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; } typedef long long ll; const int MOD = 1000000007; int main(){ int x,y; cin >> x >> y; if(x == 2 || y == 2){ cout << "No" << endl; }else if(x == 4 || x == 6 || x == 9){ if(y == 6 || y == 9 || y == 11) { cout << "Yes" << endl; }else { cout << "No" << endl; } }else if(x == 1|| x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12){ if(y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12){ cout << "Yes" << endl; }else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:27:4: error: expected '}' at end of input 27 | } | ^ a.cc:10:11: note: to match this '{' 10 | int main(){ | ^
s960598167
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int x, y; cin >> x >> y; if(x==2 || y==2){ if(x==y) cout << "Yes" << endl; else cout << "No" << endl; } else if(x==4 || x==6 || x==9 || x==11){ if(y==4 || y==6 || y==9 || y==11) cout << "Yes" << endl; else cout << "No" << endl; } else{ if(y==4 || y==6 || y==9 || y==11)) cout << "No" << endl; else cout << "Yes" << endl; } }
a.cc: In function 'int main()': a.cc:17:42: error: expected primary-expression before ')' token 17 | if(y==4 || y==6 || y==9 || y==11)) cout << "No" << endl; | ^
s753432893
p03711
C
1 3
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 1 3 | ^
s131214677
p03711
C++
#include <iostream using namespace std; int main () { int x,y ; cin >>x>>y ; if (x==1|| x==3|| x==5|| x==7|| x==8|| x==10|| x==12 && y==1 || y==3 || y==5|| y==7|| y==8 || y==10 || y==12 ) cout <<"Yes" ; else if ( x==4|| x==6 || x==9|| x==11 && y==4|| y==6 || y==9 || y==11) cout << "Yes" ; else if (x==2 && y==2) cout << "Yes" ; else cout <<"No" ; return 0; }
a.cc:1:19: error: missing terminating > character 1 | #include <iostream | ^
s190769891
p03711
C++
int main () { int a [] = {0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1}; // 配列の添字は 0 から始まるので,a [0] は 0 にしている. int x , y ; cin >> x >> y ; cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ; }
a.cc: In function 'int main()': a.cc:4:13: error: 'cin' was not declared in this scope 4 | int x , y ; cin >> x >> y ; | ^~~ a.cc:5:1: error: 'cout' was not declared in this scope 5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ; | ^~~~ a.cc:5:53: error: 'endl' was not declared in this scope 5 | cout << ( a [ x ] == a [ y ] ? " Yes " : " No ") << endl ; | ^~~~
s564452930
p03711
C++
#include <iostream> using namespace std; int main() { int x , y ; cin >> x >> y ; if ((x==1 || x==3 || x==5 ||x==7||x==8||x==10||x==12) && (y==1 || y==3 || y==5 ||y==7||y==8||y==10||y==12) ) cout << "Yes" ; else if ((x==4 || x==6 || x==9 ||x==11) && (y==4 ||y==6 ||y==9 || y==11)) cout << "Yes" ; else if (x==2 && y == 2) cout << "Yes" ; else cout << "No" ; return 0; } #include <iostream> using namespace std; int main() { int x , y ; cin >> x >> y ; if ((x==1 || x==3 || x==5 ||x==7||x==8||x==10||x==12) && (y==1 || y==3 || y==5 ||y==7||y==8||y==10||y==12) ) cout << "Yes" ; else if ((x==4 || x==6 || x==9 ||x==11) && (y==4 ||y==6 ||y==9 || y==11)) cout << "Yes" ; else if (x==2 && y == 2) cout << "Yes" ; else cout << "No" ; return 0; }
a.cc:26:5: error: redefinition of 'int main()' 26 | int main() | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | int main() | ^~~~
s036672469
p03711
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x,y; cin>>x>>y; vector<int> A = {1,3,5,7,8,10,12}; vector<int> B = {4,6,9,11}; vectoe<int> C = {2}; bool ok = false; for(int i=0;i<7;i++){ if(x==A.at(i)){ for(int j=0;j<7;j++){ if(y==A.at(j)){ ok = true; } } } } for(int i=0;i<4;i++){ if(x==B.at(i)){ for(int j=0;j<4;j++){ if(y==B.at(j)){ ok = true; } } } } if(ok){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'vectoe' was not declared in this scope 8 | vectoe<int> C = {2}; | ^~~~~~ a.cc:8:10: error: expected primary-expression before 'int' 8 | vectoe<int> C = {2}; | ^~~
s632581936
p03711
C++
#include<iostream> using namespace std; int main(){ int a,b,c[]={0,2,0,1,0,1,0,0,1,0,1,0} cin>>a>>b; cout<<(c[a]==c[b]?"Yes":"No")<<endl;]
a.cc: In function 'int main()': a.cc:5:3: error: expected ',' or ';' before 'cin' 5 | cin>>a>>b; | ^~~ a.cc:6:39: error: expected primary-expression before ']' token 6 | cout<<(c[a]==c[b]?"Yes":"No")<<endl;] | ^ a.cc:6:40: error: expected '}' at end of input 6 | cout<<(c[a]==c[b]?"Yes":"No")<<endl;] | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s874839438
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int H,W; cin >> H >> W; vector<string> vec(H); for(int i=0;i<H;i++){ cin >> vec.at(i); } cout << string(W+2,#) << endl; for(int i=0;i<H;i++){ cout << '#' << vec.at(i) << '#' << endl; } cout << string(W+2,'#') << endl; }
a.cc:14:22: error: stray '#' in program 14 | cout << string(W+2,#) << endl; | ^ a.cc: In function 'int main()': a.cc:14:17: error: expected primary-expression before '(' token 14 | cout << string(W+2,#) << endl; | ^ a.cc:14:23: error: expected primary-expression before ')' token 14 | cout << string(W+2,#) << endl; | ^
s997398596
p03711
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define rep2(i,s,n) for (int i = s; i < n; ++i) using namespace std; int main() { int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; int x,y; cin >> x >> y; x--; y--; if(i[x] == i[y]) cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:7:18: error: 'a' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^ a.cc:7:20: error: 'b' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^ a.cc:7:24: error: 'c' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^
s153398635
p03711
C++
#include<bits/stdc++.h> #define rep(i,n) for (int i = 0; i < n; ++i) #define rep2(i,s,n) for (int i = s; i < n; ++i) using namespace std; int main() { int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; int x,y; cin >> x >> y; if(i[x] == i[y]) cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:7:18: error: 'a' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^ a.cc:7:20: error: 'b' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^ a.cc:7:24: error: 'c' was not declared in this scope 7 | int i[12] = {a,b,a,c,a,c,a,a,c,a,c,a}; | ^
s036580233
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int x,y; cin >> x >> y; vector<int> v={0,1,3,1,2,1,2,1,1,2,1,2,1} if(v[x]==v[y]){ cout << "Yes" << endl; } else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:10:9: error: expected ',' or ';' before 'if' 10 | if(v[x]==v[y]){ | ^~ a.cc:13:9: error: 'else' without a previous 'if' 13 | else{ | ^~~~
s295859144
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,j,,k,H, W; cin>>H>>W; vector<vector<int>> data(H, vector<int>(W)); for(i=0;i<H;i++){ for(j=0;j<W;j++){ cin>>data.at(i).at(j); } } for(k=0;k<W+2;k++){ cout<<"#"; } cout<<endl; for(i=0;i<H+2;i++){ cout<<"#"; for(j=0;j<W+2;j++){ cout<<data.at(i).at(j); } cout<<"#"<<endl; } for(k=0;k<W+2;k++){ cout<<"#"; } cout<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: expected unqualified-id before ',' token 6 | int i,j,,k,H, W; | ^
s431475356
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,j,,k,H, W; vector<vector<int>> data(H, vector<int>(W)); cin>>H>>W; for(i=0;i<H;i++){ for(j=0;j<W;j++){ cin>>data.at(i).at(j); } } for(k=0;k<W+2;k++){ cout<<"#"; } cout<<endl; for(i=0;i<H+2;i++){ cout<<"#"; for(j=0;j<W+2;j++){ cout<<data.at(i).at(j); } cout<<"#"; cout<<endl; } for(k=0;k<W+2;k++){ cout<<"#"; } cout<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: expected unqualified-id before ',' token 6 | int i,j,,k,H, W; | ^
s248174988
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int i,j,H, W; vector<vector<int>> data(H+2, vector<int>(W+2)); cin>>H>>W; for(i=0;i<H+2;i++){ for(j=0;j<W+2;j++){ if(i=0||i=H+2||j=0||j=W+2){ data.at(i).at(j)="#"; } else{ cin>>data.at(i).at(j); } } } for(i=0;i<H+2;i++){ for(j=0;j<W+2;j++){ cout<<data.at(i).at(j); } cout<<endl; } }
a.cc: In function 'int main()': a.cc:15:25: error: lvalue required as left operand of assignment 15 | if(i=0||i=H+2||j=0||j=W+2){ | ~^~~ a.cc:16:26: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive] 16 | data.at(i).at(j)="#"; | ^~~ | | | const char*
s381422013
p03711
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll A,B; cin >> A >> B; vector<ll> v={0,1,3,1,2,1,2,1,1,2,1,2,1} if(v[A]==v[B]){ cout << "Yes" << endl; } else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:10:9: error: expected ',' or ';' before 'if' 10 | if(v[A]==v[B]){ | ^~ a.cc:13:9: error: 'else' without a previous 'if' 13 | else{ | ^~~~
s381062544
p03711
C++
#include <bits/stdc++.h> using namespace std; int main(){ int x, y; cin >> x >> y; vector<int> vec = {0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0}; if(vec[x] == vec[y]) cout << "Yes"; else cout << "No" }
a.cc: In function 'int main()': a.cc:8:22: error: expected ';' before '}' token 8 | else cout << "No" | ^ | ; 9 | 10 | } | ~
s624962932
p03711
C++
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; int x,y; int main() { cin>>x>>y; set<int> s1 {1, 3, 5, 7, 8, 10, 12}; set<int> s2 {4, 6, 9, 11}; if ((s1.find(x) != s1.end() && s1.find(y) != s1.end()) || (s2.find(x) != s2.end() && s2.find(y) != s2.end())) { cout<<"Yes"<<endl; } else { cout<<"No"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'set' was not declared in this scope 10 | set<int> s1 {1, 3, 5, 7, 8, 10, 12}; | ^~~ a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 5 | #include <algorithm> +++ |+#include <set> 6 | using namespace std; a.cc:10:13: error: expected primary-expression before 'int' 10 | set<int> s1 {1, 3, 5, 7, 8, 10, 12}; | ^~~ a.cc:11:13: error: expected primary-expression before 'int' 11 | set<int> s2 {4, 6, 9, 11}; | ^~~ a.cc:12:14: error: 's1' was not declared in this scope 12 | if ((s1.find(x) != s1.end() && s1.find(y) != s1.end()) || (s2.find(x) != s2.end() && s2.find(y) != s2.end())) { | ^~ a.cc:12:68: error: 's2' was not declared in this scope 12 | if ((s1.find(x) != s1.end() && s1.find(y) != s1.end()) || (s2.find(x) != s2.end() && s2.find(y) != s2.end())) { | ^~
s067845476
p03711
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); Integer h = scan.nextInt(); Integer w = scan.nextInt(); StringBuilder sb = new StringBuilder(); for(int i = 0; i < w + 2; i++) { sb.append("#"); } System.out.println(sb); for(int i = 0; i < h; i++) { sb.Clear(); sb.append("#"); sb.append(sc.next()); sb.append("#"); System.out.println(sb); } sb.Clear(); for(int i = 0; i < w + 2; i++) { sb.append("#"); } System.out.println(sb); } }
Main.java:14: error: cannot find symbol sb.Clear(); ^ symbol: method Clear() location: variable sb of type StringBuilder Main.java:16: error: cannot find symbol sb.append(sc.next()); ^ symbol: variable sc location: class Main Main.java:20: error: cannot find symbol sb.Clear(); ^ symbol: method Clear() location: variable sb of type StringBuilder 3 errors
s081611273
p03711
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); Integer h = scan.nextInt(); Integer w = scan.nextInt(); StringBuilder sb = new StringBuilder(); for(int i = 0; i < w + 2; i++) { sb.append("#") } System.out.println(sb); for(int i = 0; i < h; i++) { sb.Clear(); sb.append("#"); sb.append(sc.next()); sb.append("#"); System.out.println(sb); } sb.Clear(); for(int i = 0; i < w + 2; i++) { sb.append("#"); } System.out.println(sb); } }
Main.java:10: error: ';' expected sb.append("#") ^ 1 error
s375226211
p03711
Java
import java.util.*; class Main{ public static void main(String[] args){ Integer a[] = {1,3,5,7,8.10.12}; Integer b[] = {4,6,9,11}; Integer c[] = {2}; Scanner scan = new Scanner(System.in); Integer x = scan.nextInt(); Integer y = scan.nextInt(); Integer g1 = 0; Integer g2 = 0; if(Arrays.asList(a).contains(x)) { g1 = 1; }else if(Arrays.asList(b).contains(x)){ g1 = 2; }else{ g1 = 3; } if(Arrays.asList(a).contains(y)) { g2 = 1; }else if(Arrays.asList(b).contains(y)){ g2 = 2; }else{ g2 = 3; } if(g1==g2){ System.out.println("Yes"); }else{ System.out.println("No"); } } }
Main.java:5: error: '}' expected Integer a[] = {1,3,5,7,8.10.12}; ^ Main.java:13: error: illegal start of type if(Arrays.asList(a).contains(x)) { ^ Main.java:13: error: <identifier> expected if(Arrays.asList(a).contains(x)) { ^ Main.java:13: error: <identifier> expected if(Arrays.asList(a).contains(x)) { ^ Main.java:13: error: ';' expected if(Arrays.asList(a).contains(x)) { ^ Main.java:15: error: illegal start of type }else if(Arrays.asList(b).contains(x)){ ^ Main.java:15: error: <identifier> expected }else if(Arrays.asList(b).contains(x)){ ^ Main.java:15: error: <identifier> expected }else if(Arrays.asList(b).contains(x)){ ^ Main.java:15: error: ';' expected }else if(Arrays.asList(b).contains(x)){ ^ Main.java:17: error: illegal start of type }else{ ^ Main.java:20: error: illegal start of type if(Arrays.asList(a).contains(y)) { ^ Main.java:20: error: <identifier> expected if(Arrays.asList(a).contains(y)) { ^ Main.java:20: error: <identifier> expected if(Arrays.asList(a).contains(y)) { ^ Main.java:20: error: ';' expected if(Arrays.asList(a).contains(y)) { ^ Main.java:22: error: illegal start of type }else if(Arrays.asList(b).contains(y)){ ^ Main.java:22: error: <identifier> expected }else if(Arrays.asList(b).contains(y)){ ^ Main.java:22: error: <identifier> expected }else if(Arrays.asList(b).contains(y)){ ^ Main.java:22: error: ';' expected }else if(Arrays.asList(b).contains(y)){ ^ Main.java:24: error: illegal start of type }else{ ^ Main.java:27: error: illegal start of type if(g1==g2){ ^ Main.java:27: error: <identifier> expected if(g1==g2){ ^ Main.java:27: error: <identifier> expected if(g1==g2){ ^ Main.java:29: error: illegal start of type }else{ ^ Main.java:33: error: class, interface, enum, or record expected } ^ 24 errors
s237446200
p03711
C++
#include <iostream> #include <iomanip> #include <utility> #include <cmath> #include <random> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <string> #include <algorithm> using namespace std; #define rep(i,n) for(int i = 0; i<n; ++i) const int INF = 100100100; const int MOD = (int)1e9 + 7; typedef long long ll; int main(){ int a,b; cin >> a >> b; int s[13] = {0,1,3,1,2,1,2,1,1,2,1,2,1}; cout << ((s[a] == s[b]) ? "Yes":"No") <<endl; return 0;
a.cc: In function 'int main()': a.cc:23:60: error: expected '}' at end of input 23 | cout << ((s[a] == s[b]) ? "Yes":"No") <<endl; return 0; | ^ a.cc:20:11: note: to match this '{' 20 | int main(){ | ^
s408867377
p03711
C++
#include<bits/stdc++.h> using namespace std; int x,y,a[15],b[15],c[15]; int main(){ scanf("%d%d",&x,&y); if(x==1||x==3||x==5||x==7||x==8||x==10||x==12||){ if(y==1||y==3||y==5||y==7||y==8||y==10||y==12)printf("Yes\n"); else printf("No"); } if(x==4||x==6||x==9||x==11){ if(y==4||y==6||y==9||y==11)printf("Yes\n"); else printf("No"); } if(x==2){ if(y==2) printf("Yes\n"); else printf("No"); } return 0; }
a.cc: In function 'int main()': a.cc:6:52: error: expected primary-expression before ')' token 6 | if(x==1||x==3||x==5||x==7||x==8||x==10||x==12||){ | ^
s485393088
p03711
C++
#include<bits/stdc++.h> using namespace std; int x,y,a[15],b[15],c[15]; int main(){ scanf("%d%d",&x,&y) if(x==1||x==3||x==5||x==7||x==8||x==10||x==12||){ if(y==1||y==3||y==5||y==7||y==8||y==10||y==12)printf("Yes\n"); else printf("No"); } if(x==4||x==6||x==9||x==11){ if(y==4||y==6||y==9||y==11)printf("Yes\n"); else printf("No"); } if(x==2){ if(y==2) printf("Yes\n"); else printf("No"); } return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ';' before 'if' 5 | scanf("%d%d",&x,&y) | ^ | ; 6 | if(x==1||x==3||x==5||x==7||x==8||x==10||x==12||){ | ~~
s213528302
p03711
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a="0020101001010" 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:5:3: error: expected ',' or ';' before 'int' 5 | int x,y; | ^~~ a.cc:6:8: error: 'x' was not declared in this scope 6 | cin>>x>>y; | ^ a.cc:6:11: error: 'y' was not declared in this scope 6 | cin>>x>>y; | ^
s051697425
p03711
C++
#include<iostream> using namespace std; int a[11]={31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ int m,n; cin>>m>>n; if(a[m-1]==a[n-1]) cout<<"Yes"; else cout<<"No"; }
a.cc:3:47: error: too many initializers for 'int [11]' 3 | int a[11]={31,28,31,30,31,30,31,31,30,31,30,31}; | ^
s740814356
p03711
C++
#include<iostream> using namespace std; int a[11]={31,28,31,30,31,30,31,31,30,31,30,31}; int main(){ int m,n; cin>>m>>n; if(a[m-1]==a[n-1]) cout<<"Yes"; else cout<<"No"; }
a.cc:3:47: error: too many initializers for 'int [11]' 3 | int a[11]={31,28,31,30,31,30,31,31,30,31,30,31}; | ^
s656146138
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; vector<int> s ={-1,0,2,0,1,0,1,0,0,1,0,1,0}; if(s.at(a)==s.at(b)){ cout << "Yes"; } else{ cotu << "No"; } }
a.cc: In function 'int main()': a.cc:12:9: error: 'cotu' was not declared in this scope 12 | cotu << "No"; | ^~~~
s283531522
p03711
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; int aa = 0,bb = 0,cc = 0,dd = 0,ee = 0 ,ff = 0,gg = 0,hh = 0; cin >> a >> b; vector<int> c= {1,3,5,7,8,10,12}; vector<int> d= {4,6,9,11}; vector<int> e= {2}; for(int i = 0;i<c.size();i++){ if(c.at(i) == a) aa = 1; if(c.at(i) == b) bb = 1; } for(int i = 0;i<d.size();i++){ if(d.at(i) == a) cc = 1; if(d.at(i) == b) dd = 1; } for(int i = 0;i<e.size();i++){ if(e.at(i) == a) ee = 1; if(e.at(i) == b) ff = 1; } if(aa == 1 && bb == 1) cout << "Yes" << endl; else if(cc == 1 && dd == 1) cout << "Yes" << endl; else if(ee == 1 && ff == 1) cout << "Yes" << endl; else cout << "No" << endl; } }
a.cc:39:1: error: expected declaration before '}' token 39 | } | ^
s951352778
p03711
C++
#include <iostream> #include <string> //#include <sstream> // istringstream #include <vector> using namespace std; int Test() { int x = 0; int y = 0; std::vector<int> gr1 = { 1, 3, 5, 7, 8, 10, 12 }; // int gr1[] = { 1, 3, 5, 7, 8, 10, 12 }; std::vector<int> gr2 = { 4, 6, 9, 11 }; //int gr2[] = { 4, 6, 9, 11 }; std::vector<int> gr3 = { 2 }; //int gr3[] = { 2 }; std::vector<std::vector<int>> grp = { gr1, gr2, gr3 }; //int *grp[] = { gr1, gr2, gr3 }; cin >> x >> y; int num1 = 0; int num2 = 0; for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (x == elem){ num1 = i; break; } } } for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (y == elem){ num2 = i; break; } } } if (num1 == num2){ cout << "Yes"; } else { cout << "No"; } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s567300180
p03711
C++
#include <iostream> #include <string> //#include <sstream> // istringstream #include <vector> using namespace std; int Test() { int x = 0; int y = 0; std::vector<int> gr1 = { 1, 3, 5, 7, 8, 10, 12 }; std::vector<int> gr2 = { 4, 6, 9, 11 }; std::vector<int> gr3 = { 2 }; std::vector<std::vector<int>> grp = { gr1, gr2, gr3 }; cin >> x >> y; int num1 = 0; int num2 = 0; for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (x == elem){ num1 = i; break; } } } for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (y == elem){ num2 = i; break; } } } if (num1 == num2){ cout << "Yes"; } else { cout << "No"; } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s103008169
p03711
C++
#include <iostream> #include <string> #include <sstream> // istringstream #include <vector> using namespace std; int mai() { int x = 0; int y = 0; std::vector<int> gr1 = { 1, 3, 5, 7, 8, 10, 12 }; std::vector<int> gr2 = { 4, 6, 9, 11 }; std::vector<int> gr3 = { 2 }; std::vector<std::vector<int>> grp = { gr1, gr2, gr3 }; cin >> x >> y; int num1 = 0; int num2 = 0; for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (x == elem){ num1 = i; break; } } } for (int i = 0; i < 3; ++i){ for (auto& elem : grp[i]){ if (y == elem){ num2 = i; break; } } } if (num1 == num2){ cout << "Yes"; } else { cout << "No"; } return 0; }
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s850754589
p03711
C++
#include<iostream> using namespace std; int main(){ int x,y,a[]={0,1,3,1,2,1,2,1,1,2,1,2,1}; cin>>x>>y; cout<<a[x]==a[y] ? "Yes":"No"<<endl; }
a.cc: In function 'int main()': a.cc:6:13: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ~~~~~~~~~~^~~~~~ | | | | | int | std::basic_ostream<char> a.cc:6:13: note: candidate: 'operator==(int, int)' (built-in) 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ~~~~~~~~~~^~~~~~ a.cc:6:13: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:6:18: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:6:18: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37, from /usr/include/c++/14/ios:46: /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: candidate: 'template<class _CharT, class _Traits> bool std::operator==(const istreambuf_iterator<_CharT, _Traits>&, const istreambuf_iterator<_CharT, _Traits>&)' 234 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/14/bits/streambuf_iterator.h:234:5: note: template argument deduction/substitution failed: a.cc:6:18: note: 'std::basic_ostream<char>' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>' 6 | cout<<a[x]==a[y] ? "Yes":"No"<<endl; | ^ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/s
s972411188
p03711
C++
#include<iostream> using namespace std; int main(){ int x,y,a[]={0,1,3,1,2,1,2,1,1,2,1,2,1}; cin>>x>>y; cout<<(a[x]==a[y]) ? "Yes":"No"<<endl; }
a.cc: In function 'int main()': a.cc:6:34: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 6 | cout<<(a[x]==a[y]) ? "Yes":"No"<<endl; | ~~~~^~~~~~
s117326865
p03711
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,aq,bq; cin>>a>>b; if(a==1||a==3||a==5||a==7||a==8||a==10||a==12) a=1; if(a==4||a==6||a==9||a==11) a=2; if(a==2) a=3; if(b==1||b==3||b==5||b==7||b==8||b==10||b==12) b=1; if(b==4||b==6||b==9||b==11) b=2; if(b==2) b=3; if(a==b) cout<<"Yes"<<endl; else cout<<"No"<endl; return 0; }
a.cc: In function 'int main()': a.cc:21:27: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 21 | cout<<"No"<endl; | ~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:21:28: note: couldn't deduce template parameter '_Bi_iter' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:21:28: note: couldn't deduce template parameter '_Bi_iter' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 21 | cout<<"No"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 21 | cout<<"No"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 21 | cout<<"No"<endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:21:28: note: couldn't deduce template parameter '_CharT' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:21:28: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 21 | cout<<"No"<endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note:
s155647691
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int a[] = {0,1,3,1,2,1,2,1,1,2,1,2,1}; if(a.at(x)==a.at(y)) cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:9:14: error: request for member 'at' in 'a', which is of non-class type 'int [13]' 9 | if(a.at(x)==a.at(y)) | ^~ a.cc:9:23: error: request for member 'at' in 'a', which is of non-class type 'int [13]' 9 | if(a.at(x)==a.at(y)) | ^~
s535072547
p03711
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int x,y; int d[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; cin >> x >> y; if(d[x]==d[y])cout << "Yes" < endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:12:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | if(d[x]==d[y])cout << "Yes" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_Bi_iter' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_Bi_iter' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_CharT' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_Cha
s487519108
p03711
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) typedef long long ll; int main(){ int x,y; int d = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; cin >> x >> y; if(d[x]==d[y])cout << "Yes" < endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:10:7: error: scalar object 'd' requires one element in initializer 10 | int d = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; | ^ a.cc:12:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 12 | if(d[x]==d[y])cout << "Yes" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181, from a.cc:1: /usr/include/c++/14/bits/regex.h:1143:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)' 1143 | operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1143:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)' 1224 | operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1224:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)' 1317 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1317:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)' 1391 | operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1391:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_Bi_iter' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)' 1485 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1485:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)' 1560 | operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1560:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_Bi_iter' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)' 1660 | operator<(const sub_match<_Bi_iter>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/regex.h:1660:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::sub_match<_BiIter>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:67: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:12:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:12:33: note: couldn't deduce template parameter '_CharT' 12 | if(d[x]==d[y])cout << "Yes" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: templat
s049420427
p03711
C
#include<stdio.h> int main() { int x,y; scanf("%d%d",&x,&y); if(x==1||x==3||x==5||x==7||x==8||x==10||x==12) { if(y==1||y==3||y==5||y==7||y==8||y==10||y==12) { printf("Yes\n"); } } else if(x==4||x==6||x==9||x==11) { if(y==4||y==6||y==9||y==11) { printf("Yes\n"); } } else if(x==2) { if(y==2) { printf("No\n"); } } else { printf("No\n"); } return 0;
main.c: In function 'main': main.c:31:5: error: expected declaration or statement at end of input 31 | return 0; | ^~~~~~
s631817856
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> groupA = {1,3,5,7,8,10,12}; vector<int> groupB = {4,6,9,11}; bool same; int x,y; cin>>x>>y; for(int i=0; i<7; i++) { if (x == groupA.at(i)) { for(int j=0; j<6-i;j++) {if(y ==groupA.at(j)){same = true; break;}} } } if(!same){ for(int i=0; i<4; i++) { if (x == groupB.at(i)) { for(int j=0; j<3-i;j++) {if(y ==groupB.at(j)){same = true; break;}} } } } if(same){ cout<<Yes<<endl;} else{cout<<No<<endl;} }
a.cc: In function 'int main()': a.cc:30:9: error: 'Yes' was not declared in this scope 30 | cout<<Yes<<endl;} | ^~~ a.cc:31:14: error: 'No' was not declared in this scope 31 | else{cout<<No<<endl;} | ^~
s234840127
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> groupA(7)={1,3,5,7,8,10,12}; vector<int> groupB(4)={4,6,9,11}; bool same; int x,y; cin>>x>>y; for(int i=0; i<7; i++;) { if (x == groupA.at(i)) { for(int j=0; j<6-i;j++) {if(y ==groupA.at(j)){same = true; break;}} } } if(!same){ for(int i=0; i<4; i++;) { if (x == groupB.at(i)) { for(int j=0; j<3-i;j++) {if(y ==groupB.at(j)){same = true; break;}} } } } if(same){ cout<<Yes<<endl;} else{cout<<No<<endl;} }
a.cc: In function 'int main()': a.cc:5:24: error: expected ',' or ';' before '=' token 5 | vector<int> groupA(7)={1,3,5,7,8,10,12}; | ^ a.cc:6:24: error: expected ',' or ';' before '=' token 6 | vector<int> groupB(4)={4,6,9,11}; | ^ a.cc:11:24: error: expected ')' before ';' token 11 | for(int i=0; i<7; i++;) | ~ ^ | ) a.cc:11:25: error: expected primary-expression before ')' token 11 | for(int i=0; i<7; i++;) | ^ a.cc:20:26: error: expected ')' before ';' token 20 | for(int i=0; i<4; i++;) | ~ ^ | ) a.cc:20:27: error: expected primary-expression before ')' token 20 | for(int i=0; i<4; i++;) | ^ a.cc:30:9: error: 'Yes' was not declared in this scope 30 | cout<<Yes<<endl;} | ^~~ a.cc:31:14: error: 'No' was not declared in this scope 31 | else{cout<<No<<endl;} | ^~
s066421785
p03711
C
# -*- coding: utf-8 -*-S x,y = [int(i) for i in input().split()] """ if x == 2 or y == 2: print("No") elif x == 4 or x == 6 or x == 9 and y == 6 or y == 9 or y == 11: print("Yes") elif x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10 and y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12: print("Yes") else: print("No") """ A = [1,3,5,7,8,10,12] B = [4,6,9,11] tmp = 0 for i in range(7): if A[i] == x: for j in range(i,7): if A[j] == y: tmp = 1 for i in range(4): if A[i] == x: for j in range(i,4): if A[j] == y: tmp = 1 if tmp == 1: print("Yes") else: print("No")
main.c:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*-S | ^ main.c:2:1: warning: data definition has no type or storage class 2 | x,y = [int(i) for i in input().split()] | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:2:3: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int] 2 | x,y = [int(i) for i in input().split()] | ^ main.c:2:7: error: expected expression before '[' token 2 | x,y = [int(i) for i in input().split()] | ^ main.c:4:1: error: expected ',' or ';' before string constant 4 | """ | ^~ main.c:4:3: warning: missing terminating " character 4 | """ | ^ main.c:4:3: error: missing terminating " character main.c:9:63: error: stray '\343' in program 9 | elif x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10<U+3000>and y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12: | ^~~~~~~~ main.c:13:3: warning: missing terminating " character 13 | """ | ^ main.c:13:3: error: missing terminating " character
s470086999
p03711
C++
#include<iostream> using namespace std; int main(){ int x,y; cin>>x>>y; if(x==1&&y==1||x==3&&y==3||x==5&&y==5||x==7&&y==7||x==8&&y==8||x==10&&y==10||x==12&&y==12){ cout<<"Yes"; } else if(x==1&&y==3||x==1&&y==3||x==1&&y==5||x==1&&y==7||x==1&&y==8||x==1&&y==10||x==1&&y==12){ cout<<"Yes"; } else if(x==3&&y==1||x==3&&y==3||x==3&&y==5||x==3&&y==7||x==3&&y==8||x==3&&y==10||x==3&&y==12){ cout<<"Yes"; } else if(x==5&&y==1||x==5&&y==3||x==5&&y==5||x==5&&y==7||x==5&&y==8||x==5&&y==10||x==5&&y==12){ cout<<"Yes"; } else if(x==7&&y==1||x==7&&y==3||x==7&&y==5||x==7&&y==7||x==7&&y==8||x==7&&y==10||x==7&&y==12){ cout<<"Yes"; } else if(x==8&&y==1||x==8&&y==3||x==8&&y==5||x==8&&y==7||x==8&&y==8||x==8&&y==10||x==8&&y==12){ cout<<"Yes"; } else if(x==12&&y==1||x==12&&y==3||x==12&&y==5||x==12&&y==7||x==12&&y==8||x==12&&y==10||x==12&&y==12){ cout<<"Yes"; } else if (x==6&&y==4||x==6&&y==6||x==6&&y==9||x==6&&y==11 ){ cout<<"Yes"; } else if (x==4&&y==4||x==4&&y==6||x==4&&y==9||x==4&&y==11 ){ cout<<"Yes"; } else if (x==9&&y==4||x==9&&y==6||x==9&&y==9||x==9&&y==11 ){ cout<<"Yes"; } else if (x==11&&y==4||x==11&&y==6||x=11&&y==9||x==11&&y==11 ){ cout<<"Yes"; } else if(x==2&&y==2){ cout<<"Yes"; } else cout<<"No"; return 0; }
a.cc: In function 'int main()': a.cc:36:38: error: lvalue required as left operand of assignment 36 | else if (x==11&&y==4||x==11&&y==6||x=11&&y==9||x==11&&y==11 ){ | ~~~~~~~~~~~~~~~~~~~~~~~~^~~
s830021063
p03711
C
#include<stdio.h> int main(){ int a,b; scanf("%d%d",&a,&b); if(a==2){ a=3; }else if(a==4 || a==6 || a==9 || a==11){ a=2 }else{ a=1 } if(b==2){ b=3; }else if(b==4 || b==6 || b==9 || b==11){ b=2 }else{ b=1 } printf(a==b?"Yes":"No"); return 0;}
main.c: In function 'main': main.c:8:4: error: expected ';' before '}' token 8 | a=2 | ^ | ; 9 | }else{ | ~ main.c:10:4: error: expected ';' before '}' token 10 | a=1 | ^ | ; 11 | } | ~ main.c:15:4: error: expected ';' before '}' token 15 | b=2 | ^ | ; 16 | }else{ | ~ main.c:17:4: error: expected ';' before '}' token 17 | b=1 | ^ | ; 18 | } | ~
s243071913
p03711
C
#include<stdio.h> int main(){ int A[7] = {1, 3, 5, 7, 8, 10, 12}; int B[4] = {4, 6, 9, 11}; int C[1] = {2}; int x, y, a, b, c, i, j; scanf("%d%d", &x, &y); for(i = 1; i < 8; i++){ if(x == A[i]){ a = 1; } if(y == A[i]){ b = 1; } for(j = 1; j < 5; j++){ if(x == B[j]){ a = 2; } if(y == B[j]){ b = 2; } if(a == b || x == y){ printf("Yes"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:28:11: error: expected declaration or statement at end of input 28 | } | ^ main.c:28:11: error: expected declaration or statement at end of input
s842946894
p03711
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq priority_queue<int> #define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key))) #define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key))) signed main(){ vi A={1,3,5,7.8.10,12}; int X,Y; cin>>X>>Y; int x=3,y=3; rep(i,0,A.size()){ if(A[i]==X) x=1; if(A[i]==Y) y=1; } if(2==X) x=2; if(2==Y) y=2; string ans="No"; if(x==y) ans="Yes"; cout<<ans; }
a.cc:15:15: error: too many decimal points in number 15 | vi A={1,3,5,7.8.10,12}; | ^~~~~~ a.cc: In function 'int main()': a.cc:15:24: error: could not convert '{1, 3, 5, <expression error>, 12}' from '<brace-enclosed initializer list>' to 'std::vector<long long int>' 15 | vi A={1,3,5,7.8.10,12}; | ^ | | | <brace-enclosed initializer list>
s297216023
p03711
C++
#include <bits/stdc++.h> using namespace std; #define int long long #define rep(i,n) for(int i=0;i<n;i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define rep2(i,n) for(int i=0;i<=n;i++) #define repr(i,a,n) for(int i=a;i<n;i++) #define all(a) a.begin(),a.end() #define P pair<long long,long long> #define double long double #define INF 1e10 #define MOD 1e9+7 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; } signed main(){ vector<int> b(13)={0,1,3,1,2,1,2,1,1,2,1,2,1}; int x,y; cin>>x>>y; if(b[x]==b[y]) cout<<"Yes"; else cout<<"No"; }
a.cc: In function 'int main()': a.cc:16:18: error: expected ',' or ';' before '=' token 16 | vector<int> b(13)={0,1,3,1,2,1,2,1,1,2,1,2,1}; | ^
s693045068
p03711
C++
///スマホコーディング #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<int(n);++i) typedef long long ll; const int inf=1e9; int main(){ int x,y;cin>>x>>y; if(x==2||y==2)cout<<"No"<<endl; else{ vector<int> v={4,6,9,11}; int f=0;int f2==0; rep(i,4)if(v[i]==x)f=1; rep(i,4)if(v[i]==y)f2=1; if(f==1&&f2==1)cout<<"Yes"<<endl; else{ if(f==1||f2==1)cout<<"No"<<endl; else cout<<"Yes"<<endl; } } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: expected initializer before '==' token 12 | int f=0;int f2==0; | ^~ a.cc:14:22: error: 'f2' was not declared in this scope; did you mean 'f'? 14 | rep(i,4)if(v[i]==y)f2=1; | ^~ | f a.cc:15:12: error: 'f2' was not declared in this scope; did you mean 'f'? 15 | if(f==1&&f2==1)cout<<"Yes"<<endl; | ^~ | f
s269098255
p03711
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int x,y; cin >> x >> y; x--; y--; group[] = {1,3,1,2,1,2,1,1,2,1,2,1}; if( group[x] == group[y]){ cout << "Yes" << endl;} else{ cout << "No" << endl;} return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: 'group' was not declared in this scope 6 | group[] = {1,3,1,2,1,2,1,1,2,1,2,1}; | ^~~~~ a.cc:6:9: error: expected primary-expression before ']' token 6 | group[] = {1,3,1,2,1,2,1,1,2,1,2,1}; | ^
s449850627
p03711
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b;#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) { cout<<"Yes"; } else if(a==3&&b==3||a==3&&b==1||a==3&&b==5||a==3&&b==7||a==3&&b==8||a==3&&b==10||a==3&&b==12) { cout<<"Yes"; } else if(a==5&&b==5||a==5&&b==1||a==5&&b==3||a==5&&b==7||a==5&&b==8||a==5&&b==10||a==5&&b==12) { cout<<"Yes"; } else if(a==7&&b==7||a==7&&b==1||a==7&&b==3||a==7&&b==5||a==7&&b==8||a==7&&b==10||a==7&&b==12) { cout<<"Yes"; } else if(a==8&&b==8||a==8&&b==1||a==8&&b==3||a==8&&b==5||a==8&&b==7||a==8&&b==10||a==8&&b==12) { cout<<"Yes"; } else if(a==10&&b==10||a==10&&b==1||a==10&&b==3||a==10&&b==5||a==10&&b==7||a==10&&b==8||a==10&&b==12) { cout<<"Yes"; } else if(a==12&&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) { cout<<"Yes"; } else if(a==4&&b==4||a==4&&b==6||a==4&&b==9||a==4&&b==11) { cout<<"Yes"; } else if(a==6&&b==6||a==6&&b==4||a==6&&b==9||a==6&&b==11) { cout<<"Yes"; } else if(a==9&&b==9||a==9&&b==4||a==9&&b==6||a==9&&b==11) { cout<<"Yes"; } else if(a==11&&b==11||a==11&&b==4||a==11&&b==6||a==11&&b==9) { cout<<"Yes"; } else if(a==2&&b==2) { cout<<"Yes"; } else { cout<<"No"; } return 0; } 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) { cout<<"Yes"; } else if(a==3&&b==3||a==3&&b==1||a==3&&b==5||a==3&&b==7||a==3&&b==8||a==3&&b==10||a==3&&b==12) { cout<<"Yes"; } else if(a==5&&b==5||a==5&&b==1||a==5&&b==3||a==5&&b==7||a==5&&b==8||a==5&&b==10||a==5&&b==12) { cout<<"Yes"; } else if(a==7&&b==7||a==7&&b==1||a==7&&b==3||a==7&&b==5||a==7&&b==8||a==7&&b==10||a==7&&b==12) { cout<<"Yes"; } else if(a==8&&b==8||a==8&&b==1||a==8&&b==3||a==8&&b==5||a==8&&b==7||a==8&&b==10||a==8&&b==12) { cout<<"Yes"; } else if(a==10&&b==10||a==10&&b==1||a==10&&b==3||a==10&&b==5||a==10&&b==7||a==10&&b==8||a==10&&b==12) { cout<<"Yes"; } else if(a==12&&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) { cout<<"Yes"; } else if(a==4&&b==4||a==4&&b==6||a==4&&b==9||a==4&&b==11) { cout<<"Yes"; } else if(a==6&&b==6||a==6&&b==4||a==6&&b==9||a==6&&b==11) { cout<<"Yes"; } else if(a==9&&b==9||a==9&&b==4||a==9&&b==6||a==9&&b==11) { cout<<"Yes"; } else if(a==11&&b==11||a==11&&b==4||a==11&&b==6||a==11&&b==9) { cout<<"Yes"; } else if(a==2&&b==2) { cout<<"Yes"; } else { cout<<"No"; } return 0; }
a.cc:6:14: error: stray '#' in program 6 | cin>>a>>b;#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:6:15: error: 'include' was not declared in this scope 6 | cin>>a>>b;#include<bits/stdc++.h> | ^~~~~~~ a.cc:6:23: error: 'bits' was not declared in this scope 6 | cin>>a>>b;#include<bits/stdc++.h> | ^~~~ a.cc:6:28: error: 'stdc' was not declared in this scope; did you mean 'std'? 6 | cin>>a>>b;#include<bits/stdc++.h> | ^~~~ | std a.cc:7:1: error: expected primary-expression before 'using' 7 | using namespace std; | ^~~~~ a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 8 | int main() | ^~ a.cc:8:9: note: remove parentheses to default-initialize a variable 8 | int main() | ^~ | -- a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable a.cc:9:1: error: a function-definition is not allowed here before '{' token 9 | { | ^
s343284839
p03711
C++
#include<iostream> using namespace std; int main(){ int a, b; cin >> a >> b; int c[3][] ={ {1,3,5,7,8,10,12} ,{4,6,9,11} ,{2}}; bool ans = false; int cnt = 0; for(int i=0; i<7; i++){ if(a==c[0][i] || b==c[0][i]) cnt++; } if(cnt ==2){ cout << "Yes"; return 0; } cnt =0; for(int i=0; i<4; i++){ if(a==c[1][i] || b==c[1][i]) cnt++; } if(cnt ==2){ cout << "Yes"; return 0; } else cout << "No"; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: declaration of 'c' as multidimensional array must have bounds for all dimensions except the first 7 | int c[3][] ={ {1,3,5,7,8,10,12} | ^ a.cc:14:7: error: 'c' was not declared in this scope 14 | if(a==c[0][i] || b==c[0][i]) | ^ a.cc:23:7: error: 'c' was not declared in this scope 23 | if(a==c[1][i] || b==c[1][i]) | ^
s285867583
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x , y; cin >> x >> y; int a[] = {0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1}; cout << (a.at(x) == a.at(y) ? "Yes" : "No") << endl ; }
a.cc: In function 'int main()': a.cc:10:14: error: request for member 'at' in 'a', which is of non-class type 'int [13]' 10 | cout << (a.at(x) == a.at(y) ? "Yes" : "No") << endl ; | ^~ a.cc:10:25: error: request for member 'at' in 'a', which is of non-class type 'int [13]' 10 | cout << (a.at(x) == a.at(y) ? "Yes" : "No") << endl ; | ^~
s027440690
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int a[12] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1}; cout << (a[x]==a[y]?"Yes":"No") << endl; }
a.cc: In function 'int main()': a.cc:7:53: error: too many initializers for 'int [12]' 7 | int a[12] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1}; | ^
s378026884
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int a[12] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1} cout << (a[x]==a[y]?"Yes":"No") << endl; }
a.cc: In function 'int main()': a.cc:7:53: error: too many initializers for 'int [12]' 7 | int a[12] = {0, 1, 2, 1, 3, 1, 3, 1, 1, 3, 1, 3, 1} | ^
s973177998
p03711
C++
#include <bits/stdc++.h> using namespace std; int main() { int x,y; cin >> x >> y; if((x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 10 || x == 12) && (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12)){ cout << "Yes" << endl; } else if((x == 4 || x == 6 || x == 9 || x == 11) && (y == 4 || y == 6 || y == 9 || y == 11){ cout << "Yes" << endl; } else{ cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:12:93: error: expected ')' before '{' token 12 | else if((x == 4 || x == 6 || x == 9 || x == 11) && (y == 4 || y == 6 || y == 9 || y == 11){ | ~ ^ | ) a.cc:20:1: error: expected primary-expression before '}' token 20 | } | ^
s894253976
p03711
C++
#include <vector> #include <iostream> #include <algorithm> #include <functional> #include <string> #include <limits.h> #include <cmath> #include <queue> #include <map> #include <iomanip> #include <random> #include <fstream> #define rep(i, n) for (int i = 0; i < n; i++) #define PI 3.14159265358979323846 #define MOD 1000000007 using namespace std; using ll = long long; const int MAX = 1000000; ll fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } ll gcd(ll a, ll b) { ll r; while ((r = a % b)) { a = b; b = r; } return b; } template <class T> struct cord{ T x,y; }; template <class T> double dist(cord<T> a, cord<T> b){ T dx=a.x-b.x; T dy=a.y-b.y; return sqrt(dx*dx+dy*dy); } int main() { //cout << fixed << setprecision(10); int x,y; cin >> x >> y; vector<int> a(13)={-1,0,2,0,1,0,1,0,0,1,0,1,0}; if (a[x]==a[y]){cout << "Yes";} else {cout << "No";} return 0; }
a.cc: In function 'int main()': a.cc:69:20: error: expected ',' or ';' before '=' token 69 | vector<int> a(13)={-1,0,2,0,1,0,1,0,0,1,0,1,0}; | ^
s528680198
p03711
C
#include <stdio.h> int main(void){ int x,y; int a[] = {4,6,9,11}; int b[] = {1,3,5,7,8,10,12}; scanf("%d",&x); scanf("%d",&y); if((x=a && y=a)||(x=b && y=b)){ printf("Yes"); // }else if(x==2 || y==2){ // printf("No"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:8:17: error: lvalue required as left operand of assignment 8 | if((x=a && y=a)||(x=b && y=b)){ | ^ main.c:8:31: error: lvalue required as left operand of assignment 8 | if((x=a && y=a)||(x=b && y=b)){ | ^
s513915503
p03711
C
#include <stdio.h> int main(void){ int x,y; int a[] = {4,6,9,11}; int b[] = {1,3,5,7,8,10,12}; scanf("%d",&x); scanf("%d",&y); if((x==a[] && y==a[])||(x==b[] && y==b[])){ printf("Yes"); // }else if(x==2 || y==2){ // printf("No"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:8:14: error: expected expression before ']' token 8 | if((x==a[] && y==a[])||(x==b[] && y==b[])){ | ^ main.c:8:34: error: expected expression before ']' token 8 | if((x==a[] && y==a[])||(x==b[] && y==b[])){ | ^
s105641505
p03711
C
#include <stdio.h> int main(void){ int x,y; int a[] = {4,6,9,11} int b[] = {1,3,5,7,8,10,12} scanf("%d",&x); scanf("%d",&y); if((x==a && y==a)||(x==b && y==b)){ printf("Yes"); // }else if(x==2 || y==2){ // printf("No"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:6:3: error: expected ',' or ';' before 'int' 6 | int b[] = {1,3,5,7,8,10,12} | ^~~ main.c:8:10: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b)){ | ^~ main.c:8:18: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b)){ | ^~ main.c:8:28: error: 'b' undeclared (first use in this function) 8 | if((x==a && y==a)||(x==b && y==b)){ | ^ main.c:8:28: note: each undeclared identifier is reported only once for each function it appears in
s045170960
p03711
C
#include <stdio.h> int main(void){ int x,y; int a[] = {4,6,9,11}; int b[] = {1,3,5,7,8,10,12}; scanf("%d",&x); scanf("%d",&y); if((x==a && y==a)||(x==b && y==b){ printf("Yes"); // }else if(x==2 || y==2){ // printf("No"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:8:10: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:18: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:26: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:34: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:38: error: expected ')' before '{' token 8 | if((x==a && y==a)||(x==b && y==b){ | ~ ^ | ) main.c:17:1: error: expected expression before '}' token 17 | } | ^
s733544404
p03711
C
#include <stdio.h> int main(void){ int x,y; int a[] = {4,6,9,11} int b[] = {1,3,5,7,8,10,12} scanf("%d",&x); scanf("%d",&y); if((x==a && y==a)||(x==b && y==b){ printf("Yes"); // }else if(x==2 || y==2){ // printf("No"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:6:3: error: expected ',' or ';' before 'int' 6 | int b[] = {1,3,5,7,8,10,12} | ^~~ main.c:8:10: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:18: warning: comparison between pointer and integer 8 | if((x==a && y==a)||(x==b && y==b){ | ^~ main.c:8:28: error: 'b' undeclared (first use in this function) 8 | if((x==a && y==a)||(x==b && y==b){ | ^ main.c:8:28: note: each undeclared identifier is reported only once for each function it appears in main.c:8:38: error: expected ')' before '{' token 8 | if((x==a && y==a)||(x==b && y==b){ | ~ ^ | ) main.c:17:1: error: expected expression before '}' token 17 | } | ^
s028206187
p03711
C
#include <stdio.h> int main(void){ scanf("%d",&x); scanf("%d",&y); if(x==4,6,9,11 && y==4,6,9,11){ printf("Yes"); }else if(x!=2 && y!=2){ printf("Yes"); }else{ printf("No"); } return 0; }
main.c: In function 'main': main.c:4:15: error: 'x' undeclared (first use in this function) 4 | scanf("%d",&x); scanf("%d",&y); | ^ main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in main.c:4:31: error: 'y' undeclared (first use in this function) 4 | scanf("%d",&x); scanf("%d",&y); | ^
s232197226
p03711
C++
#include <bits/stdc++.h> #define rep(var,cnt) for(int (var)=0; (var)<(int)(cnt); ++(var)) #define Rep(var,init,cnt) for(int (var)=(init); (var)<(cnt); ++(var)) #define ran(var,vec) for(auto &(var):(vec)) #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define SORT(v) sort(all(v)) #define RSORT(v) sort(rall(v)) #define SUM(v) accumulate(all(v),0) #define tget(tp,idx) get<idx>(tp) #define TF(flag) (flag)?1:0 using namespace std; using ll = long long; using ull = unsigned long long; using pi = pair<int,int>; using pl = pair<ll,ll>; using ti = tuple<int,int,int>; using tl = tuple<ll,ll,ll>; template<typename T> using vec = vector<T>; template<typename T> using mat = vector<vec<T>>; template<typename T> using cub = vector<mat<T>>; template<typename T> using val = valarray<T>; template<typename T> using pq = priority_queue<T>; template<typename T> using rpq = priority_queue<T,vec<T>,greater<T>>; template<typename T1,typename T2> ostream &operator<<(ostream &os, const pair<T1,T2> &p){ os<<"P("<<p.first<<", "<<p.second<<") "; return os; } template<typename T1,typename T2> istream &operator>>(istream &is, pair<T1,T2> &p){ is>>p.first>>p.second; return is; } template<typename T> ostream &operator<<(ostream &os, const vector<T> &v){ cout<<"V{"; for(int i=0; i<(int)v.size(); ++i){ os<<v[i]<<(i+1!=v.size()?" ":""); } cout<<"}"; return os; } template<typename T> istream &operator>>(istream &is, vector<T> &v){ for(T &in:v) is>>in; return is; } template<typename T> ostream &operator<<(ostream &os, const valarray<T> &v){ cout<<"V{"; for(int i=0; i<(int)v.size(); ++i){ os<<v[i]<<(i+1!=v.size()?" ":""); } cout<<"}"; return os; } template<typename T> istream &operator>>(istream &is, valarray<T> &v){ for(T &in:v) is>>in; return is; } // Usual Template End ================================================ // Template End ====================================================== constexpr int MOD=1e9+7; int main(void){ vec<int> g{1,0,1,2,1,2,1,1,2,1,2,1}; cin>>x>>y; if(g[x-1]==g[y-1]) cout<<"Yes"<<endl; else cout<<"No"<<endl; }
a.cc: In function 'int main()': a.cc:87:8: error: 'x' was not declared in this scope 87 | cin>>x>>y; | ^ a.cc:87:11: error: 'y' was not declared in this scope 87 | cin>>x>>y; | ^
s644171552
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; return 0; }
a.cc: In function 'int main()': a.cc:7:41: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (a[x] == a[y]) ? "Yes" : "No" << endl; | ~~~~~^~~~~~~
s637999106
p03711
C++
#include <iostream> int main(){char c[]="0131212112121";int a,b;std::cin>>a>>b;std::cout<<(c[b]-c[a]:"No":"Yes");}
a.cc: In function 'int main()': a.cc:2:81: error: expected ')' before ':' token 2 | int main(){char c[]="0131212112121";int a,b;std::cin>>a>>b;std::cout<<(c[b]-c[a]:"No":"Yes");} | ~ ^ | )
s828420912
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}; int x, y; cin >> x >> y; if(a[x] == a[y]) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:7: error: scalar object 'a' requires one element in initializer 5 | int a = {0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0}; | ^
s154091643
p03711
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // first省略 #define se second // second省略 #define itn int // int誤字保険 #define count cout // cout誤字保険 #define vecotr vector // vector誤字保険 #define ednl endl // endl誤字保険 #define opt() cin.tie(0); ios::sync_with_stdio(false) // 入出力速度改善 #define rep(i,l,r) for(ll i=(l);i<(r);i++) // 範囲[l, r)で刻み1のfor文(順方向) #define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k)) // 範囲[l, r)で刻みkのfor文(順方向) #define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--) // 範囲[l, r)で刻み1のfor文(逆方向) #define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k)) // 範囲[l, r)で刻みkのfor文(逆方向) #define all(x) (x).begin(), (x).end() // vectorのポインタ位置指定用 #define max(p,q)((p)>(q)?(p):(q)) // max拡張 #define min(p,q)((p)<(q)?(p):(q)) // min拡張 #define bit(n,m)(((n)>>(m))&1) // 変数nのm番目のbitを取り出す 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; } int dy[]={0, 1, 0, -1}; // 4方向近傍 int dx[]={1, 0, -1, 0}; // 4方向近傍 //union-find const int N_MAX = 10000; ll par[N_MAX]; ll rnk[N_MAX]; void init(ll n){ rep(i,0,n){ par[i] = i; rnk[i] = 1;} } ll find(ll x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(ll x, ll y){ x = find(x); y = find(y); if(rnk[x] < rnk[y]){ par[x] = y; }else{ par[y] = x; if(rnk[x] == rnk[y]) rnk[x]++ } } bool same(ll x, ll y){ return find(x) == find(y); } int main(){ ll x, y; cin>>x>>y; x--; y--; init(12); unite(0,2); unite(2,4); unite(4,6); unite(6,7); unite(7,9); unite(9,11); unite(3,5); unite(5,8); unite(8,10); cout << (same(x,y) ? "Yes" : "No") << ednl; }
a.cc: In function 'void unite(long long int, long long int)': a.cc:41:38: error: expected ';' before '}' token 41 | if(rnk[x] == rnk[y]) rnk[x]++ | ^ | ; 42 | } | ~
s725959024
p03711
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // first省略 #define se second // second省略 #define itn int // int誤字保険 #define count cout // cout誤字保険 #define vecotr vector // vector誤字保険 #define ednl endl // endl誤字保険 #define opt() cin.tie(0); ios::sync_with_stdio(false) // 入出力速度改善 #define rep(i,l,r) for(ll i=(l);i<(r);i++) // 範囲[l, r)で刻み1のfor文(順方向) #define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k)) // 範囲[l, r)で刻みkのfor文(順方向) #define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--) // 範囲[l, r)で刻み1のfor文(逆方向) #define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k)) // 範囲[l, r)で刻みkのfor文(逆方向) #define all(x) (x).begin(), (x).end() // vectorのポインタ位置指定用 #define max(p,q)((p)>(q)?(p):(q)) // max拡張 #define min(p,q)((p)<(q)?(p):(q)) // min拡張 #define bit(n,m)(((n)>>(m))&1) // 変数nのm番目のbitを取り出す 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; } int dy[]={0, 1, 0, -1}; // 4方向近傍 int dx[]={1, 0, -1, 0}; // 4方向近傍 //union-find const int N_MAX = 10000; ll par[N_MAX]; ll rnk[N_MAX]; void init(ll n){ rep(i,0,n){ par[i] = i; rnk[i] = 1;} } ll find(ll x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(ll x, ll y){ x = find(x); y = find(y); if(rnk[x] < rnk[y]){ par[x] = y; }else{ par[y] = x; if(rnk[x] == rnk[y]) rnk[x]++ } } bool same(ll x, ll y){ return find(x) == find(y); } int main(){ ll x, y; cin>>x>>y; x--; y--; init(12); unite(1,3); unite(3,5); unite(5,7); unite(7,8); unite(8,10); unite(10,12); unite(4,6); unite(6,9); unite(9,11); cout << (same(x,y) ? "Yes" : "No") << ednl; }
a.cc: In function 'void unite(long long int, long long int)': a.cc:41:38: error: expected ';' before '}' token 41 | if(rnk[x] == rnk[y]) rnk[x]++ | ^ | ; 42 | } | ~
s482621813
p03711
C++
#include<bits/stdc++.h> using namespace std; #define ll long long // long long省略 #define pb push_back // push_back省略 #define mp make_pair // make_pair省略 #define fi first // first省略 #define se second // second省略 #define itn int // int誤字保険 #define count cout // cout誤字保険 #define vecotr vector // vector誤字保険 #define ednl endl // endl誤字保険 #define opt() cin.tie(0); ios::sync_with_stdio(false) // 入出力速度改善 #define rep(i,l,r) for(ll i=(l);i<(r);i++) // 範囲[l, r)で刻み1のfor文(順方向) #define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k)) // 範囲[l, r)で刻みkのfor文(順方向) #define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--) // 範囲[l, r)で刻み1のfor文(逆方向) #define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k)) // 範囲[l, r)で刻みkのfor文(逆方向) #define all(x) (x).begin(), (x).end() // vectorのポインタ位置指定用 #define max(p,q)((p)>(q)?(p):(q)) // max拡張 #define min(p,q)((p)<(q)?(p):(q)) // min拡張 #define bit(n,m)(((n)>>(m))&1) // 変数nのm番目のbitを取り出す 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; } int dy[]={0, 1, 0, -1}; // 4方向近傍 int dx[]={1, 0, -1, 0}; // 4方向近傍 //union-find const int N_MAX = 10e9; ll par[N_MAX]; ll rnk[N_MAX]; void init(ll n){ rep(i,0,n){ par[i] = i; rnk[i] = 1;} } ll find(ll x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(ll x, ll y){ x = find(x); y = find(y); if(rnk[x] < rnk[y]){ par[x] = y; }else{ par[y] = x; if(rnk[x] == rnk[y]) rnk[x]++ } } bool same(ll x, ll y){ return find(x) == find(y); } int main(){ ll x, y; cin>>x>>y; x--; y--; init(12); unite(1,3); unite(3,5); unite(5,7); unite(7,8); unite(8,10); unite(10,12); unite(4,6); unite(6,9); unite(9,11); cout << (same(x,y) ? "Yes" : "No") << ednl; }
a.cc:30:19: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+10' to '2147483647' [-Woverflow] 30 | const int N_MAX = 10e9; | ^~~~ a.cc:31:8: error: size of array 'par' exceeds maximum object size '9223372036854775807' 31 | ll par[N_MAX]; | ^~~~~ a.cc:32:8: error: size of array 'rnk' exceeds maximum object size '9223372036854775807' 32 | ll rnk[N_MAX]; | ^~~~~ a.cc: In function 'void unite(long long int, long long int)': a.cc:41:38: error: expected ';' before '}' token 41 | if(rnk[x] == rnk[y]) rnk[x]++ | ^ | ; 42 | } | ~
s407941397
p03711
C++
//自称高知能系Vtuberの高井茅乃です。 //Twitter: https://twitter.com/takaichino //YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw #include <bits/stdc++.h> using namespace std; typedef long long ll; #define INF 1999999999 #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define MODA 1000000007 int main() { int ans = 0; int tmp; int y,x; int m[12] = { 1, 9, 1,0,1,0,1,1,0,1,0,1} cin >> x >> y; if (m[y]==m[x] ) cout << "Yes" << endl; else cout << "No" << endl; //cout << ans << endl; }
a.cc: In function 'int main()': a.cc:19:5: error: expected ',' or ';' before 'cin' 19 | cin >> x >> y; | ^~~
s938062935
p03711
C++
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a==2&&b==2) { cout<<"Yes"<<endl; } else if((a==1||a==3||a==5||a==7||a==8||a==10||a==12)&&a==1||(b==3||b==5||b==7||b==8||b==10||b==12)) { cout<<"Yes"<<endl; } else if(a==4||a==6||a==9||a==11)&&(b==4||b==6||b==9||b==11) { cout<<"Yes"<<endl; } else { cout<<"No"<<endl; } }
a.cc: In function 'int main()': a.cc:15:37: error: expected identifier before '(' token 15 | else if(a==4||a==6||a==9||a==11)&&(b==4||b==6||b==9||b==11) | ^
s983061729
p03711
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int main(){ int x,y cin>>x>>y; if((x==1||x==3||x==5||x==7||x==8||x==10)&&(y==3||y==5||y==7||y==8||y==10||y==12)){ cout<<"Yes"; }else if((x==4||x==6||x==9||x==11)&&(y==6||y==9||y==11)){ cout<<"Yes"; }else{ cout<<"No"; } return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: expected initializer before 'cin' 6 | cin>>x>>y; | ^~~ a.cc:7:48: error: 'y' was not declared in this scope 7 | if((x==1||x==3||x==5||x==7||x==8||x==10)&&(y==3||y==5||y==7||y==8||y==10||y==12)){ | ^
s000744836
p03711
C++
(display (if (or (= (modulo (read) 10) 2) (= (modulo (read) 10) 2)) "Yes" "No") )
a.cc:1:9: error: expected ')' before '(' token 1 | (display (if (or (= (modulo (read) 10) 2) | ~ ^~ | )
s216381093
p03711
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> using namespace std; int main() { int s[] = {{0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1}; int x, y; cin >> x >> y; cout << (s[x] == s[y] ? "Yes" : "No") << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:67: error: expected '}' before ';' token 12 | int s[] = {{0 , 1 , 3 , 1 , 2 , 1 , 2 , 1 , 1 , 2 , 1 , 2 , 1}; | ~ ^ a.cc:12:67: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization
s250271029
p03711
C++
#include <bits/stdc++.h> using namespace std; struct UnionFind { vector<int> data; int sz; UnionFind(int _sz) : data(_sz, -1), sz(_sz) { } bool unionSet(int x, int y) { if ((x = root(x)) == (y = root(y))) return false; if (data[x] > data[y]) swap(x, y); data[x] += data[y]; data[y] = x; sz--; return true; } bool findSet(int x, int y) { return root(x) == root(y); } int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); } int size(int x) { return -data[root(x)]; } int size() { return sz; } }; int main(){ int a, b; cin >> a >> b; UnionFind uf(12); uf.unionSet(0, 2); uf.unionSet(2, 4); uf.unionSet(4, 6); uf.unionSet(6, 7); uf.unionSet(7, 9); uf.unionSet(9, 11); uf.unionSet(3, 5); uf.unionSet(5, 8); uf.unionSet(8, 10); if(findSet(a, b))cout << "Yes" << endl; else cout << "No" << endl; return 0; }
a.cc: In function 'int main()': a.cc:34:8: error: 'findSet' was not declared in this scope 34 | if(findSet(a, b))cout << "Yes" << endl; | ^~~~~~~
s335469199
p03711
C++
#include<iostream> #include<string> using namespace std; int main() { int x, y, a, b; cin >> x >> y; if (x == 2) { a = 1; } else if (x == 4 || x == 6 || x = 9 || x == 11) { a = 2; } else if (x == 1 || x == 3 || x == 5 || x == 7 || x == 8 || x == 12) { a = 3; } if (y == 2) { b = 1; } else if (y == 4 || y == 6 || y = 9 || y == 11) { b = 2; } else if (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 12) { b = 3; } if (a == b) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:35: error: lvalue required as left operand of assignment 10 | else if (x == 4 || x == 6 || x = 9 || x == 11) { | ~~~~~~~~~~~~~~~~~^~~~ a.cc:21:35: error: lvalue required as left operand of assignment 21 | else if (y == 4 || y == 6 || y = 9 || y == 11) { | ~~~~~~~~~~~~~~~~~^~~~
s172729063
p03711
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; cin >> a >>b; string ans ="Yes"; int g[7] = {1,3,5,7,8,10,12}; int g2[4] = {4,6,9,11}; if(a == 2||b==2) ans = "No"; else{ bool aflag = bflag = false; for(int i = 0;i < 7;i++ ){ if(a == g[i]) aflag = true; } for(int i = 0;i < 4;i++){ if(b == g2[i]) bflag = true; } if(aflag&bflag) ans = "No"; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:13:18: error: 'bflag' was not declared in this scope; did you mean 'aflag'? 13 | bool aflag = bflag = false; | ^~~~~ | aflag
s664345962
p03711
C++
#include<iostream> #include<string> using namespace std; int main(){ int a,b; cin >> a >>b; string ans ="Yes"; int g[7] = [1,3,5,7,8,10,12]; int g2[4] = [4,6,9,11]; if(a == 2||b==2) ans = "No"; else{ bool aflag = bflag = false; for(int i = 0;i < 7;i++ ){ if(a == g[i]) aflag = true; } for(int i = 0;i < 4;i++){ if(b == g2[i]) bflag = true; } if(aflag&bflag) ans = "No"; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:15: error: expected identifier before numeric constant 9 | int g[7] = [1,3,5,7,8,10,12]; | ^ a.cc:9:16: error: expected ']' before ',' token 9 | int g[7] = [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: array must be initialized with a brace-enclosed initializer 9 | int g[7] = [1,3,5,7,8,10,12]; | ^~ a.cc:9:17: error: expected unqualified-id before numeric constant 9 | int g[7] = [1,3,5,7,8,10,12]; | ^ a.cc:10:16: error: expected identifier before numeric constant 10 | int g2[4] = [4,6,9,11]; | ^ a.cc:10:17: error: expected ']' before ',' token 10 | int g2[4] = [4,6,9,11]; | ^ | ] a.cc: In lambda function: a.cc:10:17: error: expected '{' before ',' token a.cc: In function 'int main()': a.cc:10:15: error: array must be initialized with a brace-enclosed initializer 10 | int g2[4] = [4,6,9,11]; | ^~ a.cc:10:18: error: expected unqualified-id before numeric constant 10 | int g2[4] = [4,6,9,11]; | ^ a.cc:13:18: error: 'bflag' was not declared in this scope; did you mean 'aflag'? 13 | bool aflag = bflag = false; | ^~~~~ | aflag
s111868242
p03711
C++
#include <bits/stdc++.h> using namespace std; int main () { int x, y; cin >> x >> y; if (((x>0&&x<=7&&x%2==1)||(x>7&&x<=12&&x%2==0)) x==25; else if ((x==4||x==6||x==9||x==11) x=50; else if (x==2) x=100; else if((y>0&&y<=7&&y%2==1)||(7>0&&y<=12&&y%2==0)) y=25; else if(y==4||y==6||y==9||y==11)) y=50; else if(y==2) y=100; if(x==y) cout<<"Yes"<< endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:7:56: error: expected ';' before 'x' 7 | if (((x>0&&x<=7&&x%2==1)||(x>7&&x<=12&&x%2==0)) x==25; | ^~ | ; a.cc:8:9: error: expected primary-expression before 'else' 8 | else if ((x==4||x==6||x==9||x==11) x=50; | ^~~~ a.cc:7:63: error: expected ')' before 'else' 7 | if (((x>0&&x<=7&&x%2==1)||(x>7&&x<=12&&x%2==0)) x==25; | ~ ^ | ) 8 | else if ((x==4||x==6||x==9||x==11) x=50; | ~~~~ a.cc:12:41: error: expected primary-expression before ')' token 12 | else if(y==4||y==6||y==9||y==11)) y=50; | ^
s057530947
p03711
C++
#include <bits/stdc++.h> using namespace std; int a,b,c,x,y; int main () { a=1,3,5,7,8,10,12; b=4,6,9,11; c=12; cin >> x>> y; if (x==a && y=a) { cout << "Yes" << endl; } else if (x==b && y==b) { cout << "Yes" << endl; } else if (x==c && y==c) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
a.cc: In function 'int main()': a.cc:9:10: error: lvalue required as left operand of assignment 9 | if (x==a && y=a) { | ~~~~~^~~~
s337436921
p03711
C++
#include <bits/stdc++.h> #include <ctype.h> using namespace std; int main() { int x,y; char Xs,Ys; cin >> x >> y ; vector<int> A{1,3,7,8,10,12}; vector<int> B {4,6,9,11}; vector<int> C{2}; for(int i=0;i<A.size();i++){ if(x == A.at(i)) Xs = 'A'; if(Y == A.at(i)) Ys = 'A'; } for(int i=0;i<B.size();i++){ if (x == B.at(i)) Xs = 'B'; if(y == B.at(i)) Ys ='B'; } if(x == 2) Xs = 'C'; if(y == 2) Ys = 'C'; if(Xs == Ys)cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:14:4: error: 'Y' was not declared in this scope 14 | if(Y == A.at(i)) Ys = 'A'; | ^
s709292247
p03711
C++
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <algorithm> // sort #include <iomanip> #define REP(i, n) for (long long i = 0; i < (n); i++) typedef long long ll; static const ll MOD = 1000000007; static const ll INF = 1000000000000000000LL; using namespace std; int main(){ // std::ifstream in("input.txt"); // std::cin.rdbuf(in.rdbuf()); int x,y; cin >> x >> y; string res; int list[] = {1,3,5,7,8,10,12}; bool flg1 = false; bool flg2 = false; if(x == 2 || y == 2) { res = "No"; } else { REP(i,7 { if(x == list[i])flg1 = true; } REP(i,7) { if(x == list[i])flg2 = true; } if(flg1 == flg2) { res = "Yes"; } else { res = "No"; } } cout << res << endl; return 0; }
a.cc:54:2: error: unterminated argument list invoking macro "REP" 54 | } | ^ a.cc: In function 'int main()': a.cc:32:9: error: 'REP' was not declared in this scope 32 | REP(i,7 | ^~~ a.cc:32:12: error: expected '}' at end of input 32 | REP(i,7 | ^ a.cc:31:5: note: to match this '{' 31 | { | ^ a.cc:32:12: error: expected '}' at end of input 32 | REP(i,7 | ^ a.cc:14:11: note: to match this '{' 14 | int main(){ | ^
s898704814
p03711
C++
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <algorithm> // sort #include <iomanip> #define REP(i, n) for (long long i = 0; i < (n); i++) typedef long long ll; static const ll MOD = 1000000007; static const ll INF = 1000000000000000000LL; using namespace std; int main(){ // std::ifstream in("input.txt"); // std::cin.rdbuf(in.rdbuf()); int x,y; cin >> x >> y; string res; int list[] = {1,3,5,7,8,10,12}; bool flg1 = false; bool flg2 = false; if(x == 2 || y == 2) { res = "No"; } else { REP(i,list.size()) { if(x == list[i])flg1 = true; } REP(i,list.size()) { if(x == list[i])flg2 = true; } if(flg1 == flg2) { res = "Yes"; } else { res = "No"; } } cout << res << endl; return 0; }
a.cc: In function 'int main()': a.cc:32:20: error: request for member 'size' in 'list', which is of non-class type 'int [7]' 32 | REP(i,list.size()) | ^~~~ a.cc:8:46: note: in definition of macro 'REP' 8 | #define REP(i, n) for (long long i = 0; i < (n); i++) | ^ a.cc:36:20: error: request for member 'size' in 'list', which is of non-class type 'int [7]' 36 | REP(i,list.size()) | ^~~~ a.cc:8:46: note: in definition of macro 'REP' 8 | #define REP(i, n) for (long long i = 0; i < (n); i++) | ^
s964703300
p03711
C++
#include <bits/stdc++.h> #include <ctype.h> using namespace std; int main() { int x,y; char Xs,Ys; cin >> x >> y ; vector<int> A{1,3,7,8,10,12}; vector<int> B {4,6,9,11}; vector<int> C{2}; for(int i=0;i<A.size();i++){ if(x == A.at(i)) Xs == 'A'; if(Y == A.at(i)) Ys == 'A'; } for(int i=0;i<B.size();i++){ if (x == B.at(i)) Xs == 'B'; if(y == B.at(i)) Ys == 'B'; } if(Xs == Ys)cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:14:4: error: 'Y' was not declared in this scope 14 | if(Y == A.at(i)) Ys == 'A'; | ^
s333839424
p03711
C++
#include<iostream> #define size(array) (sizeof(array) / sizeof(array[0])) using namespace std; int main(void){ int a = 3,b = 3; cin >> a >> b; int dai[] = {1,3,5,7,8,10,12} int shou[] = {4,6,9,11} for(int i =0;i < size(dai);i++){ if(dai[i] == a){ a = 1; }else if(dai[i] == b){ b = 1; } } for(int i =0;i < size(shou);i++){ if(shou[i] == a){ a = 2; }else if(shou[i] == b){ b = 2; } } if(a == b){ cout << "Yes" << endl; }else{ cout << "No" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'int' 8 | int shou[] = {4,6,9,11} | ^~~ a.cc:16:25: error: 'shou' was not declared in this scope 16 | for(int i =0;i < size(shou);i++){ | ^~~~ a.cc:2:29: note: in definition of macro 'size' 2 | #define size(array) (sizeof(array) / sizeof(array[0])) | ^~~~~ a.cc: At global scope: a.cc:30:3: error: expected unqualified-id before 'return' 30 | return 0; | ^~~~~~ a.cc:31:1: error: expected declaration before '}' token 31 | } | ^
s383429745
p03711
C++
#include<iostream> using namespace std; int main(void){ int a,b; cin >> a >> b; int dai[] = {1,3,5,7,8,10,12} int shou[] = {4,6,9,11} for(int i =0;i < dai.size();i++){ if(dai[i] == a){ a = 1; }else if(shou[i] == a){ a = 2; }else{ a = 3; } if(dai[i] == b){ b = 1; }else if(shou[i] == b){ b = 2; }else{ b = 3; } if(a == b){ cout << "Yes" << endl; }else{ cout << "No" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'int' 7 | int shou[] = {4,6,9,11} | ^~~ a.cc:8:24: error: request for member 'size' in 'dai', which is of non-class type 'int [7]' 8 | for(int i =0;i < dai.size();i++){ | ^~~~ a.cc:11:14: error: 'shou' was not declared in this scope 11 | }else if(shou[i] == a){ | ^~~~ a.cc:18:14: error: 'shou' was not declared in this scope 18 | }else if(shou[i] == b){ | ^~~~
s699325760
p03711
C++
int main(){ int x,y; cin >> x >> y; int zx,zy; if(x==4||x==6||x==9||x==11){ zx=0; }else if(x==2){ zx=3; }else{ zx=2; } if(y==4||y==6||y==9||y==11){ zy=0; }else if(x==2){ zy=1; }else{ zy=2; } if(zx==zy){ cout << "Yes" << endl; }else{ cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> x >> y; | ^~~ a.cc:20:5: error: 'cout' was not declared in this scope 20 | cout << "Yes" << endl; | ^~~~ a.cc:20:22: error: 'endl' was not declared in this scope 20 | cout << "Yes" << endl; | ^~~~ a.cc:22:5: error: 'cout' was not declared in this scope 22 | cout << "No" <<endl; | ^~~~ a.cc:22:20: error: 'endl' was not declared in this scope 22 | cout << "No" <<endl; | ^~~~
s075089192
p03711
C++
int main(){ int x,y; cin >> x >> y; int zx,zy; if(x==4||x==6||x==9||x==11){ zx=0; }else if(x==2){ zx=0; }else{ zx=2; } if(y==4||y==6||y==9||y==11){ zy=0; }else if(x==2){ zy=1; }else{ zy=2; } if(zx==zy){ cout << "Yes" << endl; }else{ cout << "No" <<endl; } }
a.cc: In function 'int main()': a.cc:3:3: error: 'cin' was not declared in this scope 3 | cin >> x >> y; | ^~~ a.cc:20:5: error: 'cout' was not declared in this scope 20 | cout << "Yes" << endl; | ^~~~ a.cc:20:22: error: 'endl' was not declared in this scope 20 | cout << "Yes" << endl; | ^~~~ a.cc:22:5: error: 'cout' was not declared in this scope 22 | cout << "No" <<endl; | ^~~~ a.cc:22:20: error: 'endl' was not declared in this scope 22 | cout << "No" <<endl; | ^~~~
s842159630
p03711
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a, b ,c; char X,Y; string S1,S2,S3; int A[] = {0,1,3,1,2,1,2,1,1,2,1,2,1} cin >>a >> b ; if(A[a] == A[b]) cout << "Yes" << endl; else cout << "No" << endl; }
a.cc: In function 'int main()': a.cc:8:5: error: expected ',' or ';' before 'cin' 8 | cin >>a >> b ; | ^~~
s017598318
p03711
C++
#include <bits/stdc++.h> #include <stdio.h> #include<iostream> #include<cstdio> #include<bitset> #include<algorithm> #include<vector> #include<list> #include<queue> #include<stack> #include<string> #include<string.h> #include<cmath> #include<utility> #include<functional> #include<map> #include<set> #include<cctype> #include<fstream> #include <numeric> #include <iomanip> #include <cstring> using namespace std; using ll=long long; #define FOR(i, a, b) for( long long int i=(a);i<=(b);i++) #define RFOR(i, a, b) for(long long int i=(a);i>=(b);i--) #define MOD 1000000007 #define LLONG_MAXs 9223372036854775800 #define ALL(a) (a).begin(),(a).end() #include <iostream> #include <cmath> using namespace std; bool isPrimeNum( ll x ){ // 素数である場合 true を返す if( x <= 1 ){ // 1以下である場合は素数でないことがすぐにわかる return false; } // sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト int n = (int)sqrt( (double)x ); for( int i = 2; i <= n; i++ ){ if( x % i == 0 ){ // 割り切る整数がある場合、即判定終了 return false; } } return true; // 割り切る整数がない場合、素数である } ll myPow(ll x, ll n, ll m){ if(n == 0) return 1; if(n % 2 == 0) return myPow(x * x % m, n / 2, m); else return x * myPow(x, n - 1, m) % m; } constexpr ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} constexpr ll lcm(ll a,ll b){return a*b/gcd(a,b);} constexpr ll abs(ll a,ll b){ if(a>=b)return a-b; if(a<b)return b-a; } constexpr double dabs(double a,double b){ if(a>=b)return a-b; if(a<b)return b-a; } constexpr ll min(ll a,ll b){ if(a>=b)return b; if(a<b)return a; } constexpr ll max(ll a,ll b){ if(a>=b)return a; if(a<b)return b; } int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; class UnionFind { public: //親の番号を格納する。親だった場合は-(その集合のサイズ) vector<int> Parent; //作るときはParentの値を全て-1にする //こうすると全てバラバラになる UnionFind(int N) { Parent = vector<int>(N, -1); } //Aがどのグループに属しているか調べる int root(int A) { if (Parent[A] < 0) return A; return Parent[A] = root(Parent[A]); } //自分のいるグループの頂点数を調べる int size(int A) { return -Parent[root(A)];//親をとってきたい] } //AとBをくっ付ける bool connect(int A, int B) { //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける A = root(A); B = root(B); if (A == B) { //すでにくっついてるからくっ付けない return false; } //大きい方(A)に小さいほう(B)をくっ付けたい //大小が逆だったらひっくり返しちゃう。 if (size(A) < size(B)) swap(A, B); //Aのサイズを更新する Parent[A] += Parent[B]; //Bの親をAに変更する Parent[B] = A; return true; } }; long long fac[510000], finv[510000], inv[510000]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < 510000; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k){ if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } long long modinv(long long a, long long m) { long long b = m, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } u %= m; if (u < 0) u += m; return u; } string replaceAll(string &replacedStr, string from, string to) { unsigned int pos = replacedStr.find(from); int toLen = to.length(); if (from.empty()) { return replacedStr; } while ((pos = replacedStr.find(from, pos)) != std::string::npos) { replacedStr.replace(pos, from.length(), to); pos += toLen; } return replacedStr; } void yn(bool flag) { if(flag){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; } return; } void YN(bool flag) { if(flag){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } return; } std::vector<int> enum_div(int n)//nの約数を列挙 { std::vector<int> ret; for(int i=1 ; i*i<=n ; ++i) { if(n%i == 0) { ret.push_back(i); if(i!=1 && i*i!=n) { ret.push_back(n/i); } } } ret.push_back(n); return ret; } void Ssort(int no, char *month[]){ int i, j; char *temp; for(i=0; i<no; i++){ for(j=i+1; j<no; j++){ if(strcmp((month[i]),(month[j]))>0){ temp = *(month+i); *(month+i) = *(month+j); *(month+j) = temp; } } } } using namespace std; struct Edge { ll to; // 辺の行き先 ll weight; // 辺の重み Edge(int t, int w) : to(t), weight(w) { } }; using Graph = vector<vector<Edge>>; ll a[500][500]={}; void loop(ll i,ll j, ll count){ if(i==j)return; ll mid=(i+j)/2; //cout<<i<<j<<mid<<endl; FOR(ii,i,mid){ FOR(jj,mid+1,j){ if(a[ii][jj]!=0)cout<<i<<j<<" "<<ii<<jj<<"!"<<endl; a[ii][jj]=count; } } loop(i,mid,count+1); loop(mid+1,j,count+1); } int main() { // 頂点数と辺数 ll B,C; cin>>C>>B; c--;B--; ll A[12]={0,2,0,1,0,1,0,0,1,0,1,0}; yn(A[C]==A[B]); }
a.cc: In function 'int main()': a.cc:261:9: error: 'c' was not declared in this scope 261 | c--;B--; | ^