criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>
#include <string.h>
 
int main(int argc, const char * argv[]) {
    // insert code here...
    int n = 0, i, j, cnt=0, save=0, connect=0;//connect=0初回  ３連続でない 7連続である
    int s[6][2];
   
    scanf("%d",&n);
    
    for (i = 0; i < 6; i++) {
        for (j = 0; j < 2; j++) {
            scanf("%d", &s[i][j]);
        }
    }
    
    
//    printf("%d", n);
//    printf("\n");
//    for (i = 0; i < n; i++) {
//        for (j = 0; j < 2; j++) {
//            printf("%d ", s[i][j]);
//        }
//        printf("\n");
//    }
    for(i = 0; i < n; i++){
        if(s[i][0]==s[i][1]){
            if(connect==0||connect==7){
                cnt++;
            }else{
                cnt=1;
            }
            connect=7;
        }else{
           
            if(save<cnt){
                save = cnt;
            }
        
            connect=3;
        }
    }
    if(save>cnt){
        cnt=save;
    }
  
    if(cnt>=3){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}
#include <stdio.h>
#include <string.h>
 
int main(int argc, const char * argv[]) {
    // insert code here...
    int n = 0, i, j, cnt=0, save=0, connect=0;//connect=0初回  ３連続でない 7連続である
    int s[6][2];
   
    scanf("%d",&n);
    
    for (i = 0; i < 6; i++) {
        for (j = 0; j < 2; j++) {
            scanf("%d", &s[i][j]);
        }
    }
    
    
//    printf("%d", n);
//    printf("\n");
//    for (i = 0; i < n; i++) {
//        for (j = 0; j < 2; j++) {
//            printf("%d ", s[i][j]);
//        }
//        printf("\n");
//    }
    for(i = 0; i < n; i++){
        if(s[i][0]==s[i][1]){
            if(connect==0||connect==7){
                cnt++;
            }else{
                cnt=1;
            }
            connect=7;
        }else{
           
            if(save<cnt){
                save = cnt;
            }
        
            connect=3;
        }
    }
    if(save>cnt){
        cnt=save;
    }
  
    if(cnt>=3){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}


Compiler output:
main.c:57:5: error: redefinition of 'main'
   57 | int main(int argc, const char * argv[]) {
      |     ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(int,  const char **)'
    4 | int main(int argc, const char * argv[]) {
      |     ^~~~
Language: C++

#include <iostream>
#include<math.h>
#include <stdio.h>
using namespace std;
#include <string>
 
int main(void) {
    int n;
    cin >>n;
    vector<int> vec(n);
    for (int i = 0; i < 2*n; i++) {
        cin >> vec.at(i);
        }
    for(int i=0;i<n-2;i++){
        if(vec.at(2*i)==vec.at(2*i+1) and vec.at(2*i+2)==vec.at(2*i+3) and vec.at(2*i+4)==vec.at(2*i+5){
            cout<<"Yes";
            return 0;
        }
    }
           cout << "No";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'vector' was not declared in this scope
   10 |     vector<int> vec(n);
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<math.h>
  +++ |+#include <vector>
    3 | #include <stdio.h>
a.cc:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> vec(n);
      |            ^~~
a.cc:12:16: error: 'vec' was not declared in this scope
   12 |         cin >> vec.at(i);
      |                ^~~
a.cc:15:12: error: 'vec' was not declared in this scope
   15 |         if(vec.at(2*i)==vec.at(2*i+1) and vec.at(2*i+2)==vec.at(2*i+3) and vec.at(2*i+4)==vec.at(2*i+5){
      |            ^~~
a.cc:15:104: error: expected ')' before '{' token
   15 |         if(vec.at(2*i)==vec.at(2*i+1) and vec.at(2*i+2)==vec.at(2*i+3) and vec.at(2*i+4)==vec.at(2*i+5){
      |           ~                                                                                            ^
      |                                                                                                        )
a.cc:19:5: error: expected primary-expression before '}' token
   19 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N,D[i][2];
    cin >> N;
    String ans = "No";
    for (int i = 0; i < N; i++)
     {
      for (int j = 0; j < 2; j++)
      {
          cin >> tmp[i][j];
      }
 }
         if(tmp[i][0] == tmp[i][1]){
                     if(tmp[i+1][0] == tmp[i+1][1]){
                                  if(tmp[i+2][0] == tmp[i+2][1]){
                                      ans = "Yes";
                                  }
                     }
        }
        cout << ans;
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: 'i' was not declared in this scope
    5 |     int N,D[i][2];
      |             ^
a.cc:7:5: error: 'String' was not declared in this scope
    7 |     String ans = "No";
      |     ^~~~~~
a.cc:12:18: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   12 |           cin >> tmp[i][j];
      |                  ^~~
      |                  tm
a.cc:15:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |          if(tmp[i][0] == tmp[i][1]){
      |             ^~~
      |             tm
a.cc:18:39: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |                                       ans = "Yes";
      |                                       ^~~
      |                                       abs
a.cc:22:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |         cout << ans;
      |                 ^~~
      |                 abs
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int t = sc.nextInt();
        int count=0;
        int[] a = new int[t];
        int[] b = new int[t];
        
        for(int i=0;i<t;i++){
             a[i] = sc.nextInt();
             b[i]  = sc.nextInt();
            
            }
            for(int j=i;j<i+3;j++){
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                    count++;

            }

        }if(count>=3){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
}

Compiler output:
Main.java:15: error: cannot find symbol
            for(int j=i;j<i+3;j++){
                      ^
  symbol:   variable i
  location: class Main
Main.java:15: error: cannot find symbol
            for(int j=i;j<i+3;j++){
                          ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                     ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                           ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                                   ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                                              ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                                                         ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                if(a[i]==b[i] && a[i]>=1 && a[i]<=6 && b[i]>=1 && b[i]<=6 ){
                                                                    ^
  symbol:   variable i
  location: class Main
8 errors
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void)
{
  int N,a;
  string s;
  cin >> N >> s;
  size_t size = s.length();
  for (int i = 0;i <= (size / 2);i++)
  {
    if (s[i + 1] == a[i + 2])
    {
      a++;
    }
    else
    {
      a = 0;
    }
    if (a > 3)
    {
      cout << "Yes" << endl;
    }
    else
    {
      cout << "No" << endl;
    }
  }
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: invalid types 'int[int]' for array subscript
   12 |     if (s[i + 1] == a[i + 2])
      |                      ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int flag=0;
    int D[6][6];
    int i,j;
    int N;
    cin>>N;
    for(i=0;i<N;i++)
    {
        for(j=0;j<2;j++)
        {
            cin>>D[i][j];
        }
    }
    for(i=0;i<N;i++)
    {
        for(j=0;j<1;j++)
        {
            if (D[i][j]==D[i][j+1])
            {
                flag++;
            }
            else
            {
                continue;
        }
    }
    if(flag>=3)
    {
        cout<<"Yes";
    }
    else{
        cout<<"No";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {

  int a, b, c;
  cin >> a;
for(int i=0; i<a; ++i) {
  for(int j = 0; j<2; ++j) {
    cin >> b[j][i];
    if(b[0][i]==b[1][j]) {
      c[j][i]==1;
    } else { c[j][i]==0; }
    if(c[j][i]==1 && c[j][i+1]==1 && c[j][i+2]) {
cout << "Yes" << endl;
    } else { cout << "No" << endl; }
  }
}
}
      
  
  
  



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid types 'int[int]' for array subscript
   10 |     cin >> b[j][i];
      |             ^
a.cc:11:9: error: invalid types 'int[int]' for array subscript
   11 |     if(b[0][i]==b[1][j]) {
      |         ^
a.cc:11:18: error: invalid types 'int[int]' for array subscript
   11 |     if(b[0][i]==b[1][j]) {
      |                  ^
a.cc:12:8: error: invalid types 'int[int]' for array subscript
   12 |       c[j][i]==1;
      |        ^
a.cc:13:15: error: invalid types 'int[int]' for array subscript
   13 |     } else { c[j][i]==0; }
      |               ^
a.cc:14:9: error: invalid types 'int[int]' for array subscript
   14 |     if(c[j][i]==1 && c[j][i+1]==1 && c[j][i+2]) {
      |         ^
a.cc:14:23: error: invalid types 'int[int]' for array subscript
   14 |     if(c[j][i]==1 && c[j][i+1]==1 && c[j][i+2]) {
      |                       ^
a.cc:14:39: error: invalid types 'int[int]' for array subscript
   14 |     if(c[j][i]==1 && c[j][i+1]==1 && c[j][i+2]) {
      |                                       ^
Language: C

#include <stdio.h>
 
int main(void){
  
    int count;
    int i,j,k;
    int num[count][2];
    
    
    scanf("%d\n",&count);
    
    for(i=0;i<5;i+=1){
      
        for(j=0;j<2;j+=1){
          
            scanf("%s\n",&(num[i][j]));
          
        }
    }
  
    for(k=0;k<coun-2;k+=1){
        
        if(num[k][1] =~ num[k][2] && num[k+1][1] == num[k+1][2] && num[k+2][1] == num[k+2][2]){
           
        printf("yes");
        break;
        
        }
    }
    
    return 0;
}
           
      
   
          
           
           


Compiler output:
main.c: In function 'main':
main.c:21:15: error: 'coun' undeclared (first use in this function); did you mean 'count'?
   21 |     for(k=0;k<coun-2;k+=1){
      |               ^~~~
      |               count
main.c:21:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void){
  
    int count;
    int i,j,k;
    int num[count][2];
    
    
    scanf("%d\n",&count);
    
    for(i=0;i<5;i+=1){
      
        for(j=0;j<2;j+=1){
          
            scanf("%s\n",&(num[i][j]));
          
        }
    }
  
    for(k=0;k<coun-2;k+=1){
        
        if(num[k][1] =~ num[k][2] && num[k+1][1] == num[k+1][2] && num[k+2][1] == num[k+2][2]){
           
        printf("yes");
        break;
        
        }
    }
    
    return 0;
}
           
      
   
          
           
           

Compiler output:
main.c: In function 'main':
main.c:21:15: error: 'coun' undeclared (first use in this function); did you mean 'count'?
   21 |     for(k=0;k<coun-2;k+=1){
      |               ^~~~
      |               count
main.c:21:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>

using namespace std;

int main(void)
{
	int n;
  cin>>n;
  int d[2n],count=0;
  for(int i=0;i<2n;i++)
    cin>>d[i];
  for(int i=0;i<2n;i+=2)
  {
    if(d[i]==d[i+1])
      count++;
    else if(d[i]!=d[i+1])
      count==0;
    if(count==3)
      break;
  }
  if(count==3)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: unable to find numeric literal operator 'operator""n'
    9 |   int d[2n],count=0;
      |         ^~
a.cc:10:17: error: unable to find numeric literal operator 'operator""n'
   10 |   for(int i=0;i<2n;i++)
      |                 ^~
a.cc:11:10: error: 'd' was not declared in this scope
   11 |     cin>>d[i];
      |          ^
a.cc:12:17: error: unable to find numeric literal operator 'operator""n'
   12 |   for(int i=0;i<2n;i+=2)
      |                 ^~
a.cc:14:8: error: 'd' was not declared in this scope
   14 |     if(d[i]==d[i+1])
      |        ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int counts = 0;
    for (int i = 0; i < N; i++) {
      int a = sc.nextInt();
      int b = sc.nextInt();
      if (a == b) {
        counts += 1;
        if (counts == 3) {
          System.out.println("Yes");
          break:
        }
      } else {
        counts = 0;
      }
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:15: error: ';' expected
          break:
               ^
1 error
Language: C++

#include<iostream.h>
 
using namespace std;
 
int D[100][2];
 
int main()
{
	int n;
	cin>>n;

    for(int  i =0; i < n; i++)
    {
    	cin>>D[i][0];
        cin>>D[i][1];
    }
  
    for (int i = 0; i < n-2; i++)
    {
    	if (D[i][0] == D[i][1])
        {
        	if (D[i+1][0] == D[i+1][1])
            {
            	if (D[i+2][0] == D[i+2][1])
                {
                	cout<<"Yes";
                    return 0;
                }
            }
        }
    }
    cout<<"No";
}

Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
import java.lang.*;
public class Main {
 public static void main( String args[] )    
    {
        // create Scanner to obtain input from command window       
        Scanner input = new Scanner(System.in);
        
        int n;         
        n = input.nextInt(); 
        int flag=0;
  		for(int i=0;i<n;i++)
        {
          int n1=input.nextInt();
          int n2=input.nextInt();
          
          if(n1==n2)
          {  if(i+2<n-1)
              continue;
            int n2=input.nextInt();
             int n2=input.nextInt();
             if(n2== n2)
             {int n3=input.nextInt();
              int n3=input.nextInt();
              if(n3==n3)
              {flag=5;
              }
             }
          }
        }
   if(flag==5)
     System.out.println("Yes")
     else
       System.out.println("No");
 }

Compiler output:
Main.java:32: error: ';' expected
     System.out.println("Yes")
                              ^
Main.java:35: error: reached end of file while parsing
 }
  ^
2 errors
Language: C

#include <stdio.h>
#include <string.h>
 
int main(int argc, const char * argv[]) {
    // insert code here...
    int n = 0, i, j, cnt=0, save=0, connect=0;//connect=0初回  ３連続でない 7連続である
    int s[6][2];
   
    scanf("%d",&n);
    
    for (i = 0; i < n; i++) {
        for (j = 0; j < 2; j++) {
            scanf("%d", &s[i][j]);
        }
    }
    
    
//    printf("%d", n);
//    printf("\n");
//    for (i = 0; i < n; i++) {
//        for (j = 0; j < 2; j++) {
//            printf("%d ", s[i][j]);
//        }
//        printf("\n");
//    }
    for(i = 0; i < n; i++){
        if(s[i][0]==s[i][1]){
            if(connect==0||connect==7){
                cnt++;
            }else{
                cnt=1;
            }
            connect=7;
        }else{
           
            if(save<cnt){
                save = cnt;
            }
        
            connect=3;
        }
    }
    if(save>cnt){
        cnt=save;
    }
    if(cnt>=3){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}
#include <stdio.h>
#include <string.h>

int main(int argc, const char * argv[]) {
    // insert code here...
    int n = 0, i, j, cnt=0, save=0, connect=0;//connect=0初回  ３連続でない 7連続である
    int s[6][2];
   
    scanf("%d",&n);
    
    for (i = 0; i < n; i++) {
        for (j = 0; j < 2; j++) {
            scanf("%d", &s[i][j]);
        }
    }
    
    
//    printf("%d", n);
//    printf("\n");
//    for (i = 0; i < n; i++) {
//        for (j = 0; j < 2; j++) {
//            printf("%d ", s[i][j]);
//        }
//        printf("\n");
//    }
    for(i = 0; i < n; i++){
        if(s[i][0]==s[i][1]){
            if(connect==0||connect==7){
                cnt++;
            }else{
                cnt=1;
            }
            connect=7;
        }else{
           
            if(save<cnt){
                save = cnt;
            }
        
            connect=3;
        }
    }
    if(save>cnt){
        cnt=save;
    }
    if(cnt>=3){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}


Compiler output:
main.c:56:5: error: redefinition of 'main'
   56 | int main(int argc, const char * argv[]) {
      |     ^~~~
main.c:4:5: note: previous definition of 'main' with type 'int(int,  const char **)'
    4 | int main(int argc, const char * argv[]) {
      |     ^~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args)throws Exception{
    Scanner sc=new Scanner(System.in);
    int N=sc.nextInt();
    for(N=3;N<=100;N++){
      Random rand=new Random();
      int a,b,c,d,e,f=rand.nextInt(7)+1;
      if((a==b)&&(c==d)&&(e==f)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
  }
}


Compiler output:
Main.java:9: error: variable a might not have been initialized
      if((a==b)&&(c==d)&&(e==f)){
          ^
Main.java:9: error: variable b might not have been initialized
      if((a==b)&&(c==d)&&(e==f)){
             ^
Main.java:9: error: variable c might not have been initialized
      if((a==b)&&(c==d)&&(e==f)){
                  ^
Main.java:9: error: variable d might not have been initialized
      if((a==b)&&(c==d)&&(e==f)){
                     ^
Main.java:9: error: variable e might not have been initialized
      if((a==b)&&(c==d)&&(e==f)){
                          ^
5 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args)throws Exception{
    Scanner sc=new Scanner(System.in);
    int N=sc.nextInt();
    for(N=3;N<=100;N++){
      Random rand=new Random();
      int DN1=rand.nextInt(7)+1;
      int DN2=rand.nextInt(7)+1;
      import java.util.*;
public class Main{
  public static void main(String[] args)throws Exception{
    Scanner sc=new Scanner(System.in);
    int N=sc.nextInt();
    for(N=3;N<=100;N++){
      Random rand=new Random();
      int a,b,c,d,e,f=rand.nextInt(7)+1;
      if((a==b)&&(c==d)&&(e==f)){
        System.out.println("Yes");
      }else{
        System.out.println("No");
      }
    }
  }
}


Compiler output:
Main.java:10: error: illegal start of expression
      import java.util.*;
      ^
Main.java:10: error: <identifier> expected
      import java.util.*;
                       ^
Main.java:10: error: illegal start of expression
      import java.util.*;
                        ^
Main.java:11: error: illegal start of expression
public class Main{
^
Main.java:25: error: reached end of file while parsing
}
 ^
5 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n; cin>> n;
  	int ans =0, a, b, c = 0;
  	while(n--){
      cin>> a>> b;
      if(a== b) c++;
      else{ c=0; ans = max(ans, c);}
      
    }
  	if(ans>- 3) cout<< "YES"<< endl;
  	else cout<< "NO"<< enld;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 'enld' was not declared in this scope
   14 |         else cout<< "NO"<< enld;
      |                            ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int t=0;
int main()
{
  int n;
  cin>>n;
  for(int i=1;i<=n;i++)
  {
    int e;
    cin>>e;
    for(int j=1;j<=n;j++)
    {
      int f;
      cin>>f;
      if(e==f)
        t++;
    }
  }
  if(t>=3);
      cout<<"YES";
  else
  	  cout<<"NO";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: 'else' without a previous 'if'
   22 |   else
      |   ^~~~
Language: C++

include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
using namespace std;
typedef long long ll;
 
int main(){
  	ll N;
  	ll D[2];
  	int count = 0;
  	cin >> N;
  	rep(i, N){
      cin >> D[0];
      cin >> D[1];
      if(D[0] == D[1]){
        count++;
        if(count >= 3) break;
      }
      else count = 0;
    }
  	if(count >= 3) cout << "Yes";
  	else cout << "No";
  	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> N;
      |         ^~~
a.cc:21:24: error: 'cout' was not declared in this scope; did you mean 'count'?
   21 |         if(count >= 3) cout << "Yes";
      |                        ^~~~
      |                        count
a.cc:22:14: error: 'cout' was not declared in this scope; did you mean 'count'?
   22 |         else cout << "No";
      |              ^~~~
      |              count
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int fl=0,flag=0;
    int p;
    cin>>p;
    int i=0
    for(i=0;i<p;i++)
    {
        
        long int m,n;
        cin>>m>>n;
        if(fl!=1){
        if(m==n){
            flag++;
        }
        else
        {
            flag=0;
        }
            
        
        if(flag>=3)
            fl=1;
        }
    }
    
    
    if(fl==1)
    {
        cout<<"Yes";
    }
    if(fl==0)
    {
        cout<<"No";
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(i=0;i<p;i++)
      |     ^~~
a.cc:9:20: error: expected ';' before ')' token
    9 |     for(i=0;i<p;i++)
      |                    ^
      |                    ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,d;
  cin>>a;
  for(int i=0;i<a;i++)
  {
    int b,c;
    cin>>b>>c;
    if(b==c)
      d++;
  }
  if(d>=3)
    cout<<"Yes";
  else
    cout<<"No";

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected '}' at end of input
   17 |     cout<<"No";
      |                ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();
		for(int i=0;i<n;i++) {
			int[] d1;
			d1[i]=sc.nextInt();
			int[] d2;
			d2[i]=sc.nextInt();
		}
		
		for(int i=0;i<n-2;i++) {
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
					System.out.println("Yes");
					}
				else {
					System.out.println("No");
				}	
		}
		sc.close();
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				   ^
  symbol:   variable d1
  location: class Main
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				          ^
  symbol:   variable d2
  location: class Main
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				                  ^
  symbol:   variable d1
  location: class Main
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				                           ^
  symbol:   variable d2
  location: class Main
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				                                    ^
  symbol:   variable d1
  location: class Main
Main.java:15: error: cannot find symbol
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
				                                             ^
  symbol:   variable d2
  location: class Main
6 errors
Language: C++

#include<iostream>
using namespace std;

int main(){
    int N,
    int Dd[100][1];
        cin >> N;
    for(int i = 1 ; i <= N ;i++){
        cin >> Dd[i][0] >> Dd[i][1];
    }
    int zoro[100];
    for(int j = 1 ; j <= N ; j++){
        if( Dd[j][0] == Dd[j][1]){
            zoro[j]=1;
        }
    }
    int ans;
    for(int k = 1 ; k <=N-2 ; k++){
    if(zoro[k]+zoro[k+1]+zoro[k+2] == 3){
        ans = ans + 1;
    }
    }
    if(ans == 0){
        cout << "No" << endl;
    }
    else{
        cout << "Yes" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected unqualified-id before 'int'
    6 |     int Dd[100][1];
      |     ^~~
a.cc:9:16: error: 'Dd' was not declared in this scope
    9 |         cin >> Dd[i][0] >> Dd[i][1];
      |                ^~
a.cc:13:13: error: 'Dd' was not declared in this scope
   13 |         if( Dd[j][0] == Dd[j][1]){
      |             ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  for(int i = 0;i <= n;i++){
    vector<vector<int>> dice(n, vector<int>(2));
    cin >> dice(i, 1) >> dice(i,2);
  }
  
  if(dice.at(i).at(1) == dice.at(i).at(2) && dice.at(i+1).at(1) == dice.at(i+1).at(2) &&
     dice.at(i+2).at(1) == dice.at(i+2).at(2)) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: no match for call to '(std::vector<std::vector<int> >) (int&, int)'
    8 |     cin >> dice(i, 1) >> dice(i,2);
      |            ~~~~^~~~~~
a.cc:8:30: error: no match for call to '(std::vector<std::vector<int> >) (int&, int)'
    8 |     cin >> dice(i, 1) >> dice(i,2);
      |                          ~~~~^~~~~
a.cc:11:6: error: 'dice' was not declared in this scope; did you mean 'nice'?
   11 |   if(dice.at(i).at(1) == dice.at(i).at(2) && dice.at(i+1).at(1) == dice.at(i+1).at(2) &&
      |      ^~~~
      |      nice
a.cc:11:14: error: 'i' was not declared in this scope
   11 |   if(dice.at(i).at(1) == dice.at(i).at(2) && dice.at(i+1).at(1) == dice.at(i+1).at(2) &&
      |              ^
Language: Java

import java.lang.String.*;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);

		int n=sc.nextInt();
		for(int i=0;i<n;i++) {
			int[] d1;
			d1[i]=sc.nextInt();
			int[] d2;
			d2[i]=sc.nextInt();
		}
		
		for(int i=0;i<n-2;i++) {
				if(d1[i]==d2[i]&& d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
					System.out.println("Yes");
					}
				else {
					System.out.println("No");
		}

Compiler output:
Main.java:21: error: reached end of file while parsing
		}
		 ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int i;
  int count=0;
  int a[n],b[n];
  
  cin>>n;
  for(i=0;i<n;i++){
    cin>>a[i];
    cin>>b[i];
  }
  for(i=0;i<n;i++){
    if (a[i]==b[i]){
      count+=1;
    }
  }
  if(count==3){
    cout<<"Yes";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'n' was not declared in this scope
    6 |   int a[n],b[n];
      |         ^
a.cc:10:10: error: 'a' was not declared in this scope
   10 |     cin>>a[i];
      |          ^
a.cc:11:10: error: 'b' was not declared in this scope
   11 |     cin>>b[i];
      |          ^
a.cc:14:9: error: 'a' was not declared in this scope
   14 |     if (a[i]==b[i]){
      |         ^
a.cc:14:15: error: 'b' was not declared in this scope
   14 |     if (a[i]==b[i]){
      |               ^
Language: Java

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public final class Main {

	public static void main(String[] args) {
		final FastScanner fs = new FastScanner();
		final int time = fs.nextInt();
		int sameTime = 0;

		for (int i = 0; i < time; i++) {
			int a = fs.nextInt();
			int b = fs.nextInt();
			System.out.println("a=" + a + "b=" + b);
			if (a == b) {
				sameTime++;
				if (sameTime >= 3) {
					System.out.println("Yes");
					System.exit(0);
				}

			} else {
				sameTime = 0;
			}
		}
		System.out.println("No");
	}

    static class FastScanner {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    //noinspection CallToPrintStackTrace
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        int[] readArray(int n) {
            final int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = nextInt(); }
            return a;
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}


Compiler output:
Main.java:31: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        ^
  symbol:   class BufferedReader
  location: class FastScanner
Main.java:31: error: cannot find symbol
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                ^
  symbol:   class BufferedReader
  location: class FastScanner
2 errors
Language: C++

  int s[100],str[100],i,ct=0,a,b;
    cin>>n;
  for(i=0;i<n;i++)
  {
    cin>>a;
    cin>>b;
    s[i]=a;
    str[i]=b;
  }
  for(i=0;i<n-3;i++)
  {
    if(s[i]==str[i]&&s[i+1]==str[i+1]&&s[i+2]==str[i+2])
      ct++;
  }
  if(ct>=3)
    cout<<"Yes";
  else
    cout<<"No";
}
#include<iostream>
using namespace std;
int main()
{
  int s[100],str[100],i,ct=0,a,b,n;
    cin>>n;
  for(i=0;i<n;i++)
  {
    cin>>a;
    cin>>b;
    s[i]=a;
    str[i]=b;
  }
  for(i=0;i<n-3;i++)
  {

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin>>n;
      |     ^~~
a.cc:3:3: error: expected unqualified-id before 'for'
    3 |   for(i=0;i<n;i++)
      |   ^~~
a.cc:3:11: error: 'i' does not name a type
    3 |   for(i=0;i<n;i++)
      |           ^
a.cc:3:15: error: 'i' does not name a type
    3 |   for(i=0;i<n;i++)
      |               ^
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(i=0;i<n-3;i++)
      |   ^~~
a.cc:10:11: error: 'i' does not name a type
   10 |   for(i=0;i<n-3;i++)
      |           ^
a.cc:10:17: error: 'i' does not name a type
   10 |   for(i=0;i<n-3;i++)
      |                 ^
a.cc:15:3: error: expected unqualified-id before 'if'
   15 |   if(ct>=3)
      |   ^~
a.cc:17:3: error: expected unqualified-id before 'else'
   17 |   else
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
a.cc: In function 'int main()':
a.cc:34:4: error: expected '}' at end of input
   34 |   {
      |   ~^
a.cc:34:4: error: expected '}' at end of input
a.cc:23:1: note: to match this '{'
   23 | {
      | ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int counts = 0;
    for (int i = 0; i < N; i++) {
      int a = sc.nextInt();
      int b = sc.nextInt();
      if (a == b) {
        counts += 1;
      } else {
        counts += 0;
      }
    }
    if (count == 3) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:17: error: cannot find symbol
    if (count == 3) {
        ^
  symbol:   variable count
  location: class Main
1 error
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int s[100],str[100],i,ct=0,a,b;
    cin>>n;
  for(i=0;i<n;i++)
  {
    cin>>a;
    cin>>b;
    s[i]=a;
    str[i]=b;
  }
  for(i=0;i<n-3;i++)
  {
    if(s[i]==str[i]&&s[i+1]==str[i+1]&&s[i+2]==str[i+2])
      ct++;
  }
  if(ct>=3)
    cout<<"Yes";
  else
    cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'n' was not declared in this scope
    6 |     cin>>n;
      |          ^
Language: C++

#include <iostream>
#inclue <vector>
using namespace std;
int main()
{
  int n, count = 0;
  bool flag = 0;
  vector<int> a;
  vector<int> b;
  cin >>n;
  for(int i=0; i<n; i++)
  {
    int x,y;
    cin >> x >> y;
    a.push_back(x);
    b.push_back(y);
  }
  for(int i=0; i<n; i++)
  {
    if(count == 3)
    {
      flag = 1;
      break;
    }
    if(a[i] == b[i])
      count++;
    else
      count = 0;
  }
  if(flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inclue; did you mean #include?
    2 | #inclue <vector>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> a;
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #inclue <vector>
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> a;
      |          ^~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> b;
      |          ^~~
a.cc:15:5: error: 'a' was not declared in this scope
   15 |     a.push_back(x);
      |     ^
a.cc:16:5: error: 'b' was not declared in this scope
   16 |     b.push_back(y);
      |     ^
a.cc:25:8: error: 'a' was not declared in this scope
   25 |     if(a[i] == b[i])
      |        ^
a.cc:25:16: error: 'b' was not declared in this scope
   25 |     if(a[i] == b[i])
      |                ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int counts = 0;
    for (int i = 0; i < N; i++) {
      int a = sc.nextInt();
      int b = sc.nextInt();
      if (a == b) {
        counts += 1;
        if (counts == 3) {
          final int counts = 3;
        }
      } else {
        counts += 0;
      }
    }
    if (count == 3) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:14: error: variable counts is already defined in method main(String[])
          final int counts = 3;
                    ^
Main.java:20: error: cannot find symbol
    if (count == 3) {
        ^
  symbol:   variable count
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
  int N,M;
  vector<int> vec1(N);
  vector<int> vec2(N);
  M = 0;
  for (int i = 0; i < N; i++)
  {
    cin >> vec1.at(i) >> vec2.at(i);
  }
  
  for(int i = 0;i < N;i++)
  {
    if(vec1.at(i) == vec2.at(i))
    {
      M += 1;
    }
    else
    {
      M = 0;
    }
  }
  if(M >= 3)
  {
    cout << "Yes" << endl;
  }
  else
  {
    cout < "No"  << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   32 |     cout < "No"  << endl;
      |            ~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int i;
  int count=0;
  int a,b;
  int n;
  cin>>n;
  for(i=0;i<n;i++){
    cin>>a[i];
    cin>>b[i];
  }
  for(i=0;i<n;i++){
    if (a[i]==b[i]){
      count+=1;
    }
  }
  if(count==3){
    cout<<"Yes";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: invalid types 'int[int]' for array subscript
   10 |     cin>>a[i];
      |           ^
a.cc:11:11: error: invalid types 'int[int]' for array subscript
   11 |     cin>>b[i];
      |           ^
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 |     if (a[i]==b[i]){
      |          ^
a.cc:14:16: error: invalid types 'int[int]' for array subscript
   14 |     if (a[i]==b[i]){
      |                ^
Language: C++

#include <fstream>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <sstream>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <random>

using namespace std;
struct XX{
int s;
    int e;
};

class xxGreater {
public:
bool operator()(const XX& riLeft, const XX& riRight) const {
        //第2条件
if((riLeft.s) == (riRight.s)){
return riLeft.e < riRight.e;//<:昇順(小さいものから順番)、>:降順(大きいものから順番)
           //プライオリティキューの場合は > で、top()すると値の小さいものがとれる
        }
        //第1条件
        return (riLeft.s) > (riRight.s);
    }
};


int main(int argc, const char * argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
int n;
cin>>n;
vector<int>ans;
    for(int i=0;i<n;i++){
    int a,b;
    cin >> a>> b;
if(a==b){
ans.push_back(i);
}
}

int f=0;
for(int i=0;i<n-2;i++){
if(ans[i+2]-ans[i+1]==1&&ans[i+1]-ans[i]==1){
f=1;
}
}

if(f==1){
cout << "Yes" <<endl;
}else{
cout << "No" <<endl;

}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:64:2: error: expected '}' at end of input
   64 | }
      |  ^
a.cc:38:1: note: to match this '{'
   38 | {
      | ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void)
{
  int N,a;
  string s;
  cin >> N >> s;
  size_t size = s.length();
  for (int i = 0;i < (size / 2);i++)
  {
    if (s[i + 1] == a[i + 2])
    {
      a++;
    }
    else
    {
      a = 0;
    }
    if (a > 3)
    {
      cout << "Yes" << endl;
    }
    else
    {
      cout << "No" << endl;
    }
  }
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: invalid types 'int[int]' for array subscript
   12 |     if (s[i + 1] == a[i + 2])
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
  int N,M;
  vector<int> vec1(N);
  vector<int> vec2(N);
  M = 0;
  for (int i = 0; i < N; i++)
  {
    cin >> vec1.at(i) >> vec2.at(i);
  }
  
  for(int i = 0;i < N;i++)
  {
    if(vec1.at(i) == vec2.at(i))
    {
      M += 1;
    }
    else
    {
      M = 0;
    }
  }
  if(M >= 3)
  {
    cout << "Yes" << endl;
  }
  else
  {
    cout < "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   32 |     cout < "No" << endl;
      |            ~~~~~^~~~~~~
Language: Java

import java.util.Scanner;

public class Test
{

	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		int amountToRoll = Integer.parseInt(scan.nextLine());
		
		int streak = 0;
		
		for (int i = 0; i < amountToRoll; i++)
		{
			String[] array = scan.nextLine().split("\\s");
			
			if(array[0].equals(array[1])) 
			{
				streak++;
			}
			
			else 
			{
				streak = 0;
			}
			
			if(streak == 3) 
			{
				System.out.println("Yes");
				break;
			}
			
		}
		
		
		
		if(streak != 3) 
		{
			System.out.println("No");
		}
		
		scan.close();

	}

}


Compiler output:
Main.java:3: error: class Test is public, should be declared in a file named Test.java
public class Test
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
main()
{
  int n,i=0;
  cin>>n;
  int d[n][2],c[n];
  for(i=0;i<n;i++)
  {
    cin>>d[i][0]>>d[i][1];
    if(d[i][0]==d[i][1])
     c[i]=1;
    else
    c[i]=0; 
  }
  for(i=0;i<n;i++)
  {
    while(c[i]!='0')
    {
      count++;
    }
    if(count==3)
       break;
    else
     continue;  
}
  if(count==3)
    cout<<"Yes";
  else
    cout<<"No";
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:20:7: error: 'count' was not declared in this scope
   20 |       count++;
      |       ^~~~~
a.cc:22:8: error: 'count' was not declared in this scope
   22 |     if(count==3)
      |        ^~~~~
a.cc:27:6: error: 'count' was not declared in this scope
   27 |   if(count==3)
      |      ^~~~~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int counts = 0;
    for (int i = 0; i < N; i++) {
      int a = sc.nextInt();
      int b = sc.nextInt();
      if (a == b) {
        counts += 1;
        if (counts == 3) {
          final counts = 3;
        }
      } else {
        counts += 0;
      }
    }
    if (count == 3) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}


Compiler output:
Main.java:14: error: <identifier> expected
          final counts = 3;
                      ^
1 error
Language: C++

int main() 
{
    int N;
    cin >> N;
    vector<pair<int, int>> D(N);
    int D1, D2;
    int count = 0;
    for (int i = 0; i < N; ++i) {
        cin >> D1 >> D2;
        if (D1 == D2) {
            ++count;
        }
        else {
            count = 0;
        }
        if (count == 3) {
            cout << endl;
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> N;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<pair<int, int>> D(N);
      |     ^~~~~~
a.cc:5:12: error: 'pair' was not declared in this scope
    5 |     vector<pair<int, int>> D(N);
      |            ^~~~
a.cc:5:17: error: expected primary-expression before 'int'
    5 |     vector<pair<int, int>> D(N);
      |                 ^~~
a.cc:17:13: error: 'cout' was not declared in this scope; did you mean 'count'?
   17 |             cout << endl;
      |             ^~~~
      |             count
a.cc:17:21: error: 'endl' was not declared in this scope
   17 |             cout << endl;
      |                     ^~~~
a.cc:22:5: error: 'cout' was not declared in this scope; did you mean 'count'?
   22 |     cout << "No" << endl;
      |     ^~~~
      |     count
a.cc:22:21: error: 'endl' was not declared in this scope
   22 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
 	int n;
  	cin >> n;
  
  	int cnt = 0;
  	while(n--) {
     	int x, y;
      	cin >> x >> y;
      
      	if (x == y) cnt++;
    }
  
  	if (cnt >= 3) {
      	cout << "Yes" << endl;
    } else {
     	cout << "No" << endl; 
    }
  	cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 's' was not declared in this scope
   22 |         cout << s << endl;
      |                 ^
Language: C++

#include <fstream>
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <sstream>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <cmath>
#include <queue>
#include <random>

using namespace std;
struct XX{
int s;
    int e;
};

class xxGreater {
public:
bool operator()(const XX& riLeft, const XX& riRight) const {
        //第2条件
if((riLeft.s) == (riRight.s)){
return riLeft.e < riRight.e;//<:昇順(小さいものから順番)、>:降順(大きいものから順番)
           //プライオリティキューの場合は > で、top()すると値の小さいものがとれる
        }
        //第1条件
        return (riLeft.s) > (riRight.s);
    }
};


int main(int argc, const char * argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(0);
int n;
cin>>n;
vector<int>ans;
    for(int i=0;i<n;i++){
    int a,b;
    cin >> a>> b;
if(a==b){
ans.push_back(i);
}
}

int f=0;
for(int i=0;i<n-2;i++){
if(ans[i+2]-ans[i+1]==1&&ans[i+1]-ans[i]==1){
f==1;
}
}

if(f==1){
cout << "Yes" <<endl
}else{
cout << "No" <<endl;

}


//cout << "Hello World" << endl;

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:60:21: error: expected ';' before '}' token
   60 | cout << "Yes" <<endl
      |                     ^
      |                     ;
   61 | }else{
      | ~                    
a.cc:64:2: error: expected '}' at end of input
   64 | }
      |  ^
a.cc:38:1: note: to match this '{'
   38 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int i;
  count=0;
  int a[],b[];
  for(i=0;i<n;i++){
    cin>>a[i];
    cin>>b[i];
  }
  for(i=0;i<n;i++){
    if (a[i]==b[i]){
      count+=1;
    }
  }
  if(count==3){
    cout<<"Yes";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: overloaded function with no contextual type information
    5 |   count=0;
      |         ^
a.cc:6:7: error: storage size of 'a' isn't known
    6 |   int a[],b[];
      |       ^
a.cc:6:11: error: storage size of 'b' isn't known
    6 |   int a[],b[];
      |           ^
a.cc:7:13: error: 'n' was not declared in this scope
    7 |   for(i=0;i<n;i++){
      |             ^
a.cc:11:13: error: 'n' was not declared in this scope
   11 |   for(i=0;i<n;i++){
      |             ^
a.cc:13:14: error: overloaded function with no contextual type information
   13 |       count+=1;
      |              ^
a.cc:16:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
   16 |   if(count==3){
      |      ~~~~~^~~
Language: C++

#include <iostream>

using namespace std;

int main() {
 	int n;
  	cin >> n;
  
  	int cnt = 0;
  	while(n--) {
     	int x, y;
      	cin >> x >> y;
      
      	if (x == y) cnt++;
    }
  
  	if (cnt >= 3) {
      	cout << "Yes" << endl;
    else {
     	cout << "No" << endl; 
    }
  	cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: expected '}' before 'else'
   19 |     else {
      |     ^~~~
a.cc:17:23: note: to match this '{'
   17 |         if (cnt >= 3) {
      |                       ^
a.cc:22:17: error: 's' was not declared in this scope
   22 |         cout << s << endl;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define w(t) int t;cin>>t;while(t--)
#define mod 1000000007



int main(){
	
		fast
		int n;
		cin>>n;
		int counter=0;
		int max_count=0;
		for(int k=0;i<n;k++)
		{

			int i,j;
			cin>>i>>j;
			if(i==j)
			{
				c++;
			}
			else if(c>=3)
			{
				max_count=c;
			}
			else{
				c=0;
			}
		}
		if(max_count>=3)
			cout<<"Yes";
		else
			cout<<"No";


	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: 'i' was not declared in this scope
   18 |                 for(int k=0;i<n;k++)
      |                             ^
a.cc:25:33: error: 'c' was not declared in this scope
   25 |                                 c++;
      |                                 ^
a.cc:27:33: error: 'c' was not declared in this scope
   27 |                         else if(c>=3)
      |                                 ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(void)
{
  int N,a;
  string s;
  cin >> N >> s;
  for (int i = 0;i < ;i++)
  {
    if (s[i + 1] == a[i + 2])
    {
      a++;
    }
    else
    {
      a = 0;
    }
    if (a > 3)
    {
      cout << "Yes" << endl;
    }
    else
    {
      cout << "No" << endl;
    }
  }
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected primary-expression before ';' token
    9 |   for (int i = 0;i < ;i++)
      |                      ^
a.cc:11:22: error: invalid types 'int[int]' for array subscript
   11 |     if (s[i + 1] == a[i + 2])
      |                      ^