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

//NAME-ADITYYA OJHA
                                               /*
                                                      GURU(MENTOR)-AARADHYA
                                               */
/*
 *     Heart beats fast
 *         Colors and promises
 *             How to be brave
 *                 How can I love when I am afraid to fall...
                                             (courtesy-amnesiac_dusk)
 */

#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define forin for(int i=0;i<n;i++)
#define forjn for(int j=0;j<n;j++)
#define pb push_back
#define vx vector<ll> x
#define vy  vector<ll> y
#define fast  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define  f   first
#define  s   second
#define mod 1000000007
 const int N=2e5+ 5;
 const ll N1=1e15 + 5;

using namespace std;

//check for corner cases(for n==1)
// check for int overflow
// run on some sample cases before submitting



int main()
{
  fast;
   ll a[5];
   for(int i=0;i<5;i++)cin>>a[i];
   
   ll in=-1;
   for(int i=0;i<5;i++)
   {
       if(a[i]==0)
       {
           in=i;
           break;
       }
   }
   cout<<i<<endl;




}





Compiler output:
a.cc: In function 'int main()':
a.cc:51:10: error: 'i' was not declared in this scope; did you mean 'in'?
   51 |    cout<<i<<endl;
      |          ^
      |          in
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x1, x2, x3, x4, x5;
  cin >> xi >> x2 >> x3 >> x4 >> x5;
  if(x1 == 0) cout << 1 << endl;
  else if(x2 == 0) cout << 2 << endl;
  else if(x3 == 0) cout << 3 << endl;
  else if(x4 == 0) cout << 4 << endl;
  else if(x5 == 0) cout << 5 << endl;
}
  
 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'xi' was not declared in this scope; did you mean 'x5'?
    6 |   cin >> xi >> x2 >> x3 >> x4 >> x5;
      |          ^~
      |          x5
Language: C++

#include<bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
//long long int countt[200003];
#include<ext/pb_ds/assoc_container.hpp> // include the associative containers or group of templates such as set, multimap, map etc.
#include<ext/pb_ds/tree_policy.hpp> // include the tree_order_statistics_node update
using namespace __gnu_pbds; //necessary for the GNU based Policy based data structures.
typedef tree<pair<int,int> ,null_type,less<pair<int,int>>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;

#define int long long
#define endl "\n"
const int N = 1e6 + 10;


signed main()
{
    FAST;
    int t;
    t=1;
    
    while(t--)
    {
        int i=0,j=0,k=0,n=0,m=0,count=0,temp=0;
        int temp1=0,temp2=0,temp3=0,x=0,l=0,y=0,sum=0;
        int left=0,up=0,down=0,start=0,end=0,r=0,q=0,total=0;
        int maxx=0,minn=0,curr=0,ans=0,places=0,zeroes=0,low=0,high=0;
        int prev=0,mid=0,z=0,d=0,val=0,pos=0,shift=0,h=0,right=0,var=0;
        
        cin>>n;
        int a[n];
        map<int,int> mp,mp1;
        for(i=0;i<n;i++)
        {
            cin>>a[i];
            mp[a[i]]++;
        }
        
        ans=0;
        
        if(mp.find(1))
        {
            if(mp[1]==1)
            {
                cout<<1<<endl;
            }
            
            else
            {
                cout<<0<<endl;
            }
            
            return 0;
        }
        
        for(auto it : mp)
        {
            int num = it.first;
            count = it.second;
            
            if(count==1 && mp1.count(num)==0)
            {
                ans++;
            }
            
            if(mp1.count(num)==0)
            {
                for(i=2;i*num<N;i++)
                {
                    mp1[i*num]++;
                }
            }
            
        }
        
        cout<<ans<<endl;
        
        
    }
        
    
    
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:19: error: could not convert 'mp.std::map<long long int, long long int>::find(1)' from 'std::map<long long int, long long int>::iterator' {aka 'std::_Rb_tree<long long int, std::pair<const long long int, long long int>, std::_Select1st<std::pair<const long long int, long long int> >, std::less<long long int>, std::allocator<std::pair<const long long int, long long int> > >::iterator'} to 'bool'
   40 |         if(mp.find(1))
      |            ~~~~~~~^~~
      |                   |
      |                   std::map<long long int, long long int>::iterator {aka std::_Rb_tree<long long int, std::pair<const long long int, long long int>, std::_Select1st<std::pair<const long long int, long long int> >, std::less<long long int>, std::allocator<std::pair<const long long int, long long int> > >::iterator}
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
  for(int i=0; i<5; i++) {
  	cin >> a:
    if(a==0) b = i + 1;
  }
  cout << b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before ':' token
    7 |         cin >> a:
      |                 ^
      |                 ;
Language: C++

#include <iostream>

using namespace std;

int main()
{
 for(int i=1; i<=5; i++)
 {
   int tmp;
  cin >> tmp;
   if(0 == tmp)
   {
     cout << i;
     return; 0
   }
 }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |      return; 0
      |      ^~~~~~
a.cc:14:15: error: expected ';' before '}' token
   14 |      return; 0
      |               ^
      |               ;
   15 |    }
      |    ~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class CodeTesting {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].indexOf('0') > -1) {
                System.out.println(i + 1);
                break;
            }
        }
    }
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].indexOf('0') > -1) {
                System.out.println(i + 1);
                break;
            }
        }
    }


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

