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

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i,n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<"\n"
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES\n" : "NO\n"  )
#define Yes(n) cout << ((n) ? "Yes\n" : "No\n"  )
#define mp make_pair
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef tuple<ll,ll,ll> tll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vvll = vector<vll>;
using vstr = vector<string>;
using vc = vector<char>;
using vvc = vector<vc>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
template<class T> inline bool chmax(T& a, T b) { 
 if (a < b) { a = b; return true; } return false; 
}
template<class T> inline bool chmin(T& a, T b) {
 if (a > b) { a = b; return true; } return false; 
}
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;
  cin>>n;
  ll cu=0;
  rep(i,n){
    ll a,b;
    cin>>a>>b;
    if(a==b) cu++;
    else cu=0;
    if(cu==3){
      COUT("Yes");
      return 0;
    }
  }
  COUT("No");
}
      


Compiler output:
a.cc:32:21: error: 'vll' was not declared in this scope; did you mean 'tll'?
   32 | using vvll = vector<vll>;
      |                     ^~~
      |                     tll
a.cc:32:24: error: template argument 1 is invalid
   32 | using vvll = vector<vll>;
      |                        ^
a.cc:32:24: error: template argument 2 is invalid
Language: C

#include <iostream>
int main(int argc, char** argv){
	int n;
	std::cin >> n;
	int c = 0, f = 0;
	for(int i=0; i<n; i++){
		int a,b;
		std::cin >> a >> b;
		if(a == b) c++;
		else c = 0;
		if(c == 3) f = 1;
	}
	std::cout << (f ? "Yes":"No") << "\n";
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.io.*;
import java.util.*;

public class codeforces {

    static int[] subarrayWithMaxSum(int[] nums)
    {
        int endIndex = 0, currMax = nums[0];
        int globalMax = nums[0];
        for (int i = 1; i < nums.length; ++i)
        {
            currMax = Math.max(nums[i],
                    nums[i] + currMax);
            if (currMax > globalMax)
            {
                globalMax = currMax;
                endIndex = i;
            }
        }

        int startIndex = endIndex;
        while (startIndex >= 0)
        {
            globalMax -= nums[startIndex];

            if (globalMax == 0)
                break;
            startIndex--;
        }
        int s = 0;
        for(int i = startIndex ; i <= endIndex ; i++) {
            s += nums[i];
        }
        return new int[]{startIndex , endIndex , s};
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder sb = new StringBuilder("");
        int n = Integer.parseInt(br.readLine());
        int res = 0;
        boolean found = false;
        for(int i = 0 ; i < n ; i++) {
            st = new StringTokenizer(br.readLine());
            if(st.nextToken().equals(st.nextToken())) {
                res++;
            }
            else {
                res = 0;
            }
            if(res == 3) {
                found = true;
            }
        }
        if(found) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}
/*
5
2 1
1 1
500 4
217871987498122 10
100000000000000001 1
 */


Compiler output:
Main.java:4: error: class codeforces is public, should be declared in a file named codeforces.java
public class codeforces {
       ^
1 error
Language: Java


import java.io.*;
import java.util.*;

public class codeforces {

    static int[] subarrayWithMaxSum(int[] nums)
    {
        int endIndex = 0, currMax = nums[0];
        int globalMax = nums[0];
        for (int i = 1; i < nums.length; ++i)
        {
            currMax = Math.max(nums[i],
                    nums[i] + currMax);
            if (currMax > globalMax)
            {
                globalMax = currMax;
                endIndex = i;
            }
        }

        int startIndex = endIndex;
        while (startIndex >= 0)
        {
            globalMax -= nums[startIndex];

            if (globalMax == 0)
                break;
            startIndex--;
        }
        int s = 0;
        for(int i = startIndex ; i <= endIndex ; i++) {
            s += nums[i];
        }
        return new int[]{startIndex , endIndex , s};
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder sb = new StringBuilder("");
        int n = Integer.parseInt(br.readLine());
        int res = 0;
        boolean found = false;
        for(int i = 0 ; i < n ; i++) {
            st = new StringTokenizer(br.readLine());
            if(st.nextToken().equals(st.nextToken())) {
                res++;
            }
            else {
                res = 0;
            }
            if(res == 3) {
                found = true;
            }
        }
        if(found) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}

Compiler output:
Main.java:5: error: class codeforces is public, should be declared in a file named codeforces.java
public class codeforces {
       ^
1 error
Language: Java

public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        StringBuilder sb = new StringBuilder("");
        int n = Integer.parseInt(br.readLine());
        int res = 0;
        boolean found = false;
        for(int i = 0 ; i < n ; i++) {
            st = new StringTokenizer(br.readLine());
            if(st.nextToken().equals(st.nextToken())) {
                res++;
            }
            else {
                res = 0;
            }
            if(res == 3) {
                found = true;
            }
        }
        if(found) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws IOException {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
const int MOD = 1e9 + 7;

int main() {
  int n;
  cin >> n;
  bool success = false;
  int count = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (x == y) {
      count++;
      if (count >= 3) {
        success = true
      }
    } else {
      count = 0;
    }
  }
  string result = success ? "Yes" : "No";
  cout << result << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:23: error: expected ';' before '}' token
   18 |         success = true
      |                       ^
      |                       ;
   19 |       }
      |       ~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int n;		cin >> n;
  int a[n], b[n];
  int same_cnt=0;
  
  for(int i=0; i<n; i++){
    cin >> a[i] >> b[i];
  }
  
  for(int i=0; i<n; i++){
   if(a[i] == b[i]){
    same_cnt++; 
   }else{
     same_cnt = 0;
   }
    if(same_cnt >= 3){
      cout << "Yes" << endl;
      return 0;
    }
  }
  
  cout << "No" << endl;
  return 0;
}
  
  
  
}

Compiler output:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <ext/rope>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#define int long long
#define pb push_back
#define x first
#define y second
#define mk(a,b) make_pair(a,b)
#define rr return 0
#define sqr(a) ((a)*(a))
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)(a).size()

using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template<class value, class cmp = less<value> >
using ordered_set = tree<value, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
template<class value, class cmp = less_equal<value> >
using ordered_multiset = tree<value, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
template<class key, class value, class cmp = less<key> >
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;

/// find_by_order()
/// order_of_key()
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
inline int randll(int l = INT_MIN, int r = INT_MAX) {
    return uniform_int_distribution<int>(l, r)(rng);
}
const int INF = 1e9, MOD = 1e9 + 7; /// think
const ll LINF = 1e18;


const int dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
inline bool inside (int x, int y, int n, int m) {
    return 0 <= x && 0 <= y && x < n && y < m;
}

template<class T> bool umin (T &a, T b) {return a > b ? (a = b, true) : false; }
template<class T> bool umax (T &a, T b) {return a < b ? (a = b, true) : false; }

main()
{
    ios::sync_with_stdio(0);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, x, y;
    cin >> n;
    vector <bool> a(n);
    for (auto &i : a) {
        cin >> x >> y;
        i = x == y;
    }
    for (int i = 2; i < n; i++) {
        if (a[i] && a[i - 1] && a[i - 2]) {
            cout << "Yes\n";
            rr;
        }
    }
    cout << "No\n";
}


Compiler output:
a.cc:52:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   52 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:61:20: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference'
   61 |     for (auto &i : a) {
      |                    ^
Language: C++

//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>

using namespace std;

int main()
{
    //freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
    bool b = 0;
    int a, b;
    int n, c = 0;
    scanf("%d", &n);
    while (n--)
    {
        scanf("%d %d", &a, &b);
        if (a == b)
            ++c;
        else
            c = 0;
        b |= (a >= 3);
    }
    if (b)
        puts("Yes");
    else
        puts("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: conflicting declaration 'int b'
   13 |     int a, b;
      |            ^
a.cc:12:10: note: previous declaration as 'bool b'
   12 |     bool b = 0;
      |          ^
Language: C++

/**********************************************************************************************
******************************AUTHOR:**********************************************************
****************************ASHISH RANJAN******************************************************
***********************************************************************************************/
#include<iostream>
#include<algorithm>
#include<cmath>
#include<chrono>
#include<vector>
#include<string>
#include<cstring>
using namespace std;
using namespace std::chrono;
/*
auto start = high_resolution_clock::now();
auto stop = high_resolution_clock::now();
  auto duration = duration_cast<microseconds>(stop - start); 
  
    cout << "Time taken by function: "
         << duration.count() << " microseconds" << endl;
*/
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ll long long
const int M = 1e9 + 7;
#define fr(i,n) for(int i=0;i<n;i++)
#define frs(i,a,b) for(int i = a;i<b;i++)
#define meme(a,b) memset(a,b,sizeof(a)); //works only for 0 and -1
ll mod(long long x){
 return (x%M+M)%M;
}
ll add(long long a,long long  b){
return mod(mod(a)+mod(b));
}
ll mul(long long a,long long b){
return mod(mod(a)*mod(b));
}
ll minu(long long a,long long b){
return mod(mod(a)-mod(b));
}
ll modPow(ll a,ll b){
if(b==0)return 1LL;
if(b==1)return a%M;
ll res= 1;
while(b){
if(b%2==1)
res = mul(res,a);
a = mul(a,a);
b/=2;
}
return res;
}
void solve(){
int n;
cin>>n;
int count = 0;
// bool flag = false;
int mx = INT_MIN;
while(n--){
int a,b;
cin>>a>>b;
if(a==b){
count++;
}
else{
mx = max(mx,count);
count = 0;
}
}
if(mx>=3)cout<<"Yes";
else cout<<"No";
return;
}
int main(){
  fast();
//  int t;cin>>t;
//  while(t--){
    solve();
    cout<<endl;
//  }
 return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:57:10: error: 'INT_MIN' was not declared in this scope
   57 | int mx = INT_MIN;
      |          ^~~~~~~
a.cc:12:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include<cstring>
  +++ |+#include <climits>
   12 | using namespace std;
Language: C++

#include <iostream>

using namespace std;

int main() {
  int n;
  cin >> n;

  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    int d1, d2;
    cin >> d1 >> d2;
    if (d1 == d2) cnt++;
    else cnt = 0;
    if (cnt == 3) {
      puts("Yes")
      return 0;
    }
  }
  
  puts("No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before 'return'
   16 |       puts("Yes")
      |                  ^
      |                  ;
   17 |       return 0;
      |       ~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
    int ans = 0;
    int ans1 = 0;
    int n, a, b;
 
    cin >> n;

    for(int i = 0; i < n; i++){
        cin >> a >> b;

        if(a = b){
            ans++;
        }else{
            if( ans > ans1 ){
                ans1 = ans;
                ans = 0;
            }
        }
    }
  }
  if( ans >= 3 ){
  cout << "Yes" << endl;
  }else
  {cout << "No" << endl;}

 return 0;
}

Compiler output:
a.cc:25:3: error: expected unqualified-id before 'if'
   25 |   if( ans >= 3 ){
      |   ^~
a.cc:27:4: error: expected unqualified-id before 'else'
   27 |   }else
      |    ^~~~
a.cc:30:2: error: expected unqualified-id before 'return'
   30 |  return 0;
      |  ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C

include<iostream>
using namespace std;
int main()
{
int n,a,b,c,d,e,f;
cin>>n;
if(a==b&&c==d&&e==f)
cout<<"YES";
else
cout<<"NO";
return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<iostream>
      |        ^
main.c: In function 'main':
main.c:6:1: error: 'cin' undeclared (first use in this function)
    6 | cin>>n;
      | ^~~
main.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:1: error: 'cout' undeclared (first use in this function)
    8 | cout<<"YES";
      | ^~~~
Language: C++

#include<iostream>
#include<vactor>

using namespace std;
int main(){
  int n;
  vector<int> zorome(n,0);
  int d0,d1;
  for(int i=0;i<n;i++){
    cin >> d0 >> d1;
    if(d0==d1){
      zorome.at(i)=1;
    }
  }
  for(int i=0;i<n-2;i++){
    if(zorome.at(i)*zorome.at(i+1)*zorome.at(i+2)==1){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: vactor: No such file or directory
    2 | #include<vactor>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<string>

using namespace std;
int main(){
  int n;
  vector<int> zorome(n,0);
  int d0,d1;
  for(int i=0;i<n;i++){
    cin >> d0 >> d1;
    if(d0==d1){
      zorome.at(i)=1;
    }
  }
  for(int i=0;i<n-3;i++){
    if(zorome.at(i)*zorome.at(i+1)*zorome.at(i+2)==1){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> zorome(n,0);
      |   ^~~~~~
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 | #include<string>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> zorome(n,0);
      |          ^~~
a.cc:12:7: error: 'zorome' was not declared in this scope
   12 |       zorome.at(i)=1;
      |       ^~~~~~
a.cc:16:8: error: 'zorome' was not declared in this scope
   16 |     if(zorome.at(i)*zorome.at(i+1)*zorome.at(i+2)==1){
      |        ^~~~~~
Language: C++

int main()
{
  int N;
  cin >> N;
  vector<vector<int>> d(N);
  for (int i = 0; i < N; i++)
  {
    cin >> d[i][0];
    cin >> d[i][1];
  }

  int count = 0;
  for (int i = 0; i < N; i++)
  {
    if (d[i][0] == d[i][1])
      count++;
    else
      count = 0;
    if (count >= 3)
    {
      printf("Yes");
      return 0;
    }
  }
  printf("No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N;
      |   ^~~
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<vector<int>> d(N);
      |   ^~~~~~
a.cc:5:17: error: expected primary-expression before 'int'
    5 |   vector<vector<int>> d(N);
      |                 ^~~
a.cc:8:12: error: 'd' was not declared in this scope
    8 |     cin >> d[i][0];
      |            ^
a.cc:15:9: error: 'd' was not declared in this scope
   15 |     if (d[i][0] == d[i][1])
      |         ^
a.cc:21:7: error: 'printf' was not declared in this scope
   21 |       printf("Yes");
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:25:3: error: 'printf' was not declared in this scope
   25 |   printf("No");
      |   ^~~~~~
a.cc:25:3: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,a,b;
  cin>>n;
  int c=0;
  for(int i=0;i<n;i++)
  {
    cin>>a>>b
    if(a==b)
      c+=1;
    if(a!=b)
      c=0;
    if(c>=3)
    	break;
  }
  if(c>=3)
    cout<<"YES";
  else
    cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'if'
   10 |     cin>>a>>b
      |              ^
      |              ;
   11 |     if(a==b)
      |     ~~
Language: C++

#include<bits/stdc++.h>
#define F first
#define S second
using namespace std;

int main(){
    int n;
    cin>>n;
    vector<pair<int,int>> v;
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        v.push_back({x,y});
    }
    for(int i=0;i<n;i++){
        if(v[i].F==v[i].S and v[i+1].F==v[i+1].S and v[i+2].F==v[i+2].S){
            cout<<"Yes"<<endl;
            return;
        }
    }
    cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: return-statement with no value, in function returning 'int' [-fpermissive]
   18 |             return;
      |             ^~~~~~
Language: C

#include <stdio.h>
#icnldue<string.h>
int main(void){
    // Your code here!
    int n,dice[1][1000];
    scanf("%d",&n);
    int sum=0,flag=0;
    for(int i=1;i<=n;i++){
    scanf("%d%d",&dice[0][i],&dice[1][i]);
    if(dice[0][i]==dice[1][i]) sum++;
    else sum=0;
    if(sum==3) {flag =1;
    break;
    }
    }
    if(flag==1) printf("Yes\n");
    else printf("No\n");
    return 0;
    
}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #icnldue; did you mean #include?
    2 | #icnldue<string.h>
      |  ^~~~~~~
      |  include
Language: C++

#include<bits/stdc++.h>
#define int long long
#define endl '\n'
#define mod 1000000007
#define inf 1e18
#define PI 3.14159265358979323846264338327950L
#define w(x) int x; cin>>x; while(x--)
using namespace std;
bool sieve[2000006];
void sieve_make() 
{
	memset(sieve,true,sizeof(sieve));
	sieve[0]=sieve[1]=false;
	for(int i=2;i*i<2000006;i++)
	{
		if(sieve[i])
		{
			for(int j=i*i;j<2000006;j+=i)
				sieve[j]=false;
		}
	}
}

int max(int a,int b)
{
	if(a>b)
		return a;
	return b;
}
int min(int a,int b)
{
	if(a<b)
		return a;
	return b;
}
int modexp(int a,int b,int c)
{
	if(a==0) return 0;
	if(b==0) return 1;

	int ans;
	if(b%2==0)
	{
		int small=modexp(a,b/2,c);
		ans=(small*small)%c;
	}
	else
	{
		int small=modexp(a,b-1,c);
		ans=(a%c);
		ans=(small*ans)%c;
	}
	return (ans+c)%c;
}
bool sign(int x)
{
	if(x>0)
		return true;
	return false;
}
int kadane(int* a,int n)
{
	int loc=a[0],glo=a[0];
	for(int i=1;i<n;i++)
	{
		loc=max(a[i],loc+a[i]);
		glo=max(glo,loc);
	}
	return glo;
}

int dp[100005];
int dfs(vector<int>* adj,int sv,bool col,bool* vis,int n)
{
	if(sv==n-1)
		return 1;
	
	int ans=0;
	for(auto i:adj[sv])
	{
		if(!vis[i])
		{
			vis[i]=1;
			if(col)
				ans+=dfs(adj,i,!col,vis,n);
			else
				ans+=dfs(adj,i,!col,vis,n)+dfs(adj,i,col,vis,n);
			vis[i]=0;
		}
	}
	return ans;
}

int32_t main()
{
	ios::sync_with_stdio(NULL);
    cin.tie(NULL);
    cout.tie(NULL);
	
	
	
	
	int n;
	cin>>n;
	bool ok=0;
	int cnt=0;
	while(n--)
	{
		int x,y;
		cin>>x>>y;
		if(x==y)
			cnt++;
		else
			cnt=0;
		if(cnt==3)
			ok=1;
	}

	cout<<ok?"Yes":"No"<<endl;
	
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:119:28: error: invalid operands of types 'const char [3]' and 'char' to binary 'operator<<'
  119 |         cout<<ok?"Yes":"No"<<endl;
      |                        ~~~~^~
      |                        |
      |                        const char [3]
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n; cin>>n;
  	int coun=0; 
  	for(int i=0; i<n; i++)
    {
     	int a,b;
      	cin>>a>>b;
      	if(a==b){
          coun++
        }
      else {
        coun=0;
      }
      if(coun==3){
        cout<<"Yes"<<endl;
        return 0;
      }
    }
  cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
   11 |           coun++
      |                 ^
      |                 ;
   12 |         }
      |         ~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main()
{
    int n;
    int cnt = 0;
    cin >> n;
    for (int a = 1; a <= n; a++)
    {
        for (int b = 1; b <= (n/a); b++)
        {
            if (n-a*b > 0)
            {
                cnt++;
            }
        }


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

// 'That's all it is. A leap of faith'

#include <bits/stdc++.h>

#define append push_back

using namespace std;
using ll = long long;

const int N = 1e5 + 3;
const int M = 1e6 + 7;
const long long MOD = 1e9 + 7;
const long long INF = 1e18 + 9;
const int SM = 1e3 + 5;
const int logN = 22, BL = 400;
const double EPS = 1e-9, PI = acos(-1);
const int dx[] = {1, 0, 0, -1, -1, 1, -1, 1};
const int dy[] = {0, 1, -1, 0, -1, 1, 1, -1};

template<typename Type>
long long sz(Type x) {
    return ll(x.size());
}

void debug() {
	cerr << "\n";
}
template<typename Type1, typename... Type2>
void debug(Type1 a, Type2... b) {
    cerr << a << " ";
    debug(b...);
}

int main() {
//    freopen(".in", "r", stdin);
//    freopen(".out", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    long long n; cin >> n;

    vector<vector<long long>> d(n, vector<long long>(2));

    bool flag = false;

    for(long long i = 0; i < n; i++) {
        cin >> d[i][0] >> d[i][1];
        if(i > 1) {
            if(d[i - 2][0] == d[i - 2][1] && d[i - 1][0] == d[i - 1][1] && d[i][0] == d[i][1]) {
                flag = true;
            }
        }
    }

    cout << (flag ? "Yes" : "No")

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:34: error: expected ';' before 'return'
   55 |     cout << (flag ? "Yes" : "No")
      |                                  ^
      |                                  ;
   56 | 
   57 |     return 0;
      |     ~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:3:16: note: to match this '{'
    3 | int main(void) {
      |                ^
Language: C++

// author : ayush_nishad
// Road to Expert since : 30 Aug 2020
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back
#define in insert
#define F first
#define S second
#define mod 1000000007
#define endl '\n'
#define all(x)  x.begin(),x.end()
#define w(x) int x;cin>>x; while(x-->0)
#define memset(a,b) memset(a,b,sizeof(a))
#define debug(x) cout << "[ " << #x  << " : " << x << " ]" << endl;

void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);

}
/*
think fast
think simple
*/
void mysol()
{
	int cnt=0;
	bool ok=0;
	W(q)
	{
		int a,b;cin>>a>>b;
		if(a==b)
			cnt++;
		else
			cnt=0;
		if(cnt==3)
			ok=1;
	}
	cout<<(ok?"Yes":"No");
}

int32_t main()
{
    fast();
    // w(t)
    {
        mysol();
    }
    //cerr << sizeof(dp)*(1e-6) << " megabytes\n";
    return 0;
}


Compiler output:
a.cc: In function 'void mysol()':
a.cc:32:11: error: 'q' was not declared in this scope
   32 |         W(q)
      |           ^
a.cc:32:9: error: 'W' was not declared in this scope
   32 |         W(q)
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int q,a[6],b[6],i,d;
int main()
{
 cin>>q;
  for(i=1;i<=q;i++)
    cin>>a[i]>>b[i];
  for(i=1;i<=q;i++)
    if(a[i]==b[i])
   if(a[i] == b[i] && a[i+1] == b[i+1] && a[i+2] == b[i+2]){
      cout<<"Yes"; return 0;
   }
  cout<<"No";


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

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
#define double long double
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
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; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
#define eps 1e-12 
//priority_queue<int,vector<int>, greater<int> > q2;



signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N; cin >> N;
	VI A(N), B(N);
	REP(i, N)cin >> A[i] >> B[i];
	REP(i, N - 2) {
		if (A[i] == B[i] && A[i + 1] == B[i + 1] && A[i + 2] == B[i + 2]) {
			cout << "Yes" << endl;
			return 0
		}
	}
	cout << "No" << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:48:33: error: expected ';' before '}' token
   48 |                         return 0
      |                                 ^
      |                                 ;
   49 |                 }
      |                 ~
Language: C++

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

int main() {
	int n;
	cin >> n;
	int a[100][2];
	for (int i = 0; i < n; i++) {
		cin >> a[i][0] >> a[i][1];
	}
	

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |                         return;
      |                         ^~~~~~
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class Main2 {
    void run(String[] args){
        Scanner scan=new Scanner(System.in);
        Integer count=scan.nextInt();
        Integer one;
        Integer two;
        Integer i;
        ArrayList<Integer>ones=new ArrayList<>();
        ArrayList<Integer>twos=new ArrayList<>();
        ArrayList<Integer>counts=new ArrayList<>();
        for(i=0;i<count;i++){
            one=scan.nextInt();
            two=scan.nextInt();
            ones.add(one);
            twos.add(two);
        }
        for(i=0;i<count;i++){
            if(ones.get(i)==twos.get(i)){
                counts.add(1);
            }
            else{
                counts.add(0);
            }
        }
        print(count,counts);
    }
    Integer print(Integer count,ArrayList<Integer>counts){
        Integer i;
        for(i=0;i<count-2;i++){
            if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){
                System.out.println("YES");
                return 0;
            }
        }
        System.out.println("NO");
        return 0;
    }
    public static void main(String args[]){
        Main2 printer = new Main2();
        printer.run(args);
    }
}

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

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

int main() {
  int n;
  int d1, d2;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> d1[i] >> d2[i];
  }

  int count = 0;
  for (int i = 0; i < n; i++) {
    cin >> d1 >> d2;
    if (d1 == d2)
    {
      count++;
      if (count == 3) {
        break;
      }
    }
    else
    {
      count = 0;
    }
  }
  
  if (count == 3) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid types 'int[int]' for array subscript
    9 |     cin >> d1[i] >> d2[i];
      |              ^
a.cc:9:23: error: invalid types 'int[int]' for array subscript
    9 |     cin >> d1[i] >> d2[i];
      |                       ^
Language: Java

import java.util.Arrays;
import java.util.Scanner;
import java.util.Vector;
public class NewClass {

	public static void main(String[] args) {
		Scanner ob=new Scanner(System.in);
		int t=ob.nextInt();
		Vector<Integer> v=new Vector();
		for (int T=1; T<=t; T++) {
			int a=ob.nextInt();
			int b=ob.nextInt();
			v.add(a);
			v.add(b);
		}
		int k=0;
		for (int i=0; i<=v.size()-6; i+=2) {
			if (v.get(i)==v.get(i+1)&&v.get(i+2)==v.get(i+3)&&v.get(i+4)==v.get(i+5)) {
				k=1;
				break;
			}
		}
		if (k==1) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
}

Compiler output:
Main.java:4: error: class NewClass is public, should be declared in a file named NewClass.java
public class NewClass {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1LL << 60;
const ll mod=1000000007;

int main(){
    int N, count = 0;
    cin >> N;
    for(int i=0; i<N; i++) {
        int a, b;
        cin >> a >> b;
        if(a == b) count++;
        if(a != b) count = 0;
        if(count >= 3)  {
            cout << "Yes" << endl;
            return 0;
        }
    }
    else cout << "No" << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'else' without a previous 'if'
   20 |     else cout << "No" << endl;
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> d;
    int cnt = 0;
    for(int i = 0; i < n; i++){
        int a, b;
        cin >> a >> b;
        if(a == b){
            ++cnt;
            if(cnt == 3){
                cout << "YES\n";
                return 0;
            }
        }
        else{
            cnt = 0;
        }
    }
    cout << "NO\n";
    return 0;
}

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

#include <bits/stdc++.h>

#define ll          long long int
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pair<int,int>>
#define mi          map<int,int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define rep(i,a,b)  for(i=a;i<b;i++)
#define inf         INT_MAX
#define llinf       LLONG_MAX

template<typename T, typename U> static inline void amin(T &x, U y){ if(y<x) x=y; }
template<typename T, typename U> static inline void amax(T &x, U y){ if(x<y) x=y; }

using namespace std;
void solve()
{
    int n,i;
    cin>>n;
    vii v(n);
    rep(i,0,n) cin>>v[i].F>>v[i].S;
    rep(i,0,n-2)
    {
        if(v[i].F==v[i].S || v[i+1].F==v[i+1].S || v[i+2].F==v[i+2].S)
        {
            cout<<"Yes";
            return;
        }
    }
    return false;
}
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
    int t=1;
    //cin>>t;
    while(t--)
    {
        solve();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:37:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   37 |     return false;
      |            ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
   int n; cin>>n;
   bool flag = false;
   while(n--){
     int a,b; cin>>a>>b;
     if(a==b) cnt++;
     else cnt = 0;
     if(cnt == 3){
       cout<<"Yes\n";
       return 0;
     }
   }
    cout<<"No\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
    9 |      if(a==b) cnt++;
      |               ^~~
      |               int
a.cc:10:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   10 |      else cnt = 0;
      |           ^~~
      |           int
a.cc:11:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |      if(cnt == 3){
      |         ^~~
      |         int
Language: Java

class wublaba {
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        int[] ar = new int[n];
        for(int i=0;i<n;i++)
        {
            arr[i] = sc.nextInt();
            ar[i] = sc.nextInt();
        }
        int c=0;
        int m=1;
        for(int i=0;i<n;i++)
        {
            if(arr[i]==ar[i])
            {
                c++;
                if(i==n-1)
                {
                    if(c>=3)
                        System.out.println("Yes");
                }
            }
            else
            {
                if(c>=3)
                {
                    System.out.println("Yes");
                    break;
                }
                else
                    c=0;
            }
        }
        if(c<3)
            System.out.println("No");
        
    }
}


Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class wublaba
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class wublaba
2 errors
Language: C++

# include <bits/stdc++.h>
using namespace std;
int main(){  
  int n;
  cin>>n;
  int res =0;
  int flag = 1;
  for(int i =0;i<n;i++)
  {   int x,y;
      cin>>x>>y;
      if(x==y)
      {  flag =1;
         res++;
      }
      else
      {
       flag=0;
       if(res<3)
       {  res =0;
       }
      }
  }
if(res>=3)
{  cout<<"Yes"<<endl;
}
else
{ cout<<"No"<<ensl;
}
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: 'ensl' was not declared in this scope
   27 | { cout<<"No"<<ensl;
      |               ^~~~
Language: C++

# include <bits/stdc++.h>
using namespace std;
int main(){  
  int n;
  cin>>n;
  for(int i =0;i<n;i++)
  {   int x,y;
      cin>>x>>y;
      if(x==y)
      {  flag =1;
         res++;
      }
      else
      {
       flag=0;
       if(res<3)
       {  res =0;
       }
      }
  }
if(res>=3)
{  cout<<"Yes"<<endl;
}
else
{ cout<<"No"<<ensl;
}
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'flag' was not declared in this scope
   10 |       {  flag =1;
      |          ^~~~
a.cc:11:10: error: 'res' was not declared in this scope
   11 |          res++;
      |          ^~~
a.cc:15:8: error: 'flag' was not declared in this scope
   15 |        flag=0;
      |        ^~~~
a.cc:16:11: error: 'res' was not declared in this scope
   16 |        if(res<3)
      |           ^~~
a.cc:21:4: error: 'res' was not declared in this scope
   21 | if(res>=3)
      |    ^~~
a.cc:25:15: error: 'ensl' was not declared in this scope
   25 | { cout<<"No"<<ensl;
      |               ^~~~
Language: Java

import java.io.*;
public class Main{
  public static void main(String args[])throws IOException
  {
   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int n=Integer.parseInt(br.readLine());
    int i,c=0,flag=0;
    String s;
    for(i=0;i<n;i++)
    {
      s=br.readLine();
      if(s.charAt[0]==s.charAt[2])
        c++;
      else
        c--;
      if(c>=3)
        flag=1;
    }
    if(flag==1)
      System.out.println("YES");
    else
      System.out.println("NO");
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      if(s.charAt[0]==s.charAt[2])
          ^
  symbol:   variable charAt
  location: variable s of type String
Main.java:12: error: cannot find symbol
      if(s.charAt[0]==s.charAt[2])
                       ^
  symbol:   variable charAt
  location: variable s of type String
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define COUT(x) cout<<(x)<<"\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define REP(i, n) for(int i=0;i<n;i++)
#define YES(x) cout<<(x?"YES":"NO")<<"\n"
#define Yes(x) cout<<(x?"Yes":"No")<<"\n"
#define dump(x) cout<<#x<<" = "<<(x)<<"\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int,int>;
using P = pair<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int,vector<int>,greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct { int to; int cost; };
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; }
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int main() {
  IOS;
  int n; cin >> n;

  REP(i,n) {
    int d1,d2;
    cin >> d1 >> d2;
    if (d1 == d2) cnt++;
    else cnt=0;

    if (cnt == 3) ans = 1;
  }
  Yes(ans);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:19: error: 'cnt' was not declared in this scope; did you mean 'int'?
   32 |     if (d1 == d2) cnt++;
      |                   ^~~
      |                   int
a.cc:33:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   33 |     else cnt=0;
      |          ^~~
      |          int
a.cc:35:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   35 |     if (cnt == 3) ans = 1;
      |         ^~~
      |         int
a.cc:35:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |     if (cnt == 3) ans = 1;
      |                   ^~~
      |                   abs
a.cc:37:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |   Yes(ans);
      |       ^~~
a.cc:8:23: note: in definition of macro 'Yes'
    8 | #define Yes(x) cout<<(x?"Yes":"No")<<"\n"
      |                       ^
Language: Java

import java.io.*;
public class Main{
  public static void main(String args[])
  {
   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int n=Integer.parseInt(br.readLine());
    int i,c=0,flag=0;
    String s;
    for(i=0;i<n;i++)
    {
      s=br.readLine();
      if(s.charAt[0]==s.charAt[2])
        c++;
      else
        c--;
      if(c>=3)
        flag=1;
    }
    if(flag==1)
      System.out.println("YES");
    else
      System.out.println("NO");
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      if(s.charAt[0]==s.charAt[2])
          ^
  symbol:   variable charAt
  location: variable s of type String
Main.java:12: error: cannot find symbol
      if(s.charAt[0]==s.charAt[2])
                       ^
  symbol:   variable charAt
  location: variable s of type String
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define lp(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long
#define endl "\n"

typedef pair<int,int> PII;
typedef pair<int,string> PIS;
typedef pair<string,int> PSI;


signed main(){
  cin.tie(0);	
  ios::sync_with_stdio(false);
  int n;
  cin>>n;
  int cnt=0;
  rep(i,n){
    int a,b;
    cin>>a>>b.;
    if(a==b) cnt++;
    if(cnt>=3){cout<<"Yes"<<endl;return 0;}
  }
  cout<<"No"<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:15: error: expected unqualified-id before ';' token
   31 |     cin>>a>>b.;
      |               ^
Language: C

#include<stdio.h>
int main(){
  int n;
  int a[100][2];
  scanf("%d",&n);
  for(int i=0;i<n;i++){
    scanf("%d %d",&a[i][1],&a[i][2]);
  }
  for(i=0;i<n-2;i++){
    if(a[i][1]==a[i][2] && a[i+1][1]==a[i+1][2] &&  a[i+2][1]==a[i+2][2]){
      printf("Yes");
      return 0;
    }
  }
  printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'i' undeclared (first use in this function)
    9 |   for(i=0;i<n-2;i++){
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
int main(){
 
  int n;
  cin>>n;
  
  vector<vector<int>> input(n,vector<int>(2,0));
  for(int i=0;i<n;i++){
  	cin>>input[i][0]>>input[i][1];
  }
  
  
  for(int i=0;i<n-2;i++){
  	if(input[i][0]==input[i][1]&&
      input[i+1][0]==input[i+1][1]&&
      input[i+2][0]==input[i+2][1])
    {
    	cout<<"Yes";
      	return;
    }
  }
  
  cout<<"No";
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   23 |         return;
      |         ^~~~~~
Language: C

#include<stdio.h>

int main(){
  int n;
  scanf("%d",&n);
  int s[n][3];
  for(int i=0;i<n;i++){
    scanf("%d %d",&s[n][1],&s[n][2]);
  }
  if(s[n][1] == s[n][2] && s[n-1][1] == s[n-1][2] && s[n+1][1] == s[n+1][2]){
    printf("Yes");
  }ele{
    printf("No");
  }
}

Compiler output:
main.c: In function 'main':
main.c:12:4: error: 'ele' undeclared (first use in this function)
   12 |   }ele{
      |    ^~~
main.c:12:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:7: error: expected ';' before '{' token
   12 |   }ele{
      |       ^
      |       ;
Language: C++

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

int main(){
  int N;
  int c=0;
  cin>>N;
int d[100][2];
  string s="No"
  for(int i=0;i<N;i++){
  cin>>d[i][0]>>d[i][1];
  }
  for(int i=0;i<N;i++){
   
  if(d[i][0]==d[i][1]){
  c++;
  }
    else{
    c=0;
    }
    if(c==3){
      s="Yes";
      break;
    }
    
   //cout<<c;
  }
  
  cout<<s<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i=0;i<N;i++){
      |   ^~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<N;i++){
      |               ^
Language: C

#include <stdio.h>

int main(void) {
int S[100][2];
int n,i=cnt=0;

    scanf("%d", &n);
    for(i=0; i<n; i++) scanf("%d %d", &S[i][0], &S[i][1]);

    for(i=0; i<n; i++){
        if(S[i][0]==S[i][1]) cnt++; 
        else                 cnt=0;
        if(cnt==3)          break;
    }
    if(cnt==3) printf("Yes");
    else       printf("No");    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
    5 | int n,i=cnt=0;
      |         ^~~
      |         int
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<vector>
int main(){
  int n;
  std::cin>>n;
  std::vector<int> a(n),b(n);
  for(int i=0;i<n;++i){
    cin>>a[i]>>b[i];
  }
  bool yes = false;
  for(int i=0;i+2<n;++i){
    if(a[i]==b[i] and a[i+1]==b[i+1] and a[i+2]==b[i+2])yes=true;
  }
  std::cout<<(yes?"Yes":"No")<<std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>a[i]>>b[i];
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>
#include<vector>
int main(){
  int n;
  std::cin>>n;
  std::vector<int> a(n),b(n);
  for(int i=0;i<n;++i){
    cin>>a[i]>>b[i];
  }
  bool yes = false;
  for(int i=0;i+2<n;++i){
    if(a[i]==b[i] and a[i+1]==b[i+1] and a[i+2]==b[i+2)yes=true;
  }
  std::cout<<(yes?"Yes":"No")<<std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>a[i]>>b[i];
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:55: error: expected ']' before ')' token
   12 |     if(a[i]==b[i] and a[i+1]==b[i+1] and a[i+2]==b[i+2)yes=true;
      |                                                       ^
      |                                                       ]