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

int main(){
  int h1, h2, k1, k2;
  int a, b, c, d;
  int p1, p2;

  cin >> h1 >> h2 >> k1 >> k2 >> a >> b >> c >>d;

  p1 = h1 * a + h2 * b + (h1 / 10) * c + (h2 / 10) * d;
  p2 = k1 * a + k2 * b + (k1 / 10) * c + (k2 / 10) * d;

  if(p1 > p2){
    cout << "hiroshi";
  }else if(p1 < p2){
    cout << "kenjiro";
  }else cout << "even";
  cout << endl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> h1 >> h2 >> k1 >> k2 >> a >> b >> c >>d;
      |   ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "hiroshi";
      |     ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "kenjiro";
      |     ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |   }else cout << "even";
      |         ^~~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << endl;
      |   ^~~~
a.cc:16:11: error: 'endl' was not declared in this scope
   16 |   cout << endl;
      |           ^~~~
Language: C++

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

int main(){
    int x1,x2,y1,y2;
    cin<<x1<<x2;
    cin<<y1<<y2;
    cin<<a<<b<<c<<d;
    int x=x1*a+x1/10*c+x2*b+x2/20*d;
    int y=y1*a+y1/10*c+y2*b+y2/20*d;
    if(x<y) cout<<k"enjiro"<<endl;
        else if(x>y) cout<<"hiroshi"<<endl;
        else cout<<"even"<<endl;
    return 0;
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin<<x1<<x2;
      |     ^~~
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |          ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |             ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                ^
a.cc:8:19: error: 'd' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                   ^
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |     if(x<y) cout<<k"enjiro"<<endl;
      |             ^~~~
a.cc:11:19: error: 'k' was not declared in this scope
   11 |     if(x<y) cout<<k"enjiro"<<endl;
      |                   ^
a.cc:12:22: error: 'cout' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi"<<endl;
      |                      ^~~~
a.cc:12:39: error: 'endl' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi"<<endl;
      |                                       ^~~~
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout<<"even"<<endl;
      |              ^~~~
a.cc:13:28: error: 'endl' was not declared in this scope
   13 |         else cout<<"even"<<endl;
      |                            ^~~~
Language: C++

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

int main(){
    int x1,x2,y1,y2;
    cin<<x1<<x2;
    cin<<y1<<y2;
    cin<<a<<b<<c<<d;
    int x=x1*a+x1/10*c+x2*b+x2/20*d;
    int y=y1*a+y1/10*c+y2*b+y2/20*d;
    if(x<y) cout<<"kenjiro"<<endl;
        else if(x>y) cout<<"hiroshi"<<endl;
        else cout<<"even"<<endl;
    return 0;
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin<<x1<<x2;
      |     ^~~
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |          ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |             ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                ^
a.cc:8:19: error: 'd' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                   ^
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |     if(x<y) cout<<"kenjiro"<<endl;
      |             ^~~~
a.cc:11:30: error: 'endl' was not declared in this scope
   11 |     if(x<y) cout<<"kenjiro"<<endl;
      |                              ^~~~
a.cc:12:22: error: 'cout' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi"<<endl;
      |                      ^~~~
a.cc:12:39: error: 'endl' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi"<<endl;
      |                                       ^~~~
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout<<"even"<<endl;
      |              ^~~~
a.cc:13:28: error: 'endl' was not declared in this scope
   13 |         else cout<<"even"<<endl;
      |                            ^~~~
Language: C++

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

int main(){
    int h1,h2,k1,k2;
    cin<<h1<<h2;
    cin<<k1<<k2;
    cin<<a<<b<<c<<d;
    int x=h1*a+h1/10*c+h2*b+h2/20*d;
    int y=k1*a+k1/10*c+k2*b+k2/20*d;
    if(x<y) cout<<"kenjiro";
        else if(x>y) cout<<"hiroshi";
        else cout<<"even";
    return 0;
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin<<h1<<h2;
      |     ^~~
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |          ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |             ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                ^
a.cc:8:19: error: 'd' was not declared in this scope
    8 |     cin<<a<<b<<c<<d;
      |                   ^
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |     if(x<y) cout<<"kenjiro";
      |             ^~~~
a.cc:12:22: error: 'cout' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi";
      |                      ^~~~
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout<<"even";
      |              ^~~~
Language: C++

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

int main(){
    int h1,h2,k1,k2;
    cin>>h1>>h2;
    cin>>k1>>k2;
    cin>>a>>b>>c>>d;
    int x=h1*a+h1/10*c+h2*b+h2/20*d;
    int y=k1*a+k1/10*c+k2*b+k2/20*d;
    if(x<y) cout<<"kenjiro";
        else if(x>y) cout<<"hiroshi";
        else cout<<"even";
    return 0;
    
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>h1>>h2;
      |     ^~~
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |          ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |             ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |                ^
a.cc:8:19: error: 'd' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |                   ^
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |     if(x<y) cout<<"kenjiro";
      |             ^~~~
a.cc:12:22: error: 'cout' was not declared in this scope
   12 |         else if(x>y) cout<<"hiroshi";
      |                      ^~~~
a.cc:13:14: error: 'cout' was not declared in this scope
   13 |         else cout<<"even";
      |              ^~~~
Language: C++

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

int main(){
    int h1,h2,k1,k2;
    cin>>h1>>h2;
    cin>>k1>>k2;
    cin>>a>>b>>c>>d;
    int x=h1*a+h1/10*c+h2*b+h2/20*d;
    int y=k1*a+k1/10*c+k2*b+k2/20*d;
    if(x<y) cout<<"kenjiro";
        else if(x>y) cout<<"hiroshi";
        else cout<<"even";
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'a' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |          ^
a.cc:8:13: error: 'b' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |             ^
a.cc:8:16: error: 'c' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |                ^
a.cc:8:19: error: 'd' was not declared in this scope
    8 |     cin>>a>>b>>c>>d;
      |                   ^
Language: C++

h1, h2 = gets.split.map(&:to_i)
k1, k2 = gets.split.map(&:to_i)
a, b, c, d, = gets.split.map(&:to_i)
f = -> i, y { a * i + b * y + c * (i / 10) + d * (y / 20) }
h = f[h1, h2]
k = f[k1, k2]
puts h > k ? 'hiroshi' : h < k ? 'kenjiro' : 'even'


Compiler output:
a.cc:7:14: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    7 | puts h > k ? 'hiroshi' : h < k ? 'kenjiro' : 'even'
      |              ^~~~~~~~~
a.cc:7:34: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    7 | puts h > k ? 'hiroshi' : h < k ? 'kenjiro' : 'even'
      |                                  ^~~~~~~~~
a.cc:7:46: warning: multi-character character constant [-Wmultichar]
    7 | puts h > k ? 'hiroshi' : h < k ? 'kenjiro' : 'even'
      |                                              ^~~~~~
a.cc:1:1: error: 'h1' does not name a type
    1 | h1, h2 = gets.split.map(&:to_i)
      | ^~
a.cc:5:1: error: 'h' does not name a type
    5 | h = f[h1, h2]
      | ^
Language: Java

import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int D = scan.nextInt();
        int L = scan.nextInt();
        int x;
        int y;
        x = D/L;
        y = x/3;
        System.out.println(x+y);



Compiler output:
Main.java:13: error: reached end of file while parsing
        System.out.println(x+y);
                                ^
1 error
Language: C

 1 #include <stdio.h>
  2 int main(void){
  3     int times,dist,len;
  4
  5     scanf("%d %d",&dist,&len);
  6
  7     times=(dist/len)+(dist%len);
  8
  9     printf("%d\n",times);
 10
 11     return 0;
 12
 13     }

Compiler output:
main.c:1:2: error: expected identifier or '(' before numeric constant
    1 |  1 #include <stdio.h>
      |  ^
main.c:1:4: error: stray '#' in program
    1 |  1 #include <stdio.h>
      |    ^
Language: C

#include<stdio.h>;

int main(void){
    int d l,h;
    scanf("%d %d",&d,&l);
    h=d/l+d%l;
    printf("%d\n",h);
    return 0;
}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>;
      |                  ^
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'l'
    4 |     int d l,h;
      |           ^
main.c:4:11: error: 'l' undeclared (first use in this function)
main.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:13: error: 'h' undeclared (first use in this function)
    4 |     int d l,h;
      |             ^
main.c:5:20: error: 'd' undeclared (first use in this function)
    5 |     scanf("%d %d",&d,&l);
      |                    ^
Language: C

#include<stdio.h>

int main(void){
    int d l,h;
    scanf("%d %d",&d,&l);
    h=d/l+d%l;
    printf("%d\n",h);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'l'
    4 |     int d l,h;
      |           ^
main.c:4:11: error: 'l' undeclared (first use in this function)
main.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:13: error: 'h' undeclared (first use in this function)
    4 |     int d l,h;
      |             ^
main.c:5:20: error: 'd' undeclared (first use in this function)
    5 |     scanf("%d %d",&d,&l);
      |                    ^
Language: C

#include <stdio.h>
  int main(void){
    scanf("%d %d\n",&dist,&len);
    times=(dist/len)+(dist%len);
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:3:22: error: 'dist' undeclared (first use in this function)
    3 |     scanf("%d %d\n",&dist,&len);
      |                      ^~~~
main.c:3:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:28: error: 'len' undeclared (first use in this function)
    3 |     scanf("%d %d\n",&dist,&len);
      |                            ^~~
main.c:4:5: error: 'times' undeclared (first use in this function)
    4 |     times=(dist/len)+(dist%len);
      |     ^~~~~
Language: C

#include <stdio.h>
  2 int main(void)
  3 {
  4     int time,disit,len;
  5     scanf("%d %d",&disit,&len);
  6     time = len/disit + len%disit;
  7     printf("%d\n",time);
  8
  9     return 0;
 10 }

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2 int main(void)
      |   ^
Language: C

#include <stdio.h>
  int main(void){
    int times,dist,len;
    scanf("%d %d\n",&dist,&len);
    times=(dist/len)+(dist%len);
    printf("%d\n",&dist,&len)
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:6:30: error: expected ';' before 'return'
    6 |     printf("%d\n",&dist,&len)
      |                              ^
      |                              ;
    7 |     return 0;
      |     ~~~~~~
Language: C

#include <stdio.h>
int main(void){
int D,L,times;
times=0;
scanf("%d %d",&D,&L);
times=D/L;
times=times+D%L;
printf(""%d\n",times);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: stray '\' in program
    8 | printf(""%d\n",times);
      |            ^
main.c:8:11: error: 'd' undeclared (first use in this function)
    8 | printf(""%d\n",times);
      |           ^
main.c:8:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:12: error: expected ')' before 'n'
    8 | printf(""%d\n",times);
      |       ~    ^~
      |            )
main.c:8:14: warning: missing terminating " character
    8 | printf(""%d\n",times);
      |              ^
main.c:8:14: error: missing terminating " character
    8 | printf(""%d\n",times);
      |              ^~~~~~~~~
main.c:9:10: error: expected ';' before '}' token
    9 | return 0;
      |          ^
      |          ;
   10 | 
   11 | }
      | ~
Language: C

#include <stdio.h>
  int main(void){
    int times,dist,len;
    scanf("%d %d\n",&dist,&len);
    times=(dist/len)+(dist%len);
    printf("%d\n",times)
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:6:25: error: expected ';' before 'return'
    6 |     printf("%d\n",times)
      |                         ^
      |                         ;
    7 |     return 0;
      |     ~~~~~~
Language: C

#include <stdio.h>
  2 int main (void)
  3 {
  4     int l,d,t;
  5     scanf("%d%d",&d,&l);
  6
  7     t=d/l+d%l;
  8     printf("%d\n",t);
  9
 10     return 0;
 11 }

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2 int main (void)
      |   ^
Language: C

#include <stdio.h>
int main(void){

    int times,dist,len;
    scanf("%d %d",&dist,%len);
          times=dist/len;
          times+=dist%len;
          printf("%d\n",times);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: expected expression before '%' token
    5 |     scanf("%d %d",&dist,%len);
      |                         ^
Language: C

  1 #include <stdio.h>
  2 int main(void){
  3     int d, l;
  4
  5     scanf("%d %d",&d, &l);
  6
  7     int m = d / l;
  8     int n = d % l;
  9
 10     int s = m + n;
 11
 12
 13     printf("%d\n",s);
 14
 15
 16     return 0;
 17  }
 18
~
~
~

Compiler output:
main.c:1:3: error: expected identifier or '(' before numeric constant
    1 |   1 #include <stdio.h>
      |   ^
main.c:1:5: error: stray '#' in program
    1 |   1 #include <stdio.h>
      |     ^
main.c:18:2: error: expected identifier or '(' before numeric constant
   18 |  18
      |  ^~
Language: C

#include <stdio.h>
  2 int main(void)
  3 {
  4     int time,disit,len;
  5     scanf("%d %d",&disit,&len);
  6     time = len/disit + len%disit;
  7     printf("%d\n",time);
  8
  9     return 0;
 10 }
~

Compiler output:
main.c:2:3: error: expected identifier or '(' before numeric constant
    2 |   2 int main(void)
      |   ^
main.c:11:1: error: expected identifier or '(' before '~' token
   11 | ~
      | ^
Language: C

#incude <stdio.h>
 int main(void){
     int d, l;

     scanf("%d %d",&d, &l);

     int m = d / l;
     int n = d % l;

     int s = m + n;


     printf("%d\n",s);


     return 0;
  }

Compiler output:
main.c:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude <stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:5:6: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |      scanf("%d %d",&d, &l);
      |      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #incude <stdio.h>
main.c:5:6: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |      scanf("%d %d",&d, &l);
      |      ^~~~~
main.c:5:6: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:13:6: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |      printf("%d\n",s);
      |      ^~~~~~
main.c:13:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:6: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <stdio.h>
int main(void){
        int D,L,sam;

        scanf("%d %d",&D,&L);
        sam=(D/L)+(D%L);

   printf("%d\n",sam);

        return 0;

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

#include <iostream>
using namespace std;
int main(){
  int d,l;
  cin >>d>>l;
  int lcount =d/l;
  int num=d-lcount*l;
  if(num<0){
    num =d-lcount*l+l;
    cout << num+lcount-1<<endl;
  }else cout <<lcount<<endl;
  return 0;-1
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '}' token
   12 |   return 0;-1
      |              ^
      |              ;
   13 | }
      | ~
Language: C++

#include <bits/stdc++.h>

int main() {
  int D,L;
  std:cin >> D >> L;
  int sum;
  int a = 1;
  while(1) {
    sum = L * a;
    if(D > sum) {
      --a;
      break;
    }else if(D <= sum) {
      ++a;
      continue;
    }
  }
  std::cout << a + (D - sum) << std::endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   std:cin >> D >> L;
      |       ^~~
      |       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
      |                  ^~~
Language: C++

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

int main(){
int d,l,i;
i=0;
cin>>d>>l;
while(d>=l){
d=d-l;
i++
}
cout<<i+d<<endl;

return 0;
}


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

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

int main(){
	int d,l;
	cin>>d>>l;
	x=d/l+d%l;
	cout<<x<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'x' was not declared in this scope
    7 |         x=d/l+d%l;
      |         ^
Language: C

#include <stdio.h>

int main(int argc, char const *argv[]) {
   int n;
   int a,b,c;
   int count=0;
   int x[100],y[100],z[100];
   int i,j;
   scanf("%d%d%d%d",&n,&a,&b,&c);
   for(i=0;i<a;i++){
      scanf("%d",x[i] );
   }
   for(i=0;i<b;i++){
      scanf("%d",y[i] );
   }
   for(i=0;i<c;i++){
      scanf("%d",z[i] );
      for(j=0;j<a;j++){
         for(k=0;k<b;k++){
            if (z[i]!=x[j]!=y[k]) {
               count += 1;
            } else if (z[i]==y[k]) {
               count += 1;
            }
         }
      }
   }
   printf("%d\n"count);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:14: error: 'k' undeclared (first use in this function)
   19 |          for(k=0;k<b;k++){
      |              ^
main.c:19:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:17: error: expected ')' before 'count'
   28 |    printf("%d\n"count);
      |          ~      ^~~~~
      |                 )
Language: C

#include <stdio.h>

int main(int argc, char const *argv[]) {
   int n;
   int a,b,c;
   int count=0;
   int x[100],y[100],z[100];
   int i,j,k;
   scanf("%d%d%d%d",&n,&a,&b,&c);
   for(i=0;i<a;i++){
      scanf("%d",x[i] );
   }
   for(i=0;i<b;i++){
      scanf("%d",y[i] );
   }
   for(i=0;i<c;i++){
      scanf("%d",z[i] );
      for(j=0;j<a;j++){
         for(k=0;k<b;k++){
            if (z[i]!=x[j]!=y[k]) {
               count += 1;
            } else if (z[i]==y[k]) {
               count += 1;
            }
         }
      }
   }
   printf("%d\n"count);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:17: error: expected ')' before 'count'
   28 |    printf("%d\n"count);
      |          ~      ^~~~~
      |                 )
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z,lnum=0;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d",&xnum[i]);
    }
    scanf("\n");
    scanf("%d",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d",&znum[ib]);
    }
    scanf("\n");
    int s,h=0;,g;
    if(i>=ia){
        g=i;
    }else{
        g=ia;
    }
    for(int m=0;m<=ib;m++){
        s=0;
        while(s==0){
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }else if(h==g){
                s++;
            }
            h++;
        }
        lnum++;
    }
    printf("%d\n",lnum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected primary-expression before ',' token
   26 |     int s,h=0;,g;
      |               ^
a.cc:26:16: error: 'g' was not declared in this scope
   26 |     int s,h=0;,g;
      |                ^
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z,lnum=0;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d ",&xnum[i]);
    }
    scanf("\n");
    scanf("%d ",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d ",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d ",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d ",&znum[ib]);
    }
    scanf("\n");
    int s,h=0;,g;
    if(i>=ia){
        g=i;
    }else{
        g=ia;
    }
    for(int m=0;m<=ib;m++){
        s=0;
        while(s==0){
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }else if(h==g){
                s++;
            }
            h++;
        }
        lnum++;
    }
    printf("%d\n",lnum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected primary-expression before ',' token
   26 |     int s,h=0;,g;
      |               ^
a.cc:26:16: error: 'g' was not declared in this scope
   26 |     int s,h=0;,g;
      |                ^
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z,lnum=0;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d ",&xnum[i]);
    }
    scanf("\n");
    scanf("%d ",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d ",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d ",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d ",&znum[ib]);
    }
    scanf("\n");
    int s,h=0;,g;
    if(i>=ia){
        g=i;
    }else{
        g=ia;
    }
    for(int m=0;m<ib+1;m++){
        s=0;
        while(s==0){
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }else if(h==g){
                s++;
            }
            h++;
        }
        lnum++;
    }
    printf("%d\n",lnum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected primary-expression before ',' token
   26 |     int s,h=0;,g;
      |               ^
a.cc:26:16: error: 'g' was not declared in this scope
   26 |     int s,h=0;,g;
      |                ^
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z,lnum=0;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d ",&xnum[i]);
    }
    scanf("\n");
    scanf("%d ",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d ",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d ",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d ",&znum[ib]);
    }
    scanf("\n");
    int s,h=0;,g;
    if(i>=ia){
        g=i+1;
    }else{
        g=ia+1;
    }
    for(int m=0;m<ib+1;m++){
        s=0;
        while(s==0){
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }else if(h==g){
                s++;
            }
            h++;
        }
        lnum++;
    }
    printf("%d\n",lnum);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:15: error: expected primary-expression before ',' token
   26 |     int s,h=0;,g;
      |               ^
a.cc:26:16: error: 'g' was not declared in this scope
   26 |     int s,h=0;,g;
      |                ^
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d ",&xnum[i]);
    }
    scanf("\n");
    scanf("%d ",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d ",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d ",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d ",&znum[ib]);
    }
    scanf("\n");
    int s=0,h,g;
    if(i>=ia){
        g=i+1;
    }else{
        g=ia+1;
    }
    for(int m=0;m<ib+1;m++){
        s=0;
        for(h=0;h<g;h++)
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }
        }
    }
    printf("%d\n",s);
    return 0;
}


Compiler output:
a.cc:40:11: error: expected constructor, destructor, or type conversion before '(' token
   40 |     printf("%d\n",s);
      |           ^
a.cc:41:5: error: expected unqualified-id before 'return'
   41 |     return 0;
      |     ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include<stdio.h>
int main(){
    int n,x,y,z;
    int xnum[100];
    int ynum[100];
    int znum[100];
    scanf("%d\n",&n);
    scanf("%d ",&x);
    int i;
    for(i=0;i<x;i++){
        scanf("%d ",&xnum[i]);
    }
    scanf("\n");
    scanf("%d ",&y);
    int ia;
    for(ia=0;ia<y;ia++){
        scanf("%d ",&ynum[ia]);
    }
    scanf("\n");
    scanf("%d ",&z);
    int ib;
    for(ib=0;ib<z;ib++){
        scanf("%d ",&znum[ib]);
    }
    scanf("\n");
    int s=0,h,g;
    if(i>=ia){
        g=i+1;
    }else{
        g=ia+1;
    }
    for(int m=0;m<ib+1;m++){
        for(h=0;h<g;h++)
            if(znum[m]==xnum[h]||znum[m]==ynum[h]){
                s++;
            }
        }
    }
    printf("%d\n",s);
    return 0;
}


Compiler output:
a.cc:39:11: error: expected constructor, destructor, or type conversion before '(' token
   39 |     printf("%d\n",s);
      |           ^
a.cc:40:5: error: expected unqualified-id before 'return'
   40 |     return 0;
      |     ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

#include<stdio.h>
int main(void)
{
	int n,x,y,z,i,j,flg,fcnt,cnt1,cnt2;
	int a[101],b[101],c[101];
	scanf("%d %d",&n,&x);
	for(i=0;i<x;i++) scanf("%d",&a[i]);
	scanf("%d",&y);
	for(i=0;i<y;i++) scanf("%d",&b[i]);
	scanf("%d",&z);
	for(i=0;i<z;i++) scanf("%d",&c[i]);
	fcnt=0;
	for(i=0;i<x;i++){
		for(j=0;j<z;j++){
			if(a[i]==c[j]){
				c[j]=0;  fcnt++;
			}	
		}
	}
	cnt1=0; flg=0;
	if(fcnt!=0){
		for(i=0;i<z;i++){
			if(c[i]!=0) cnt1++;
		}
	}	
	if(cnt1!=0) flg=1;
	cnt2=0;
	if(cnt1==0){
		for(i=0;i<y;i++){
			for(j=0;j<z;j++){
				if(b[i]==c[j]) cnt2++;
			}
		}
	}
	if(cnt1==0||cnt2==0) cnt2=z;
	if(flg==1) printf("%d\n",cnt1);
	else printf("%d\n",cnt2);
	return 0;

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

#include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	int a[n+1]={};
	int x;
	cin>>x;
	for(int i=0;i<x;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=1;
			}
		}
	}			
	int y;
	cin>>y;
	for(int i=0;i<y;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=10;
			}
		}
	}	
	int z;
	cin>>z;
	for(int i=0;i<z;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=100;
			}
		}
	}	
	int c=0;
	for(int i=0;i<=n;i++){
		if(a[i]==100||a[i]==110||a[i]==111){
			c+=1;
		}
	}
	cout<<c<<endl;
	return 0;
}							
#include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	int a[n+1]={};
	int x;
	cin>>x;
	for(int i=0;i<x;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=1;
			}
		}
	}			
	int y;
	cin>>y;
	for(int i=0;i<y;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=10;
			}
		}
	}	
	int z;
	cin>>z;
	for(int i=0;i<z;i++){
		int b;
		cin>>b;
		for(int j=0;j<100;j++){
			if(b==j){
				a[j]+=100;
			}
		}
	}	
	int c=0;
	for(int i=0;i<=n;i++){
		if(a[i]==100||a[i]==110||a[i]==111){
			c+=1;
		}
	}
	cout<<c<<endl;
	return 0;
}							