#include<iostream>
using namespace std;
int main()
{
  int arr[5];;
  int pos=0
  for(int i=0;i<5;i++)
  {
    cin>>arr[i];
    if(arr[i]==0)
    {
      pos=i+1;
    }
  
  }
  cout<<pos;
  
}

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

#include<bits/sdtc++.h>
using namespace std;
int main()
{
  int pos;
  for(int i=1;i<=5;i++)
  {
    int x;
    cin>>x;
    if(x==0);
    pos=i;
  }
  cout<<pos;
  return 0;
}

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

import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x[]= new int[5];
		int ret=0;
		for(int i=0;i<5;i++) {
			x[i] = sc.nextInt();
			if(x[i]==0) {
				ret = (i+1);
			}
		}
		System.out.println(ret);
	}
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
int n = 5;
  for(int i = 1; i <= 5; i++){
    cin >> a[i];
    sum1 += a[i];
    sum2 += i;
  }
  cout << sum2 - sum1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'a' was not declared in this scope
    6 |     cin >> a[i];
      |            ^
a.cc:7:5: error: 'sum1' was not declared in this scope
    7 |     sum1 += a[i];
      |     ^~~~
a.cc:8:5: error: 'sum2' was not declared in this scope
    8 |     sum2 += i;
      |     ^~~~
a.cc:10:11: error: 'sum2' was not declared in this scope
   10 |   cout << sum2 - sum1;
      |           ^~~~
