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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define FOR(i,j,k,inc) for(int i=j ; i<k ; i+=inc)
#define rep(i,n) FOR(i,0,n,1)
#define rfor(i,k,j,dec) for(int i=k-1 ; i>=j ; i-=dec)
#define repr(i,n) rfor(i,n,0,1)

int main()
{	
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
	#endif

	vector<int>arr(5);
	for(int i=0 ; i<5 ; i++)
	{
		cin>>arr[i];
		if(arr[i]==0) {cout i+1; return 0;}
	}
	return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: expected ';' before 'i'
   24 |                 if(arr[i]==0) {cout i+1; return 0;}
      |                                    ^~
      |                                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
#define rep(i, n)  for (int i = 0; i <  (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(x) (x).begin(), (x).end()
const ll INF = ll(1e18)+1;

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

    ll result = 0;
    rep(i,5){
        ll xi;
        cin >> xi;
        if(xi == 0){
            result == i+1;
        }

    cout << result;
}

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

#include <bits/stdc++.h>
using namespace std;
int main() { 
  int a,b,c,d,e ;
  cin a>>b>>c>>d>>e;
  if(a==0){
     cout<< 1<<endl;
  }
  if(b==0){
     cout<<2 <<endl;
  }
  if(c==0){
     cout<< 3<<endl;
  }
  if(d==0){
     cout<< 4<<endl;
  }
  if(e==0){
     cout<<5 <<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'a'
    5 |   cin a>>b>>c>>d>>e;
      |      ^~
      |      ;
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<math.h>
#include<bitset>
#include <numeric>
using namespace std;
using ll=long long;
using ld=long double;
using pint=pair<int,int>;
using pll=pair<ll,ll>;
#define LONG_INF 9223372036854775807
#define INF 1000000000LL
#define EPS 1e-10
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define dump(a) rep(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else cout<<endl;}
#define all(v) v.begin(),v.end()
#define pb push_back


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

    for(int i=1; i<INF; i++){
        int n;
        cin >> n;
        if(n==0){
            break;
        }
    }

    cout << i << endl;
    

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:13: error: 'i' was not declared in this scope
   37 |     cout << i << endl;
      |             ^
Language: Java

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <map>
#include <functional>
#include <cmath>
#include <cstdint>
#include <mutex>
#include <thread>
#include <bitset>

using namespace std;

int main(void)
{
	int x;

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


	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:3: error: illegal character: '#'
#include <algorithm>
^
Main.java:4: error: illegal character: '#'
#include <cstdio>
^
Main.java:5: error: illegal character: '#'
#include <vector>
^
Main.java:6: error: illegal character: '#'
#include <map>
^
Main.java:7: error: illegal character: '#'
#include <functional>
^
Main.java:8: error: illegal character: '#'
#include <cmath>
^
Main.java:9: error: illegal character: '#'
#include <cstdint>
^
Main.java:10: error: illegal character: '#'
#include <mutex>
^
Main.java:11: error: illegal character: '#'
#include <thread>
^
Main.java:12: error: illegal character: '#'
#include <bitset>
^
Main.java:22: error: not a statement
		cin >> x;
		    ^
Main.java:25: error: not a statement
			cout << i+1;
			     ^
Main.java:16: error: unnamed classes are a preview feature and are disabled by default.
int main(void)
^
  (use --enable-preview to enable unnamed classes)
Main.java:16: error: <identifier> expected
int main(void)
             ^
16 errors
Language: C

int main()
{
  int x[6];
  for (int i = 0; i < 5; i++)
  {
  	scanf("%d", &x[i]);
    if (x[i] == 0)
    {
      printf("%d", i+1);
      retunr 0;
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%d", &x[i]);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d", &x[i]);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |       printf("%d", i+1);
      |       ^~~~~~
main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:7: error: 'retunr' undeclared (first use in this function)
   10 |       retunr 0;
      |       ^~~~~~
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:13: error: expected ';' before numeric constant
   10 |       retunr 0;
      |             ^~
      |             ;
Language: C++

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

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


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

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

int main() {
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  if(a==0)
    cout<<"1"<<endl;
  if(b==0)
    cout<<"2"<<endl;
  if(c==0)
    cout<<"3"<<endl;
  if(d==0)
    cout<<"4"<<endl;
  if(e==0)
    cout<<"4"<<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 <iostream>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> n;
      |         ^~~
      |         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:8:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |          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() {
  	for(int i = 1; i <= 5; ++i){
      int x;
      cin >> x;
      if(x == 0) cout << x << endl;
    }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: 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:7:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |       if(x == 0) cout << x << endl;
      |                  ^~~~
      |                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |       if(x == 0) cout << x << endl;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: expected initializer before 'cin'
    6 |  cin >> x1 >> x2 >> x3 >> x4 >> x5;
      |  ^~~
Language: C

#include <stdio.h>
int main(){
  int a,b,c,d,e;
  scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
  if(a == 0)
    printf("1");
  if(b == 0)
    printf("2");
  if(c == 0)
    printf("3");
  if(d == 0)
    printf("4");
  if(r == 0)
    printf("5");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:6: error: 'r' undeclared (first use in this function)
   13 |   if(r == 0)
      |      ^
main.c:13:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
	// your code goes here
	int s;
	int a[5];
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(a[i]==0){
			s=i+1;
		}
	}
	cout<<s;
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);long long int a[5];
  cin>>a[i];
  for(int i=1;i<=5;i++){
    cin>>a[i];
    if(a[i]==0)
    { cout<<i;
    break;}
  }
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
using ll = long long;

int main(){
	vector<int> x(5);
	rep(i, n) cin >> x[i];
	rep(i, n) {
		if (x[i] == 0) {
			cout << i+1 << endl;
			return 0;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'n' was not declared in this scope
    8 |         rep(i, n) cin >> x[i];
      |                ^
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < n; i++)
      |                                       ^
a.cc:9:16: error: 'n' was not declared in this scope
    9 |         rep(i, n) {
      |                ^
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < n; i++)
      |                                       ^
Language: Java

import java.util.*;

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

Compiler output:
Main.java:3: error: class Mail is public, should be declared in a file named Mail.java
public class Mail{
       ^
Main.java:5: error: cannot find symbol
    	Scanner sc = new Scannar(System.in);
    	                 ^
  symbol:   class Scannar
  location: class Mail
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FASTIO std::ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

typedef long long ll;
const int N = 2e5 + 5, mod = 998244353;

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

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

#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define vpii vector< pair<int,int> >
#define mii map<int,int>
#define MOD 1000000007
using namespace std;
typedef long long ll;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int x[5];
for(int i=0;i<n;i++)
{
	cin>>x[i];
	if(x[i]==0)
	{
		cout<<i+1<<endl;
		return 0;
	}
}

return 0;
}
// Problem : A - Five Variables
// Contest : AtCoder - AtCoder Beginner Contest 170
// URL : https://atcoder.jp/contests/abc170/tasks/abc170_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)



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

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

int main(){
	int a[5];
  int answer;
  for(int i = 0; i < 5; ++i) {
    cin >> a[i]
    if(a[i]==0) answer = a[i];
  }
	cout << answer << endl;
  

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'if'
    8 |     cin >> a[i]
      |                ^
      |                ;
    9 |     if(a[i]==0) answer = a[i];
      |     ~~
Language: C++

#include<bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<int> a(6);
      |     ^~~~~~
a.cc:4:5: 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:4:12: error: expected primary-expression before 'int'
    4 |     vector<int> a(6);
      |            ^~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a[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:6:14: error: 'a' was not declared in this scope
    6 |         cin>>a[i];
      |              ^
a.cc:8:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |             cout << i << endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |             cout << i << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;

const int INF = 2e9;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'n' was not declared in this scope
   11 |     rep(i,n) cin >> a[i];
      |           ^
a.cc:2:37: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                     ^
a.cc:12:11: error: 'n' was not declared in this scope
   12 |     rep(i,n){
      |           ^
a.cc:2:37: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                     ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: no match for call to '(std::vector<int>) (int&)'
   10 |     cin >> x(i);
      |            ~^~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(){
  int x,i;
  for(i=0;i<5;i++){
    scanf("%d",&x);
    if(x==0){
      printf("%d",i+1);
      return 0;
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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


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

#include <stdio.h>

int main()
{
  int i = 1, n;
  while (true)
  {
    scanf("%d", &n);
    if (!n)
    {
      printf("%d", i);
      return 0;
    }
    i++;
  }
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: 'true' undeclared (first use in this function)
    6 |   while (true)
      |          ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:6:10: note: each undeclared identifier is reported only once for each function it appears in
    6 |   while (true)
      |          ^~~~
Language: C++

#include<bits/stdc++.h>
using namspace std;
int main(){
  int ans=-1;
	for(int i=0;i<5;i++){
    	int a;cin>>a;
      if(a==0)ans=i+1;
    }
  cout<<ans;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namspace'
    2 | using namspace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         int a;cin>>a;
      |               ^~~
      |               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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   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 arr[5]; 
  for(int i=0;i<5;i++){
    cin>>arr[i]; 
    if(arr[i]==0){ int m=i+1;
      }
    }
  cout<<m; 
  
  }

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

#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long ll;

#define REP(i, n) for(ll i=0;i<(ll)(n);i++)
#define RREP(i, n) for(ll i=(ll)(n-1);i>=0;i--)
#define FOR(i, a, b) for(ll i=(ll)(a); i<=(ll)(b); i++)
#define RFOR(i, a, b) for(ll i=(ll)(a);i>=(ll)(b); i--)
#define ALL(x) (x).begin(),(x).end()
#define SIZE(x) ((ll)(x).size())
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second

signed main()
{
	REP(i, 5){
		cin >> x;
		if(x == 0){
			cout << i;
		}
	}
	cout << endl;
}


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

def intMap(): return map(int,input().split())
def intList(): return list(map(int, input().split())) #横並びの場合
#def intListVertical(N) [int(input()) for _ in range(N)] #縦並びの場合

a = intList()

for i in range(5):
    if a[i] == 0:
        print(i + 1)


Compiler output:
a.cc:2:55: error: stray '#' in program
    2 | def intList(): return list(map(int, input().split())) #横並びの場合
      |                                                       ^
a.cc:3:2: error: invalid preprocessing directive #def; did you mean #ifdef?
    3 | #def intListVertical(N) [int(input()) for _ in range(N)] #縦並びの場合
      |  ^~~
      |  ifdef
a.cc:1:1: error: 'def' does not name a type
    1 | def intMap(): return map(int,input().split())
      | ^~~
Language: C++

#include<vector>
#include <iostream>
#include<string>
#include <complex>
#include <algorithm>
#include<string>

using namespace std;

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

    cout << n << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before '=' token
   15 |         if(x[i] === 0){
      |                   ^
Language: C

a=list(map(int,input().split()))
print(a.index(0)+1)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a=list(map(int,input().split()))
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: implicit declaration of function 'list' [-Wimplicit-function-declaration]
    1 | a=list(map(int,input().split()))
      |   ^~~~
main.c:1:8: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | a=list(map(int,input().split()))
      |        ^~~
main.c:1:12: error: expected expression before 'int'
    1 | a=list(map(int,input().split()))
      |            ^~~
main.c:2:1: error: expected ',' or ';' before 'print'
    2 | print(a.index(0)+1)
      | ^~~~~
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Arrays;
import java.util.Collections;
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int x[] = new int[5]
    for (int i = 0;i < 5; i++) {
      x[i] = scan.nextInt();
      if (x[i] == 0) {
        System.out.println(i + 1);
        return;
      }
    }
  }
}



Compiler output:
Main.java:11: error: ';' expected
    int x[] = new int[5]
                        ^
1 error
Language: C

#include <iostream>
using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: expected initializer before 'cin'
    6 |  cin >> x1 >> x2 >> x3 >> x4 >> x5;
      |  ^~~
a.cc:8:6: error: expected ';' before string constant
    8 |  cout "1";
      |      ^~~~
      |      ;
Language: C

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

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>
#include <math.h>
#define rep(i,n) for (int i=0;i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;

int main() {
    vector<int> x(5)
    rep(i,5){
        cin >> x[i];
        if (x[i]==0) cout << i+1 << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: expected ',' or ';' before 'for'
    3 | #define rep(i,n) for (int i=0;i < (n); ++i)
      |                  ^~~
a.cc:10:5: note: in expansion of macro 'rep'
   10 |     rep(i,5){
      |     ^~~
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     rep(i,5){
      |         ^
a.cc:3:31: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i=0;i < (n); ++i)
      |                               ^
Language: C

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (n); ++i)

using namespace std;

using ll = long long int;

const int MOD_NUM = 1e9 + 7;

int main() {
    // Input
    ll tmp;
    int ans;
    rep(i, 5) {
        cin >> tmp;
        if (tmp == 0) ans = i + 1;
    }

    // Process

    // Output
    cout << ans << endl;

    return 0;
}


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>
using namespace std;
typedef long long ll;

iny main(){
  ll x,i;
  for(i=1;i<=5;i++){
    cin >> x;
    if(x==0){
      cout << i;
    }
  }
}

Compiler output:
a.cc:5:1: error: 'iny' does not name a type; did you mean 'int'?
    5 | iny main(){
      | ^~~
      | int
Language: Java

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

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

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


Compiler output:
Main.java:7: error: cannot find symbol
        for(int i=0;i<a;i++){
                      ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

//Nihal Mittal - nihal_47
//Strike First , Strike Hard , No Mercy !!

/**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀
⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀
⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀
⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀
⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀
⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀
⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀
⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀
⠀⠀⠀⣼⣿⣿⣿⣿⠀⡿⠭⠭⠭⠭⢿⠀⣿⢻⣿⣿⠃⠀⠀⠀
⠀⠀⠀⠙⠛⣿⢻⠹⣿⠐⠙⠛⠟⠉⢀⣴⡟⢿⣿⡏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡟⠀⠀⠻⣦⣤⣶⠾⠋⠀⠀⠁⡦⢄⢀⠀⠀⠀
⠀⠀⠀⠀⡠⠁⡇⠑⢄⠀⠀⠀⠀⠀⠀⠔⠀⠀⠁⠀⠀⠀⠉⠁
⠀⠔⠊⠁⠀⠀⣇⠀⠀⠀⠑⡤⠤⢎⠁⠀⠀⡘⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢢⠠⠀⡠⢆⠀⠀⡠⠙⢄⠀⡸⠀
**/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define all(v) (v).begin(),(v).end()
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(0);
#define pii pair<ll,ll>
#define vi(x) vector<x>
#define maxn 100005
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
using namespace std;
using namespace __gnu_pbds;

signed main()
{
    fast;
   
    ll x[7],ans=0;
    for(i=1;i<=5;i++)
    {
    	cin>>x[i];
    	if(x[i]==0)
    	{
    		ans = i;
    	}
    }
    cout<<ans;


}

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

#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
const char newl = '\n';
typedef long long int Int;
typedef pair<int,int> P;
using ll = long long;
using VI = vector<int>;
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 long long INF = 1LL<<60;


int main(){
    rep(i,n){
        int a;
        cin >> a;
        if(a==0){
            cout << i+1 << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: 'n' was not declared in this scope
   19 |     rep(i,n){
      |           ^
a.cc:4:40: note: in definition of macro 'REP'
    4 | #define REP(i,p,n) for(int i=p;i<(int)(n);++i)
      |                                        ^
a.cc:19:5: note: in expansion of macro 'rep'
   19 |     rep(i,n){
      |     ^~~
Language: C++

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

#define rep(i,n) for(int i = 0; i < (n); ++i)
#define ll long long

bool kaibun(string s){
    string t=s;
    reverse(s.begin(),s.end());
    return t==s;
}

int main(void)
{
    ll a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    rep(i,5){
        if(i==0){
            cout<<i+1<<endl;
            return 0;
    }
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
ifstream f("A.in");

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

    return 0;
}


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>
using namespace std;
#define fi(a) scanf("%d",&a);
#define fli(a) scanf("%ld",&a);
#define fll(a) scanf("%lld",&a);
#define pi(a) printf("%d\n",a);
#define ppi(i,a) printf("Case %d: %d\n",i,a);
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

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

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: expected ';' before '}' token
   17 |         if(n==0) cout << i << endl
      |                                   ^
      |                                   ;
   18 |     }
      |     ~
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#define read_in_arr(a, n) for(int i=0;i<n;i++){ cin>>a[i];}
#define print_arr(a, n) for(int i=0;i<n;i++){ cout<<a[i];}
using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
	int a[5];
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(a[i]==0){
			cout<<i+1<<endl;
			break;
		}
	}
	return 0;
}

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

import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int a = Integer.parseInt(st.nextToken());
	 		int b = Integer.parseInt(st.nextToken());
	 		int c = Integer.parseInt(st.nextToken());
	 		int d = Integer.parseInt(st.nextToken());
	 		int e = Integer.parseInt(st.nextToken());
	 		
 		if (a == 0){
 			out.println(0);
 		}
 		else if (b == 0){
 			out.println(1);
 		}
 		else if (c == 0){
 			out.println(2);
 		}
 		else if (d == 0){
 			out.println(3);
 		}
 		else if (e == 0){
 			out.println(4);
 		}
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	


import java.util.*;
import java.io.*;
public class Main {

	public static void main(String[] args) throws Exception{
		int num = 998244353;

		// TODO Auto-generated method stub
 		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
 		PrintWriter out = new PrintWriter(System.out);
 		
	 		StringTokenizer st = new StringTokenizer(bf.readLine());
	 		int a = Integer.parseInt(st.nextToken());
	 		int b = Integer.parseInt(st.nextToken());
	 		int c = Integer.parseInt(st.nextToken());
	 		int d = Integer.parseInt(st.nextToken());
	 		int e = Integer.parseInt(st.nextToken());
	 		
 		if (a == 0){
 			out.println(1);
 		}
 		else if (b == 0){
 			out.println(2);
 		}
 		else if (c == 0){
 			out.println(3);
 		}
 		else if (d == 0){
 			out.println(4);
 		}
 		else if (e == 0){
 			out.println(5);
 		}
 		
 		
 		out.println();
	 		
 		out.close();
 		
 		
 		
 	}
}
 	
 
//StringJoiner sj = new StringJoiner(" "); 
//sj.add(strings)
//sj.toString() gives string of those stuff w spaces or whatever that sequence is

 		
 		
 		
 		
	




Compiler output:
Main.java:57: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:58: error: class, interface, enum, or record expected
import java.io.*;
^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
	ios::syc_with_stdio(0);
	cin.tie(0);
	for(int i = 1;i<=5;i++)
    {
      int a;
      cin>>a;
      if(a==0)
      {
        cout<<i;
      }
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'syc_with_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
    5 |         ios::syc_with_stdio(0);
      |              ^~~~~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'flag' was not declared in this scope
    6 |     flag = 0;
      |     ^~~~
Language: C

#include <iostream>
#include<sstream>
#include<string>
#include<vector>
#include <cmath>
#include <limits>
#include <queue>
#include<algorithm>
#include<cstring>
#include <cstdlib>
#include <cstdio>
#include <set>
#include <iomanip>
#include <map>
#include <stack>
#include <memory>
#include <numeric>
#include <type_traits>

using namespace std;

#define rep(i,n) for (int (i)=0;(i)<(n);i++)
typedef long long ll;
const int MAXV = 1e9;



int main(){
  int a[5];
  int ans;
  rep(i,5){
    cin >> a[i];
    if (a[i] != i+1)
    ans = i+1;
  }
  cout << ans;


  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: 'N' was not declared in this scope
    5 |         for(int i=0; i<N; i++){
      |                        ^
Language: Java

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


Compiler output:
Main.java:7: error: cannot find symbol
        String [] str = new String [a];
                                    ^
  symbol:   variable a
  location: class Main
Main.java:8: error: cannot find symbol
        for(int i=0;i<a;i++){
                      ^
  symbol:   variable a
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Arrays;
import java.util.Collections;
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int x[] = new int[5]
    for (int i = 0;i < N; i++) {
      x[i] = scan.nextInt();
      if (x[i] == 0) {
        System.out.println(i + 1);
        return;
      }
    }
  }
}


Compiler output:
Main.java:11: error: ';' expected
    int x[] = new int[5]
                        ^
1 error
Language: C++

#pragma GCC optimize ("-O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;

#define all(c) (c).begin(),(c).end()
#define endl "\n"
#define ff first
#define ss second
#define allr(c) (c).rbegin(),(c).rend()
#define ifr(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define pof pop_front
#define pob pop_back
#define pb emplace_back
#define pf emplace_front
#define fstm(m,n,r) m.reserve(n);m.max_load_factor(r)
#define mp make_pair
#define mt make_tuple
#define inf LLONG_MAX
#define os tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//order_of_key (k) : Number of items strictly smaller than k .
//find_by_order(k) : K-th element in a set (counting from zero).
const double PI = acos(-1);
typedef complex<double> cd;
typedef long long ll;
ll gcd(){return 0ll;} template<typename T,typename... Args> T gcd(T a,Args... args) { return __gcd(a,(__typeof(a))gcd(args...)); }
typedef map<ll,ll> mll;
typedef map<string,ll> msll;
typedef unordered_map<ll,ll> umap;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
typedef long double ld;
#define mod 1000000007 
#define N 100001

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
    #endif
    // int T;cin>>T;while(T--) 
    {
        int a[5];
        ifr(i, 0, n) cin>>a[i];
        ifr(i, 0, n) if(!a[i]) {
            cout<<i+1<<endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:19: error: 'n' was not declared in this scope
   50 |         ifr(i, 0, n) cin>>a[i];
      |                   ^
a.cc:15:42: note: in definition of macro 'ifr'
   15 | #define ifr(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
      |                                          ^~~
a.cc:51:19: error: 'n' was not declared in this scope
   51 |         ifr(i, 0, n) if(!a[i]) {
      |                   ^
a.cc:15:42: note: in definition of macro 'ifr'
   15 | #define ifr(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
      |                                          ^~~
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before 'if'
   10 |         cin>>x
      |               ^
      |               ;
   11 |         if(x==0) cout<<i+1<<endl;
      |         ~~
Language: C++

#include<bits/stdc++.h>
#define console
using namespace std;
#ifndef console
ifstream fin("data.in");
ofstream fout("data.out");
#else
#define fin cin
#define fout cout
#endif
#define usain_bolt() (ios_base::sync_with_stdio(false), \
fin.tie(NULL), fout.tie(NULL))
typedef long long ll;
int main()
{
    usain_bolt();
    ll a, b, c, d, e;
    if a(a == 0) fout << 1;
    else if (b == 0) fout << 2;
    else if (c == 0) fout << 3;
    else if (d == 0) fout << 4;
    else if (c == 0) fout << 5;
    
#ifndef console
    fin.close(), fout.close();
#endif
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: expected '(' before 'a'
   18 |     if a(a == 0) fout << 1;
      |        ^
      |        (
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else if (b == 0) fout << 2;
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)  for(ll i=0; i<n; i++)
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define INF 1e9
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main(){
  int x(5); rep(i,5) cin >> x[i];
  rep(i,5) if(x[i]==0) cout << i+1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: invalid types 'int[ll {aka long long int}]' for array subscript
   12 |   int x(5); rep(i,5) cin >> x[i];
      |                              ^
a.cc:13:16: error: invalid types 'int[ll {aka long long int}]' for array subscript
   13 |   rep(i,5) if(x[i]==0) cout << i+1;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define stop exit(0)
#define pb push_back
int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    vector<long long>v;
    pair<string, long long> n;
    set<string> y;
    long long a,b,c,d=0,e=0,i,f=0,g=0,j,k=1,l=0,r=0,z,m,h,p;
    string t,s,x;
    double q,u;
    cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
    for(i=1;i<=5;i++){
        if(p[i]==0){
            cout<<i;
            stop;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: invalid types 'long long int[int]' for array subscript
   14 |     cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
      |           ^
a.cc:14:17: error: invalid types 'long long int[int]' for array subscript
   14 |     cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
      |                 ^
a.cc:14:23: error: invalid types 'long long int[int]' for array subscript
   14 |     cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
      |                       ^
a.cc:14:29: error: invalid types 'long long int[int]' for array subscript
   14 |     cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
      |                             ^
a.cc:14:35: error: invalid types 'long long int[int]' for array subscript
   14 |     cin>>p[1]>>p[2]>>p[3]>>p[4]>>p[5];
      |                                   ^
a.cc:16:13: error: invalid types 'long long int[long long int]' for array subscript
   16 |         if(p[i]==0){
      |             ^
Language: C++

#include <bits/stdc++.h>

using namespace std ;

const int MAX = 1e5 + 10 ;

int arr[MAX] ;
int n ;

int main()
{
	ios_base::sync_with_stdio(0) ;
	cin.tie(0) ;
	for(int i = 1 ; i <= 5 ; ++i)
		cin>>arr[i] ;
	for(int i = 1 ; i <= 5 ; ++)
	{
		if(!arr[i])
			return cout<<i<<"\n" , 0 ;
	}
	return 0 ;
}		

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

//  RAKSHIT KADAM
//ALWAYS USE &IT FOR ITERATING USING AUTO ...
//USE COUNT(STARTING ADDRESS, ENDING ADRESS ,VALUE) FOR FINDING THE COUNT IN THE RESPECTIVE DATA STRUCTURE
//NOTE THAT MEMSET CANT FILL THE DOUBLE VALUES;
//ACCUMULATE DOES NOT WORK PROPERLY IF VALUES START SUMMING BEYOND 1E9...
 #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #define ordered_set tree< int ,  null_type ,  less<int> ,  rb_tree_tag ,  tree_order_statistics_node_update>
#warning !!!check the size of arrayss!!!

// NUMERIC DEFINITIONS :
    #define INF 100000000000000005
    #define inf 1000000000
    #define MOD  1000000007
    #define newMOD  998244353
    #define MAX 300006
    #define pi 3.1415926535897932384626433832795
#define ld long double
 #define ll long long
 #define int long long

 #define P(gg) for(auto rax:gg){cout<<rax<<" ";}cout<<endl;
 #define Need_for_speed(activated) ios_base :: sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
 #define satisfy ll t; cin>> t; while(t--)
 #define inp(n) int n;cin >> n
 #define mp make_pair
 #define pb push_back
 #define endl "\n"
 #define x first
 #define y second
 #define fore(i,a,b) for(ll i=a;i<b;i++)
 #define forci(i,n) for(ll i=0;i<n;i++)
 #define vi vector<ll>
 #define Endl endl
 #define lb lower_bound
 #define ub upper_bound
#define pii pair<ll,ll>

 #define input freopen("input.txt", "r", stdin),freopen("output.txt", "w", stdout)
 #define time        cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
using namespace std;

ll gcd(ll a, ll b){if (b == 0)return a;return gcd(b, a % b);}
int power(int x, unsigned int y, unsigned int m){ if (y == 0) return 1;int p = power(x, y/2, m) % m;  p = (p * p) % m;return (y%2 == 0)? p : (x * p) % m;}
ll modInverse(int a, int m){{ return power(a, m-2, m);}}
const int maxn = 500003;
void solve()
{
    ll a[5];ll x;
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
        if(!a[i])x=i+1;
    }
    cout<<x<<endl;
}

signed main()
{
   Need_for_speed(activated);

//satisfy
//    {
//  solve();
//   }

    solve();
    
    return 0;
}


Compiler output:
a.cc:11:2: warning: #warning !!!check the size of arrayss!!! [-Wcpp]
   11 | #warning !!!check the size of arrayss!!!
      |  ^~~~~~~
a.cc: In function 'void solve()':
a.cc:52:18: error: 'n' was not declared in this scope
   52 |     for(ll i=0;i<n;i++)
      |                  ^