Compiler output:
a.cc:51:5: error: redefinition of 'int main()'
   51 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

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

int main(){
    int n=0,a=0,count=0;

    cin>>n;

    int x[3][100];
    for(int i=0;i<3;i++){
        cin>>a;

        for(int j=0;j<a;j++){
            cin>>b;
            x[i][j]=1;

        }


    }

    for(int j=0;j<a;j++){
        
        if(x[1][j]==0 && x[3][j]==1){
            count++;
        }
        if(x[2][j]==1 && x[3][j]==1){
            count++;
        }
        if(x[1][j]==0 && x[2][j]==1 && x[3][j]==1){
            count--;
        }
    }
    cout<<count<<endl;



}


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

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

int main(){
    int n=0,a=0,count=0,b=0,t=0;

    cin>>n;

        int x[3][100]={};    

    for(int i=0;i<3;i++){
        cin>>a;
        t=a;


        for(int j=0;j<t;j++){
            cin>>b;
            x[i][b-1]=1;

        }

    }


    for(int j=0;j<n;j++){
        
        if(x[0][j]==0 && x[2][j]==1){
            count++;
        }
        if(x[1][j]==1 && x[2][j]==1){
            count++;

        }
        if(x[0][j]==0 && x[1][j]==1 && x[2][j]==1){
            count--;
        }
    }
    cout<<count<<endl;



}


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