a.cc:10:18: error: 'sum1' was not declared in this scope
   10 |   cout << sum2 - sum1;
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
  int ans=0;
  int n[5];
  for(int i=0;i<n;i++) {
    cin>>n[i];
    if(n[i]==0) ans=i+1;
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   for(int i=0;i<n;i++) {
      |               ~^~
Language: C++


#include <bits/stdc++.h>
    //#define ll long long
    using namespace std;
    #define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
    #define fileio freopen("http://in.in", "r", stdin),freopen("out.out", "w", stdout);
    #define ll long long
    #define pb push_back
    #define pll pair<ll,ll>
    #define ff first
    #define ss second
    #define mp make_pair
    #define N 2000001
    #define M 998244353
    #define INF 1000000000000000
  ll gcd(ll a,ll b)
  {
    if(b==0)return a;
    else return(gcd(b,a%b));
  }

int main()
{
  SPEED;
ll i;
for(i=0;i<5;i++)
{
  cin>>a[i];
  if(a[i]==0){cout<<i+1;return 0;}
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: 'a' was not declared in this scope
   28 |   cin>>a[i];
      |        ^
Language: C++

#include <iostream.h>

using namespace std;

void main(){
  int x[5];
  for(int i = 0;i!=5;i++){
  	cin >> x[i];
  }
  for(int i = 0;i!=5;i++){
    if(x[i] == 0){
      cout << i;
    }
  }
}

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

#include <iostream>
using namespace std;

int main() {
  for (int i=1; i<=5; i+=) {
    int x;
    cin >> x;
    if (x == 0) {
      cout << i;
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: expected primary-expression before ')' token
    5 |   for (int i=1; i<=5; i+=) {
      |                          ^
Language: C

#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
typedef long long ll;
#define fastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define what_is(x) cerr << #x << " is " << x << endl;
int main()
{
    fastIO;


    int ans=0,x;
    for (int i=0; i<5; ++i)
    {
        cin>>x;
        if (x==0)
            ans=i+1;
    }
    cout<<ans;


}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>

#define ll long long
#define ld double

using namespace std;


int main()
{
	ll ans = 0;
	for (int i = 0; i < 5; i++) {
		ll num; cin >> num;
		if (num == 0) ans = i + 1;
	}
	cout << ans;

}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

int main(){
	
	int a;

	for (int i = 0; i<5;i++) {
		
		cin >> a;
		
		if (a == 0) {
			cout << i + 1;
		}
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope
    7 |                 cin >> a;
      |                 ^~~
a.cc:10:25: error: 'cout' was not declared in this scope
   10 |                         cout << i + 1;
      |                         ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    int xi[]= new xi[5];
    Scanner sc =new Scanner(System.in);
    for(int i=0;i<5;i++){
      xi[i]=sc.nextint();
    }
    for(int i=0;i<5;i++){
      if(xi[i]==0){
        System.out.println(i+1);
        break;
      }
    }
  }
}
      

Compiler output:
Main.java:5: error: cannot find symbol
    int xi[]= new xi[5];
                  ^
  symbol:   class xi
  location: class Main
Main.java:8: error: cannot find symbol
      xi[i]=sc.nextint();
              ^
  symbol:   method nextint()
  location: variable sc of type Scanner
2 errors
Language: C++

#include<bits/stdc++.h>

using namspace std;


int main()
{
	int ans;
	for(int i = 1; i <= 5; i++){
		int x; cin >> x;
		if(!x) ans = i;
	}
	cout << ans;
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namspace'
    3 | using namspace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:10:24: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |                 int x; cin >> x;
      |                        ^~~
      |                        std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         cout << ans;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
	int a;
	for (int i=1; i<6; i++) {
    	cin >> a;
      	if (a == 0) {
        	cout << i;
          	return;
        }
    }  
}

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

#include<stdioi.h>

int main(void){
  int x[5];
  scanf("%d%d%d%d%d",&x[0],&x[1],&x[2],&x[3],&x[4]);
  for(int i=0;i<5;i++){
    if(x[i]==0){
      printf("%d\n",i);
      return 0;
    }
  }
  return 0;
}

Compiler output:
main.c:1:9: fatal error: stdioi.h: No such file or directory
    1 | #include<stdioi.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
 
int main(){
  int x;
  for(int i = 0;i<5;i++){
    cin>>x;
    if(x == ) cout<<i+1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before ')' token
    8 |     if(x == ) cout<<i+1<<endl;
      |             ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int x;
  for(int i = 0;i<5;i++){
    cin>>x;
    if(x == ) cout<<i+1<<endl;
  }

	
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected primary-expression before ')' token
    8 |     if(x == ) cout<<i+1<<endl;
      |             ^
a.cc:9:4: error: expected '}' at end of input
    9 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#define F first
#define S second
#define vec vector
#define pb push_back
#define pll pair<ll,ll>
#define pdd pair<ld, ld>
#define pq priority_queue
#define umap unordered_map
#define uset unordered_set
#define pii pair<int, int>
#define pnn pair<Node*, Node*>
#define uid uniform_int_distribution
#define FILE ifstream in("input.txt");ofstream out("output.txt");
#define fast cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0);
using namespace std;
typedef string str;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    fast;
    vec<int> m(5);
    int o = -1;
    for(int q=0; q<5; q++){
        cin>>m[q];
        if(!m[q]) o = q;
    }
    cout<<q+1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:11: error: 'q' was not declared in this scope
   36 |     cout<<q+1;
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  for(int i=1;i<=n;i++)
  {int t;
    cin>>t;
    if(t==0)
      cout<<i;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: 'n' was not declared in this scope
    5 |   for(int i=1;i<=n;i++)
      |                  ^
Language: C

#include<stdio.h>
signed main(){
        int x,n,p[105];
        scanf("%d %d",&x,&n);
        int i;
        for (i=0;i<n;i++){
        scanf("%d",&p[i]);
        }


        {
                int flag[105]={};
                int ans=0;
                for(i=0;i<n;i++){
                        flag[p[1]]=1;

                }
                for(i=1;i<-101;i++){
                        
                                if(flag[i]==0){
                                        int abs1,abs2;
                                        abs1=x-ans;
                                        abs2=x-i;
                                        if(abs1<0){
                                                abs1=abs1*-1;
                                        
                                        }
                                        if(abs2<0){
                                                abs=abs2*-1;
                                        }
                                        if(abs1>abs2){
                                                ans=i
                                        
                                        }
                                }
                        }
                }
                
        }
        printf("%d\n",ans);
        return(0);


}



Compiler output:
main.c: In function 'main':
main.c:29:49: error: 'abs' undeclared (first use in this function); did you mean 'abs2'?
   29 |                                                 abs=abs2*-1;
      |                                                 ^~~
      |                                                 abs2
main.c:29:49: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:54: error: expected ';' before '}' token
   32 |                                                 ans=i
      |                                                      ^
      |                                                      ;
   33 | 
   34 |                                         }
      |                                         ~             
main.c: At top level:
main.c:40:16: error: expected declaration specifiers or '...' before string constant
   40 |         printf("%d\n",ans);
      |                ^~~~~~
main.c:40:23: error: unknown type name 'ans'
   40 |         printf("%d\n",ans);
      |                       ^~~
main.c:41:9: error: expected identifier or '(' before 'return'
   41 |         return(0);
      |         ^~~~~~
main.c:44:1: error: expected identifier or '(' before '}' token
   44 | }
      | ^
Language: C

#include<stdio.h>
signed main(){
        int x,n,p[105];
        scanf("%d %d",&x,&n);
        int i;
        scanf("%d",&p[i]);
        {
                int flag[105]={};
                int ans=0;
                for(i=0;i<n;i++){
                        flag[p[1]]=1;

                }
                for(i=1;i<-101;i++){
                        
                                if(flag[i]==0){
                                        int abs1,abs2;
                                        abs1=x-ans;
                                        abs2=x-i;
                                        if(abs1<0){
                                                abs1=abs1*-1;
                                        
                                        }
                                        if(abs2<0){
                                                abs=abs2*-1;
                                        }
                                        if(abs1>abs2){
                                                ans=i
                                        
                                        }
                                }
                        }
                }
                
        }
        printf("%d\n",ans);
        return(0);


}



Compiler output:
main.c: In function 'main':
main.c:25:49: error: 'abs' undeclared (first use in this function); did you mean 'abs2'?
   25 |                                                 abs=abs2*-1;
      |                                                 ^~~
      |                                                 abs2
main.c:25:49: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:54: error: expected ';' before '}' token
   28 |                                                 ans=i
      |                                                      ^
      |                                                      ;
   29 | 
   30 |                                         }
      |                                         ~             
main.c: At top level:
main.c:36:16: error: expected declaration specifiers or '...' before string constant
   36 |         printf("%d\n",ans);
      |                ^~~~~~
main.c:36:23: error: unknown type name 'ans'
   36 |         printf("%d\n",ans);
      |                       ^~~
main.c:37:9: error: expected identifier or '(' before 'return'
   37 |         return(0);
      |         ^~~~~~
main.c:40:1: error: expected identifier or '(' before '}' token
   40 | }
      | ^
Language: C

#include<stdio.h>
signed main(){
        int x,n,p[105];
        scanf("%d %d",&x,&n);
        int i;
        scanf("%d",&p[i]);
        {
                imt flag[105]={};
                int ans=0;
                for(i=0;i<n;i++){
                        flag[p[1]]=1;

                }
                for(i=1;i<-101;i++){
                        
                                if(flag[i]==0){
                                        int abs1,abs2;
                                        abs1=x-ans;
                                        abs2=x-i;
                                        if(abs1<0){
                                                abs1=abs1*-1;

                                        }
                                        if(abs1>abs2){
                                                ans=i
                                        
                                        }
                                }
                        }
                }
                
        }
        printf("%d\n",ans);
        return(0);


}



Compiler output:
main.c: In function 'main':
main.c:8:17: error: unknown type name 'imt'; did you mean 'int'?
    8 |                 imt flag[105]={};
      |                 ^~~
      |                 int
main.c:25:54: error: expected ';' before '}' token
   25 |                                                 ans=i
      |                                                      ^
      |                                                      ;
   26 | 
   27 |                                         }
      |                                         ~             
main.c: At top level:
main.c:33:16: error: expected declaration specifiers or '...' before string constant
   33 |         printf("%d\n",ans);
      |                ^~~~~~
main.c:33:23: error: unknown type name 'ans'
   33 |         printf("%d\n",ans);
      |                       ^~~
main.c:34:9: error: expected identifier or '(' before 'return'
   34 |         return(0);
      |         ^~~~~~
main.c:37:1: error: expected identifier or '(' before '}' token
   37 | }
      | ^
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
      int X = scan.nextInt();
      int Y = scan.nextInt();
      Boolean ans = false;
      
      for(int i=0; i<X; i++){
        if(Y == 2*X + 4*(X-i))
          ans = true
      }
      if(ans == true)
        System.out.println("Yes");
      else
        System.out.println("No");
   }
}

Compiler output:
Main.java:11: error: ';' expected
          ans = true
                    ^
1 error
Language: C++

#include<bits/stdc++.h>
int main(){
  int t = 5,i=0;
  while(t--){
    long long x;
    cin >> x;
    i++;
    if(x == 0){
      cout << i << "\n";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> x;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |       cout << i << "\n";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
      
  	Integer result=10;
  	for(int i=0;i<5;i++){
      Integer num = scan.nextInt();
      result-=num
    }
    System.out.println(result);
  }
}


Compiler output:
Main.java:10: error: ';' expected
      result-=num
                 ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
    
    System.out.println(numList);
  
  	Integer result=10;
  	for(int i=0;i<5;i++){
    	result-=numList[i];
    }
    System.out.println(result);
  }
}


Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to Integer[]
  	Integer[] numList = scan.nextLine();
  	                                 ^
1 error
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
    
    System.out.println(numList);
  
  	Integer result=10;
  	for(int i=0;i<5;i++){
    	result-=numList[i];
    }
    System.out.println(result);
  }
}


Compiler output:
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner scan = new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
    
    System.out.println(numList);
  
  	Integer result=10;
  	for(int i=0;i<5;i++){
    	result-=numList[i];
    }
    System.out.println(result);
}


Compiler output:
Main.java:13: error: reached end of file while parsing
}
 ^