#include<iostream>
using namespace std;

int main(){
    int n,x[3],p[100]={},ans =0;
    cin>>n;
    for(int i =0;i<3;i++){
        cin>>x[i]
        for(int j =0;j<x[i];j++){
            int t;
            cin>>t;t--;
            p[t] += 1;
        }
        if(i != 2)for(int j=0;j<n;j++)p[j] *= 2;
    }
    for(int i =0;i<n;i++){
        if(p[i]==7||p[i]==3||p[i]==1)ans++;
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'for'
    8 |         cin>>x[i]
      |                  ^
      |                  ;
    9 |         for(int j =0;j<x[i];j++){
      |         ~~~       
a.cc:9:22: error: 'j' was not declared in this scope
    9 |         for(int j =0;j<x[i];j++){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n,x[3],p[100]={},ans =0;
    cin>>n;
    for(int i =0;i<3;i++){
        cin>>x[i]
        for(int j =0;j<x[i];j++){
            int t;
            cin>>t;
            t--;
            p[t] += 1;
        }
        if(i != 2)for(int j=0;j<n;j++)p[j] *= 2;
    }
    for(int i =0;i<n;i++){
        if(p[i]==7||p[i]==3||p[i]==1)ans++;
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before 'for'
    8 |         cin>>x[i]
      |                  ^
      |                  ;
    9 |         for(int j =0;j<x[i];j++){
      |         ~~~       
a.cc:9:22: error: 'j' was not declared in this scope
    9 |         for(int j =0;j<x[i];j++){
      |                      ^
Language: C++

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

int main(){
    int n,x,t,ans =0;
    cin>>n;
    set<int>s[3];
    for(int i =0;i<3;i++){
        cin>>x;
        for(int j =0;j<x;j++){
            cin>>t;
            s[i].insert(t);
        }
    }
    for(int i=o;i<n;i++){
        int a[3]={};
        for(int j=0;j<3;j++){
            if(s[j].count(i))a[j]++;
        }
        if(a[2] && !a[0] || a[2] && a[1])ans++;
    }
    cout<<ans<<endl;
}


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

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

int main(){
    int n,x,t,ans =0;
    cin>>n;
    set<int>s[3];
    for(int i =0;i<3;i++){
        cin>>x;
        for(int j =0;j<x;j++){
            cin>>t;
            s[i].insert(t);
        }
    }
    for(int i=o;i<n;i++){
        int a[3]={};
        for(int j=0;j<3;j++){
            if(s[j].count(i))a[j]++;
        }
        if(a[2] && !a[0] || a[2] && a[1])ans++;
    }
    cout<<ans<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    vectot<int> v(n);
    for(int i=0;i<n;i++){
        cin>>v[i];
    }
    sort(v.rbegin(),v.rend());
    for(int i=0;i<n;i++){
        if(v[i]<=i+1){
            cout<<i+1<<endl;
            return 0;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'vectot' was not declared in this scope
    6 |     vectot<int> v(n);
      |     ^~~~~~
a.cc:6:12: error: expected primary-expression before 'int'
    6 |     vectot<int> v(n);
      |            ^~~
a.cc:8:14: error: 'v' was not declared in this scope
    8 |         cin>>v[i];
      |              ^
a.cc:10:10: error: 'v' was not declared in this scope
   10 |     sort(v.rbegin(),v.rend());
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    vector<int> v(101);
    fill(v.begin(),v.end(),0)
    for(int i=0;i<n;i++){
        int a;
        cin>>a;
        v[a]++;
    }
    for(int i=100;i>0;i+=-1){
        v[i-1]+=v[i];
    }
    for(int i=100;i>=0;i+=-1){
        if(v[i]<=i){
            cout<<i<<endl;
            return 0;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ';' before 'for'
    7 |     fill(v.begin(),v.end(),0)
      |                              ^
      |                              ;
    8 |     for(int i=0;i<n;i++){
      |     ~~~                       
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=0;i<n;i++){
      |                 ^
Language: C++

#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
int main(){
	int n,i;
	scanf("%d",&n);
	vector<int>v(n);
	for(i=0;i<n;i++)scanf("%d",&v[i]);
	sort(v.begin(),v.end(),greater<int>());
	for(i=0;i<n&&v[i]>=i+1;i++);
	printf("%d\n",i);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
    7 |         scanf("%d",&n);
      |         ^~~~~
a.cc:12:9: error: 'printf' was not declared in this scope
   12 |         printf("%d\n",i);
      |         ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <functional>
  +++ |+#include <cstdio>
    4 | using namespace std;
Language: C++

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

int main()
{
	int N;
	cin>>N;
	
	int p[100];
	for(int i=0;i<N;i++){
		cin>>p[i];
	}
	
	sort(p,p+N);
	
	int score=0;
	for(int i=1; i<=N;i++){
		if(((p+N)-lower_bound(p,p+N,i))>=i){
			score=i;s
		}
		else{
			break;
		}
	}
	
	cout<<score<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:33: error: 's' was not declared in this scope
   20 |                         score=i;s
      |                                 ^
Language: C++

#include <stdio.h>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < n; ++i)

int main(void) {
  int n, i, j, k;
  scanf("%d", &n);
  int f[n];
  rep(i, n) scanf("%d", &f[i]);
  std::sort(f, f + n, std::greater<int>());
  rep(i, n) {
    if(p[i] <= i + 1) {
      ans = p[i];
      break;
    }
  }
  printf("%d\n", ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: 'greater' is not a member of 'std'
   10 |   std::sort(f, f + n, std::greater<int>());
      |                            ^~~~~~~
a.cc:10:36: error: expected primary-expression before 'int'
   10 |   std::sort(f, f + n, std::greater<int>());
      |                                    ^~~
a.cc:12:8: error: 'p' was not declared in this scope
   12 |     if(p[i] <= i + 1) {
      |        ^
a.cc:13:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |       ans = p[i];
      |       ^~~
      |       abs
a.cc:17:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   printf("%d\n", ans);
      |                  ^~~
      |                  abs
Language: C

#include<stdio.h>
#include<string.h>

#define MAX_N 1000

int e, n, d, r, c;
char p[MAX_N][MAX_N + 1];

int main(void)
{
	int cnt;
	int i, j;

	scanf( "%d %d ", &e, &n );
	
	for( i=0; i<n; i++ ) {
		gets( p[i] );
	}
	
	cnt = 0;
	while( 1 ) {
		
		for( i=0; i<n/2; i++ ) {
			for( j=0; j<n/2; j++ ) {
					if ( !(p[j][i] == p[n-1-j][i] && p[n-1-j][i] == p[j][n-1-i] && p[j][n-1-i] == p[n-1-j][n-1-i]) ) break;
			}
			
			if ( j < n/2 ) break;
		}
		
		if ( i >= n/2 ) cnt++;
		
		e--;
		if ( e <= 0 ) break;
		
		scanf( "%d", &d );
		
		while( d-- ) {
			scanf( "%d %d", &r, &c );
			if ( p[r-1][c-1] == '1' ) p[r-1][c-1] = '0';
			else p[r-1][c-1] = '1';
			
		}
		
	}
	
	printf( "%d\n", cnt );
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   17 |                 gets( p[i] );
      |                 ^~~~
      |                 fgets
Language: C

#include<stdio.h>


#define N_MAX 10000


char pixel[ N_MAX ][ N_MAX ] ;

int main( void )
{
	int SameOrDiff_H( char* ,int* ) ;
	int SameOrDiff_V( char(*)[ N_MAX ] ,int* ,int* ) ;

	int C ,N ;
	scanf( "%d %d" ,&C ,&N ) ;

	int cnt ;

	int i ,j ;
	for( i = cnt = 0 ; i < N ; ++i )
	{
		scanf( "%s" ,pixel[ i ] ) ;

		if( cnt == 0 && SameOrDiff_H( pixel[ i ] ,&N ) == 1 )
		{
			++cnt ;
		}
	}

	for( i = 0 ; cnt == 0 && i < N ; ++i )
	{
		if( SameOrDiff_V( pixel ,&i ,&N ) == 1 )
		{
			++cnt ;
		}
	}

	int n ;
	int Y[ 100 ] ,X[ 100 ] ;
	int y ,x ;
	for( i = 1 ; i < C ; ++i )
	{
		int same = cnt ;
		int Yp = 0 ;
		int Xp = 0 ;
		int sameY[ N_MAX + 1 ] = { 0 } ;
		int sameX[ N_MAX + 1 ] = { 0 } ;

		scanf( "%d" ,&n ) ;
		for( j = 0 ; j < n ; ++j )
		{
			scanf( "%d %d" ,&y ,&x ) ;
			if( sameY[ y ] == 0 )
			{
				Y[ Yp++ ] = y - 1 ;

				sameY[ y ] = 1 ;
			}
			if( sameX[ x ] == 0 )
			{
				X[ Xp++ ] = x - 1 ;

				sameX[ x ] = 1 ;
			}

			pixel[ y - 1 ][ x - 1 ] = pixel[ y - 1 ][ x - 1 ] == '1' ? '0' : '1' ;
		}

		for( j = 0 ; j < Yp && cnt == same ; ++j )
		{
			if( SameOrDiff_H( pixel[ Y[ j ] ] ,&N ) == 1 )
			{
				++cnt ;
			}
		}

		for( j = 0 ; j < Xp && cnt == same ; ++j )
		{
			if( SameOrDiff_V( pixel ,&X[ j ] ,&N ) == 1 )
			{
				++cnt ;
			}
		}
	}

	printf( "%d\n" ,C - cnt ) ;

	return 0 ;
}


Compiler output:
/usr/bin/ld: /tmp/ccjyOsUF.o: in function `main':
main.c:(.text+0x8d): undefined reference to `SameOrDiff_H'
/usr/bin/ld: main.c:(.text+0xcc): undefined reference to `SameOrDiff_V'
/usr/bin/ld: main.c:(.text+0x2c0): undefined reference to `SameOrDiff_H'
/usr/bin/ld: main.c:(.text+0x314): undefined reference to `SameOrDiff_V'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
usingnamespace std;
int main(){
    int c,n;
    int m[1000][1000];
    cin>>c>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin<<m[i][j];
        }
    }
    bool f=true;
    int ans=0;
    for(int i=0;i<=n/2+1;i++){
        for(int j=0;j<=n/2+1;j++){
            if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                f=false;
                break;
            }
        }
    }
    if(f){
        ans++;
    c--;
    while(c--){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int r,c;
            cin>>r>>c;
            r--;c--;
            m[r][c]^=1;
        }
        f=true;
        for(int i=0;i<=n/2+1;i++){
            for(int j=0;j<=n/2+1;j++){
                if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                    if(f){
                        ans++;
                    }
                }
            }
        }
        f=false;
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc:2:1: error: 'usingnamespace' does not name a type
    2 | usingnamespace std;
      | ^~~~~~~~~~~~~~
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>>c>>n;
      |     ^~~
      |     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:46:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   46 |     cout<<ans<<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:46:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   46 |     cout<<ans<<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)
      |     ^~~~
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int c,n;
    int m[1000][1000];
    cin>>c>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cin>>m[i][j];
        }
    }
    bool f=true;
    int ans=0;
    for(int i=0;i<=n/2+1;i++){
        for(int j=0;j<=n/2+1;j++){
            if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                f=false;
                break;
            }
        }
    }
    if(f){
        ans++;
    c--;
    while(c--){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int r,c;
            cin>>r>>c;
            r--;c--;
            m[r][c]^=1;
        }
        f=true;
        for(int i=0;i<=n/2+1;i++){
            for(int j=0;j<=n/2+1;j++){
                if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                    if(f){
                        ans++;
                    }
                }
            }
        }
        f=false;
    }
    cout<<ans<<endl;
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int c,n;
    int m[1000][1000];
    cin>>c>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            char c;
            cin>>c;
            m[i][j]=(c==‘0’?0:1);
        }
    }
    bool f=true;
    int ans=0;
    for(int i=0;i<(n+1)/2;i++){
        for(int j=0;j<(n+1)/2;j++){
            if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                f=false;
                break;
            }
        }
        if(!f){
            break;
        }
    }
    if(f){
        ans++;
    }
    c--;
    while(c--){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int r,c;
            cin>>r>>c;
            r--;c--;
            m[r][c]^=1;
        }
        f=true;
        for(int i=0;i<(n+1)/2;i++){
            for(int j=0;j<(n+1)/2;j++){
                if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                    f=false;
                    break;
                }
            }
            if(!f){
                break;
            }
        }
        if(f){
            ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc:11:25: error: extended character ‘ is not valid in an identifier
   11 |             m[i][j]=(c==‘0’?0:1);
      |                         ^
a.cc:11:25: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:25: error: '\U000020180\U00002019' was not declared in this scope
   11 |             m[i][j]=(c==‘0’?0:1);
      |                         ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int c,n;
    int m[1000][1000];
    cin>>c>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            char c;
            cin>>c;
            m[i][j]=(c=='0'?0:1);
        }
    }
    int ans=0;
    set<int> s;
    for(int i=0;i<(n+1)/2;i++){
        for(int j=0;j<(n+1)/2;j++){
            if(m[i][j]!=m[n-1-i][j]||m[i][j]!=m[n-1-i][n-1-j]||m[i][j]!=m[i][n-1-j]){
                s.insert(i*n+j);
            }
        }
    }
    if(s.empty()){
        ans++;
    }
    c--;
    while(c--){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int r,c;
            cin>>r>>c;
            r--;c--;
            m[r][c]^=1;
            s.insert(min(r,n-1-r)*n+min(c,n-1-c));
        }
        f=true;
        for(set<int>::iterator i=s.begin();i!=s.end();i++){
            int h=*i;
            int a=h/n,b=h%n;
            if(m[a][b]==m[a][n-1-b]&&m[a][b]==m[n-1-a][n-1-b]&&m[a][b]==m[n-1-a][b]){
                s.erase(h);
            }
        }
        if(s.empty()){
            ans++;
        }
    }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'f' was not declared in this scope
   37 |         f=true;
      |         ^