1 error
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
      
  	Integer result=10;
  	for(int i=0;i++;i<5;){
    	result-=numList[i];
    }
    System.out.println(result);
  }
}


Compiler output:
Main.java:7: error: not a statement
  	for(int i=0;i++;i<5;){
  	                 ^
Main.java:7: error: ')' expected
  	for(int i=0;i++;i<5;){
  	                   ^
Main.java:7: error: illegal start of expression
  	for(int i=0;i++;i<5;){
  	                    ^
3 errors
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
    
    System.out.println(numList);
  
  	Integer result=10;
  	for(int i=0;i++;i<5;){
    	result-=numList[i];
    }
    System.out.println(result);
}


Compiler output:
Main.java:9: error: not a statement
  	for(int i=0;i++;i<5;){
  	                 ^
Main.java:9: error: ')' expected
  	for(int i=0;i++;i<5;){
  	                   ^
Main.java:9: error: illegal start of expression
  	for(int i=0;i++;i<5;){
  	                    ^
Main.java:13: error: reached end of file while parsing
}
 ^
4 errors
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
    
    System.out.println(numList)
  
  	Integer result=10;
  	for(int i=0;i++;i<5;){
    	result-=numList[i];
    }
    System.out.println(result);
}


Compiler output:
Main.java:6: error: ';' expected
    System.out.println(numList)
                               ^
Main.java:9: error: not a statement
  	for(int i=0;i++;i<5;){
  	                 ^
Main.java:9: error: ')' expected
  	for(int i=0;i++;i<5;){
  	                   ^
Main.java:9: error: illegal start of expression
  	for(int i=0;i++;i<5;){
  	                    ^
Main.java:13: error: reached end of file while parsing
}
 ^
5 errors
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
  
  	Integer result=10;
  	for(int i=0;i++;i<5;){
    	result-=numList[i];
    }
    System.out.println(result);
}


Compiler output:
Main.java:7: error: not a statement
  	for(int i=0;i++;i<5;){
  	                 ^
Main.java:7: error: ')' expected
  	for(int i=0;i++;i<5;){
  	                   ^
Main.java:7: error: illegal start of expression
  	for(int i=0;i++;i<5;){
  	                    ^
Main.java:11: error: reached end of file while parsing
}
 ^
4 errors
Language: Java

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
  	Integer[] numList = scan.nextLine();
  
  	Integer result=10;
  	for(int i=0;i++;i<5){
    	result-=numList[i]
    }
}

Compiler output:
Main.java:7: error: not a statement
  	for(int i=0;i++;i<5){
  	                 ^
Main.java:8: error: ';' expected
    	result-=numList[i]
    	                  ^
Main.java:10: error: reached end of file while parsing
}
 ^
3 errors
Language: Java

public static void main(String[] args){
  Scanner scan = new Scanner(System.in);
  Integer[] numList = scan.nextLine();
  
  Integer result=10;
  for(i=0;i++;i<5){
    result-=numList[i]
}


Compiler output:
Main.java:6: error: not a statement
  for(i=0;i++;i<5){
               ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:7: error: ';' expected
    result-=numList[i]
                      ^
Main.java:8: error: reached end of file while parsing
}
 ^
4 errors
Language: C++

#include<stdio.h>
signed main()
int X,Y;
scanf("%d %d", &X,&Y);
   if(x*2<=Y && Y<=x*4 && Y%2==0){
       printf("Yes/n");
       }
       else{
           printf("No/n");
       } 
       return(0);
}

Compiler output:
a.cc:3:1: error: expected initializer before 'int'
    3 | int X,Y;
      | ^~~
a.cc:4:6: error: expected constructor, destructor, or type conversion before '(' token
    4 | scanf("%d %d", &X,&Y);
      |      ^
a.cc:5:4: error: expected unqualified-id before 'if'
    5 |    if(x*2<=Y && Y<=x*4 && Y%2==0){
      |    ^~
a.cc:8:8: error: expected unqualified-id before 'else'
    8 |        else{
      |        ^~~~
a.cc:11:8: error: expected unqualified-id before 'return'
   11 |        return(0);
      |        ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] a = new int[5];
        for (int i=0; i<5; i++) {
            a[i] = sc.nextInt();
            if (a[i] == 0) {
                System.out.println(i+1);
            }
        }

    }

Compiler output:
Main.java:13: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] a = new int[5];
        for (int i=0; i<5; i++) {
            a[i] = sc.nextInt();
            if (a[i] == 0) {
                System.out.println(i+1);
            }
        }

    }
}

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

#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
 
int main() {
  vector<lint> x(5);
  for(auto& elem : x) cin >> elem;
  cout << find(x.begin(), x.end(), 0) - x.begin() + 1 << endl;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
signed main(){
        int x[5],i;
        for(i=o;i<5;i++){
                scanf("%d",&x[i]);
                for(i=0;i<5;i++);{
                        if(x[i]==0){c
                                printf("%d\n",i+1);
                
                        }
                }
        }

return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: 'o' undeclared (first use in this function)
    4 |         for(i=o;i<5;i++){
      |               ^
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:37: error: unknown type name 'c'
    7 |                         if(x[i]==0){c
      |                                     ^
main.c:8:40: error: expected declaration specifiers or '...' before string constant
    8 |                                 printf("%d\n",i+1);
      |                                        ^~~~~~
main.c:8:47: error: expected declaration specifiers or '...' before 'i'
    8 |                                 printf("%d\n",i+1);
      |                                               ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    if(a==0){
        cout<<"1"<<endl;
    }
    else if(b==0){
        cout<<"2"<<endl;
    }
    else if(c==0){
        cout<<"3"<<endl;
    }
    else if(d==0){
        cout<<"4"<<endl;
    }
    else{
        cout<<"5"<<endl;
    }


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int temp;
  int s=0;
  for(int i=;i<=5;i++){
    cin>>temp;
    s+=temp;}
  int p=15-s;
  cout<<p;
return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ';' token
    6 |   for(int i=;i<=5;i++){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c,d,e;
  cin >> a >> b >> c >> d >> e;
  if(a==0){
    cout << "1";
  }
  if else(b==0){
    cout << "2";
  }
  if else(c==0){
    cout << "3";
  }
  if else(d==0){
    cout << "4";
  }
  else{
    cout << "5";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before 'else'
   10 |   if else(b==0){
      |      ^~~~
      |      (
a.cc:13:6: error: expected '(' before 'else'
   13 |   if else(c==0){
      |      ^~~~
      |      (
a.cc:16:6: error: expected '(' before 'else'
   16 |   if else(d==0){
      |      ^~~~
      |      (
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{
      |   ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c,d,e;
  cin >> a >> b >> c >> d >> e;
  if(a==0){
    cout << "1";
  }
  if else(b==0){
    cout << "2";
  }
  if else(c==0){
    cout << "3";
  }
  if else(c==0){
    cout << "4";
  }
  else{
    cout << "5";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before 'else'
   10 |   if else(b==0){
      |      ^~~~
      |      (
a.cc:13:6: error: expected '(' before 'else'
   13 |   if else(c==0){
      |      ^~~~
      |      (
a.cc:16:6: error: expected '(' before 'else'
   16 |   if else(c==0){
      |      ^~~~
      |      (
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else{
      |   ^~~~
Language: C++

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


int main()
{
  int x[5];cin>>x[0]>>x[1]>>x[2]>>x[3]>>x[4];
  for(i=0;i<5;i++)
  {
    if(x[i]==0)
    {
      break;
    }
    
  }
  cout<<i+1<<"\n";
  
  return 0;
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<5;i++)
      |       ^
a.cc:16:9: error: 'i' was not declared in this scope
   16 |   cout<<i+1<<"\n";
      |         ^
Language: C++

//ritik_patel05

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& STL DEBUGGER &&&&&&&&&&&&&&&&&&&&&&&&&&&

// #define _GLIBCXX_DEBUG       // Iterator safety; out-of-bounds access for Containers, etc.
// #pragma GCC optimize "trapv" // abort() on (signed) integer overflow.

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& LIBRARIES &&&&&&&&&&&&&&&&&&&&&&&&&&&

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

/*#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
template<typename T, typename V = __gnu_pbds::null_type>
using ordered_set = __gnu_pbds::tree<T, V, less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>; 
*/
//find_by_order()->returns an iterator to the k-th largest element(0-based indexing)
//order_of_key()->Number of items that are strictly smaller than our item

//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& DEFINES &&&&&&&&&&&&&&&&&&&&&&&&&&&

#define int long long int
#define all(i) i.begin(), i.end()
#define sz(a) (int)a.size()
 
// const ld PI  = 3.141592;
const int dx4[4] = {0, 1, 0, -1};
const int dy4[4] = {-1, 0, 1, 0};
const int dx8[8] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy8[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
 
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& DEBUG &&&&&&&&&&&&&&&&&&&&&&&&&&&
 
#define XOX
vector<string> vec_splitter(string s) {
    for(char& c: s) c = c == ','?  ' ': c;
    stringstream ss; ss << s;
    vector<string> res;
    for(string z; ss >> z; res.push_back(z));
    return res;
}
 
void debug_out(vector<string> __attribute__ ((unused)) args, __attribute__ ((unused)) int idx) { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, Head H, Tail... T) {
    if(idx > 0) cerr << ", ";
    stringstream ss; ss << H;
    cerr << args[idx] << " = " << ss.str();
    debug_out(args, idx + 1, T...);
}
 
#ifdef XOX
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __VA_ARGS__)
#else
#define debug(...) 42
#endif
 
 
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& CODE &&&&&&&&&&&&&&&&&&&&&&&&&&&

void solve(){
    int a[5];
    for(int i = 0; i < n; ++i){
        cin >> a[i];
        if(a[i] != (i + 1)){
            cout << i + 1 <<  "\n";
            return; 
        }
    }
}


int32_t main(){
    ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); 
    int T = 1; 
    // cin >> T;
    for(int i = 1; i <= T; ++i){
        // brute();
        solve();
    }
    return 0;
}

/*
Sample inp
*/

Compiler output:
a.cc: In function 'void solve()':
a.cc:64:24: error: 'n' was not declared in this scope
   64 |     for(int i = 0; i < n; ++i){
      |                        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int ans;
  int c=0;
  for(int i=0;i<5;i++)
  {
    int val;
    c++;
    cin>>val;
    if(val==0)
    {
    	cout<<val;
      	return ;
    }
  }
  return 0;
}

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

#include<bits/stdc++.h>
using manespace std;
int main()
{
  int n=5;
  vector<int>v(5);
  for(int i=0;i<n;i++)
  {
  cin >> v[i];
    if(v[i]==0)
      cout << i+1;
  }
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'manespace'
    2 | using manespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int>v(5);
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int>v(5);
      |          ^~~
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> v[i];
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 'v' was not declared in this scope
    9 |   cin >> v[i];
      |          ^
a.cc:11:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |       cout << i+1;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>

int main(void) 
{
    int X, N;
    std::cin >> X >> N;

    std::vector<int> a(N);
    for(int i = 0;i < N; i++) {
        std::cin >> a[i];
    }

    std::sort(a.begin(),a.end());

    int s = N/2;
    int count = 0
    int left = 0;
    int right = s;
    while (1) {
        count ++;
        if (X > a[s]) {
            s = s/2;
            left = left;
            right = s;
        }
        else {
            s = s + (N - s)/2;
        }
        if (a[left + 1] == a[right]) {
            break;
        }
    }

    std::cout << a[left] << std::endl;

    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: expected ',' or ';' before 'int'
   17 |     int left = 0;
      |     ^~~
a.cc:23:13: error: 'left' was not declared in this scope; did you mean 'std::left'?
   23 |             left = left;
      |             ^~~~
      |             std::left
In file included from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54,
                 from a.cc:1:
/usr/include/c++/14/bits/ios_base.h:1062:3: note: 'std::left' declared here
 1062 |   left(ios_base& __base)
      |   ^~~~
a.cc:29:15: error: 'left' was not declared in this scope; did you mean 'std::left'?
   29 |         if (a[left + 1] == a[right]) {
      |               ^~~~
      |               std::left
/usr/include/c++/14/bits/ios_base.h:1062:3: note: 'std::left' declared here
 1062 |   left(ios_base& __base)
      |   ^~~~
a.cc:34:20: error: 'left' was not declared in this scope; did you mean 'std::left'?
   34 |     std::cout << a[left] << std::endl;
      |                    ^~~~
      |                    std::left
/usr/include/c++/14/bits/ios_base.h:1062:3: note: 'std::left' declared here
 1062 |   left(ios_base& __base)
      |   ^~~~
Language: C++

// Sky's the limit :)
#include <bits/stdc++.h>
using namespace std;
#define int long long

signed main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
    int t = 1; 
    // cin >> t; 
    while (t--) {
        int a[6];
        for(int i = 1; i <= n; i++) {
            cin >> a[i];
            if(a[i] == 0)
                return cout << i, 0;
        }
        
    }
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'n' was not declared in this scope
   13 |         for(int i = 1; i <= n; i++) {
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define sync ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define rep(i,n) for(int i=0; i<int(n); ++i)
#define repp(i,a,n) for(int i=a; i<int(n); ++i)
#define sz(x) (x).size()
#define pq priority_queue
#define pb push_back
#define mp make_pair

#define dbg(x) cerr << #x" = " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)

template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T> &input){for (auto const& i: input) {os << i << " ";}return os;}
template<class T1,class T2> std::ostream& operator<<(std::ostream& os, const std::pair<T1,T2> &input){os << "(" << input.first << ", " << input.second << ')';return os;}

typedef long long ll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
typedef vector<int> vi;
typedef vector<pi> vp;
typedef vector<ll> vl;
typedef vector<vi> vvi;


const int maxn = 50;

void pre(){
}

void solve(){
	int a(5);
	rep(i,5) cin >> a[i];
	rep(i,5) if(a[i] == 0){
		cout << i + 1 << endl;
	}
}

int main() {
    sync;
    int cas = 1;
    cin >> cas;
    pre();
    rep(ca, cas) solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:33:26: error: invalid types 'int[int]' for array subscript
   33 |         rep(i,5) cin >> a[i];
      |                          ^
a.cc:34:22: error: invalid types 'int[int]' for array subscript
   34 |         rep(i,5) if(a[i] == 0){
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  vector<int>vec;
  int i,index;
  for(i=0; i<5; i++)
  {
    int v;
    cin>>v;
    vec.push_back(v);
    if(v==0)
    {
      index=i+1;
    }
  }
  cout<<index<<"\n;
  return 0;
}

Compiler output:
a.cc:17:16: warning: missing terminating " character
   17 |   cout<<index<<"\n;
      |                ^
a.cc:17:16: error: missing terminating " character
   17 |   cout<<index<<"\n;
      |                ^~~~
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before 'return'
   18 |   return 0;
      |   ^~~~~~
Language: C

#include<stdio.h>

int main(void) {
	int X, Y, a;
	scanf("%d%d", &X, &Y);

	for (a = 0; a <= X; a++) {
		if (2 * a + 4 * (X - a) == Y) {
			printf("Yes");
		}
		}
printf("No")
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:13: error: expected ';' before 'return'
   12 | printf("No")
      |             ^
      |             ;
   13 |         return 0;
      |         ~~~~~~
Language: C

#include <stdio.h>

int main(void)
{
        int a[5],i;
        for(i=0;i<5;i++)
                scanf("%d",%a[i]);
        for(i=0;i<5;i++)
                if(a[i]==0) break;
        printf("%d\n",i+1);
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:28: error: expected expression before '%' token
    7 |                 scanf("%d",%a[i]);
      |                            ^