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

#include <stdio.h>

int main(void)  {
  int i, j, num=0, n, q, s[10000], t[500];

  scanf("%d", &n);
  for (i = 0; i < n;i++)  {
    scanf("%d", &s[i]);
  }
  
  scanf("%d", &q);
  for (i = 0; i < q; i++)  {
    scanf("%d", &t[i])
  }
  
  for (i = 0; i < q; i++)  {
    for (j = 0; j < n; j++)  {
      if (t[j] == s[i])  {
        num++;
      }
    }
  }
  
  printf("%d\n", num);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:13:23: error: expected ';' before '}' token
   13 |     scanf("%d", &t[i])
      |                       ^
      |                       ;
   14 |   }
      |   ~
Language: C

#include <stdio.h>

int linearSearch(int a[],int n,int key){
  int i;
  for(i=0;i<n-1;i++){
    if(a[i]==key){
      return 1;
    }
  }
  return 0;
}

int main(void)
{
  int i,n,a[10001],q,key,ans;
  ans=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    if(linearSearch(a,n,key)){
      ans++;
    }
  }
  printf("%d\n",ans);
  
  return 0;
}

  }
 

Compiler output:
main.c:33:3: error: expected identifier or '(' before '}' token
   33 |   }
      |   ^
Language: C

#include<stdio.h>

int main(){

  int n, q, sum, i;
  int S[10000], T[500];
  sum = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ) scanf("%d", &T[i]);

  for ( i = 0; i < q; i++ ){
    for ( j = 0; j < n; j++ ){
      if(S[i] == T[j]){
        sum++;
      }
    }
  }

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

  return 0;
}
  

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

#include<stdio.h>

int linearSearch(int S[100], int T[100], int n, int q)
	int i, key;
	i=0;
	key = T[q];
	while(S[i] != key){
		i++;
	}

	if(i=n)
		return 0;

	return i;
}

int main()
{
	int i, n, q, S[], T[];

	scanf("%d", &n);

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

	scanf("%d", &q);

	for(i=0; i<n; i++){
		scanf("%d", T[i]);
	}

	linearSearch(S,T,n,q);
}

Compiler output:
main.c: In function 'linearSearch':
main.c:5:9: error: expected declaration specifiers before 'i'
    5 |         i=0;
      |         ^
main.c:6:9: error: expected declaration specifiers before 'key'
    6 |         key = T[q];
      |         ^~~
main.c:7:9: error: expected declaration specifiers before 'while'
    7 |         while(S[i] != key){
      |         ^~~~~
main.c:11:9: error: expected declaration specifiers before 'if'
   11 |         if(i=n)
      |         ^~
main.c:14:9: error: expected declaration specifiers before 'return'
   14 |         return i;
      |         ^~~~~~
main.c:15:1: error: expected declaration specifiers before '}' token
   15 | }
      | ^
main.c:18:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   18 | {
      | ^
main.c:3:5: error: old-style parameter declarations in prototyped function definition
    3 | int linearSearch(int S[100], int T[100], int n, int q)
      |     ^~~~~~~~~~~~
main.c:35: error: expected '{' at end of input
Language: C

#include<stdio.h>

int search(intS[], int n, intT[], j){
  int i = 0;
  int j;
  S[n] = T[];
  while ( S[i] != T[j]) i++;
  return i != n;
}

int main(){

  int n, q, C, i, j;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ){
    scanf("%d", &T[i]);
    if ( search(S, n, T, i) ) C++;
  }

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

  return 0;
}

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

  return 0;
}
  

Compiler output:
main.c:3:12: error: unknown type name 'intS'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |            ^~~~
      |            int
main.c:3:27: error: unknown type name 'intT'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |                           ^~~~
      |                           int
main.c:3:35: error: unknown type name 'j'
    3 | int search(intS[], int n, intT[], j){
      |                                   ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, i) ) C++;
      |          ^~~~~~
main.c: At top level:
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("%d\n", C);
      |          ^~~~~~
main.c:31:18: error: unknown type name 'C'
   31 |   printf("%d\n", C);
      |                  ^
main.c:33:3: error: expected identifier or '(' before 'return'
   33 |   return 0;
      |   ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include<stdio.h>

int search(intS[], int n, intT[], j){
  int i = 0;
  int j;
  S[n] = T[j];
  while ( S[i] != T[j]) i++;
  return i != n;
}

int main(){

  int n, q, C, i, j;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ){
    scanf("%d", &T[i]);
    if ( search(S, n, T, i) ) C++;
  }

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

  return 0;
}

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

  return 0;
}
  

Compiler output:
main.c:3:12: error: unknown type name 'intS'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |            ^~~~
      |            int
main.c:3:27: error: unknown type name 'intT'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |                           ^~~~
      |                           int
main.c:3:35: error: unknown type name 'j'
    3 | int search(intS[], int n, intT[], j){
      |                                   ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, i) ) C++;
      |          ^~~~~~
main.c: At top level:
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("%d\n", C);
      |          ^~~~~~
main.c:31:18: error: unknown type name 'C'
   31 |   printf("%d\n", C);
      |                  ^
main.c:33:3: error: expected identifier or '(' before 'return'
   33 |   return 0;
      |   ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include<stdio.h>

int search(intS[], int n, intT[], j){
  int i = 0;
  int j;
  S[n] = T[j];
  while ( S[i] != T[j]) i++;
  return i != n;
}

int main(){

  int n, q, C, i;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ){
    scanf("%d", &T[i]);
    if ( search(S, n, T, i) ) C++;
  }

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

  return 0;
}

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

  return 0;
}
  

Compiler output:
main.c:3:12: error: unknown type name 'intS'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |            ^~~~
      |            int
main.c:3:27: error: unknown type name 'intT'; did you mean 'int'?
    3 | int search(intS[], int n, intT[], j){
      |                           ^~~~
      |                           int
main.c:3:35: error: unknown type name 'j'
    3 | int search(intS[], int n, intT[], j){
      |                                   ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, i) ) C++;
      |          ^~~~~~
main.c: At top level:
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("%d\n", C);
      |          ^~~~~~
main.c:31:18: error: unknown type name 'C'
   31 |   printf("%d\n", C);
      |                  ^
main.c:33:3: error: expected identifier or '(' before 'return'
   33 |   return 0;
      |   ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include<stdio.h>

int search(int S[], int n, int T[], j){
  int i = 0;
  int j;
  S[n] = T[j];
  while ( S[i] != T[j]) i++;
  return i != n;
}

int main(){

  int n, q, C, i;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ){
    scanf("%d", &T[i]);
    if ( search(S, n, T, i) ) C++;
  }

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

  return 0;
}

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

  return 0;
}
  

Compiler output:
main.c:3:37: error: unknown type name 'j'
    3 | int search(int S[], int n, int T[], j){
      |                                     ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, i) ) C++;
      |          ^~~~~~
main.c: At top level:
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("%d\n", C);
      |          ^~~~~~
main.c:31:18: error: unknown type name 'C'
   31 |   printf("%d\n", C);
      |                  ^
main.c:33:3: error: expected identifier or '(' before 'return'
   33 |   return 0;
      |   ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

#include<stdio.h>

int search(int S[], int n, int T[], j){
  int i = 0;
  int j;
  S[n] = T[j];
  while ( S[i] != T[j]) i++;
  return i != n;
}

int main(){

  int n, q, C, i;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( i = 0; i < q; i++ ){
    scanf("%d", &T[i]);
    if ( search(S, n, T, i) ) C++;
  }

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

  return 0;
}

Compiler output:
main.c:3:37: error: unknown type name 'j'
    3 | int search(int S[], int n, int T[], j){
      |                                     ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, i) ) C++;
      |          ^~~~~~
Language: C

#include<stdio.h>

int search(int S[], int n, int T[], j){
  int i = 0;
  int j;
  S[n] = T[j];
  while ( S[i] != T[j] ) i++;
  return i != n;
}

int main(){

  int n, q, C, j;
  int S[10000], T[500];
  C = 0;

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

  scanf("%d", &q);
  for ( j = 0; j < q; j++ ){
    scanf("%d", &T[j]);
    if ( search(S, n, T, j) ) C++;
  }

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

  return 0;
}

Compiler output:
main.c:3:37: error: unknown type name 'j'
    3 | int search(int S[], int n, int T[], j){
      |                                     ^
main.c: In function 'main':
main.c:23:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   23 |     if ( search(S, n, T, j) ) C++;
      |          ^~~~~~
Language: C

#include<stdio.h>

int main(){
	
int a[10000],b[500],n,m,i,j;
int count=0;
	
	
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);}
	
scanf("%d",&m);
for(j=0;j<m;j++){
scanf("%d",&b[j]);}
	
for(i=0;i<n;i++){
	for(j=0;j<m;j++){
	if(a[i]==b[j])
	count++;
	}
}
printf("%d\n",count);
reurn 0;

}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: 'reurn' undeclared (first use in this function)
   24 | reurn 0;
      | ^~~~~
main.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:6: error: expected ';' before numeric constant
   24 | reurn 0;
      |      ^~
      |      ;
Language: C

#include<stdio.h>
int main(){
	
int a[10000],b[500],n,m,i,j;
int count=0;
	
	
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);}
	
scanf("%d",&m);
for(j=0;j<m;j++){
scanf("%d",&b[j]);}
	
for(i=0;i<n;i++){
for(j=0;j<m;j++){
if(a[i]==b[j])count++;
break;}
}
printf("%d\n",count);
reurn 0;

}

Compiler output:
main.c: In function 'main':
main.c:22:1: error: 'reurn' undeclared (first use in this function)
   22 | reurn 0;
      | ^~~~~
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:6: error: expected ';' before numeric constant
   22 | reurn 0;
      |      ^~
      |      ;
Language: C

#include<stdio.h>

int main(){

 int a[10000],b[10000],n,m,i,j;
 int count=0;


  scanf("%d",&n);
  for(i=0;i<n;i++){
  scanf("%d",&a[i]);}

  scanf("%d",&m);
  for(j=0;j<m;j++){
   scanf("%d",&b[j]);}


  for(j=0;j<m;j++){
    for(i=0;i<n;i++){
    
   x=a[i];
   y=b[j];
if(x==y){count++;
}
}
}
printf("%d\n",count);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:4: error: 'x' undeclared (first use in this function)
   21 |    x=a[i];
      |    ^
main.c:21:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:4: error: 'y' undeclared (first use in this function)
   22 |    y=b[j];
      |    ^
Language: C

int main() {
   int n, q, i, j, key, a;
   int s[10000];
   int t[500];
   int count = 0;

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

   scanf("%d\n", &q);
   for (i = 0; i < q; i++)
	   scanf("%d\n", &t[i]);

   for (i = 0; i < q; i++) {
	   printf("*%d\n", t[i]);
	   a = 1;
	   key = t[i];
	   j = 0;
	   while (s[j] != key && j != n) {
		   printf("%d\n", s[j]);
		   j++;
	   }
	   if (j == n)
		   a = 0;
	   if (a == 1)
		   count++;
   }
   printf("%d", count);

Compiler output:
main.c: In function 'main':
main.c:7:4: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |    scanf("%d\n", &n);
      |    ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main() {
main.c:7:4: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |    scanf("%d\n", &n);
      |    ^~~~~
main.c:7:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:16:12: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   16 |            printf("*%d\n", t[i]);
      |            ^~~~~~
main.c:16:12: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:12: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:16:12: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   29 |    printf("%d", count);
      |    ^~~~~~
main.c:29:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:4: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int linearSearch(int S[], int n, int key){
    int i=0;
    int key;
    S[n] = key;

    while(S[i] != key){
        i++;
    }

    if(i==n){
        return 0;
    }

    return i;
}

int main(){
    int S[500000], key, i, n, q;

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

    scanf("%d", &q);
    for(i=0; i<q; i++){
        scanf("%d", &key);
        linearSearch(S,n,key);
    }

    printf("%d\n", linearSearch(S,n,key);

}

Compiler output:
main.c: In function 'linearSearch':
main.c:5:9: error: 'key' redeclared as different kind of symbol
    5 |     int key;
      |         ^~~
main.c:3:38: note: previous definition of 'key' with type 'int'
    3 | int linearSearch(int S[], int n, int key){
      |                                  ~~~~^~~
main.c: In function 'main':
main.c:33:41: error: expected ')' before ';' token
   33 |     printf("%d\n", linearSearch(S,n,key);
      |           ~                             ^
      |                                         )
main.c:33:42: error: expected ';' before '}' token
   33 |     printf("%d\n", linearSearch(S,n,key);
      |                                          ^
      |                                          ;
   34 | 
   35 | }
      | ~
Language: C

#include<stdio.h>

int linearSearch(int S[], int n, int key){
    int i=0;

    S[n] = key;

    while(S[i] != key){
        i++;
    }

    if(i==n){
        return 0;
    }

    return i;
}

int main(){
    int S[500000], key, i, n, q;

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

    scanf("%d", &q);
    for(i=0; i<q; i++){
        scanf("%d", &key);
        linearSearch(S,n,key);
    }

    printf("%d\n", linearSearch(S,n,key);

}

Compiler output:
main.c: In function 'main':
main.c:33:41: error: expected ')' before ';' token
   33 |     printf("%d\n", linearSearch(S,n,key);
      |           ~                             ^
      |                                         )
main.c:33:42: error: expected ';' before '}' token
   33 |     printf("%d\n", linearSearch(S,n,key);
      |                                          ^
      |                                          ;
   34 | 
   35 | }
      | ~
Language: C

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



int main(){
  int n,q;
  int i,j;
  int x;
  int count=0;
   

  scanf("%d",&n);
  N=malloc(n*sizeof(int));
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  

  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&x);
    for(j=0;j<n;j++){
      if(x==N[j]){
        count+=1;
        break;
      }
    }
  }
  
  printf("%d\n",count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:3: error: 'N' undeclared (first use in this function)
   15 |   N=malloc(n*sizeof(int));
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>
int cnt=0;


int cunt(int s,int* S,int t,int* T)
{
    int i,j;
    for(i=0;i<t;i++)
    {
        for(j=0;j<s;j++)
        {
            if(T[i] == S[j]) cnt++;
        }
    }
    return cnt;
}


int main(void)
{
    int s,S[10000],t,T[500];
    int i;
    
    scanf("%d",&s);
    for(i=0;i<s;i++) scanf("%d",&S[i]);
    scanf("%d",&t);
    for(i=0;i<t;i++) scanf("%d",&T[i]);
    printf("%d\n",cunt(s,S,t,T));
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'cunt':
main.c:12:30: error: 'cnt' undeclared (first use in this function); did you mean 'cunt'?
   12 |             if(T[i] == S[j]) cnt++;
      |                              ^~~
      |                              cunt
main.c:12:30: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   24 |     scanf("%d",&s);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:24:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   24 |     scanf("%d",&s);
      |     ^~~~~
main.c:24:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:28:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   28 |     printf("%d\n",cunt(s,S,t,T));
      |     ^~~~~~
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:28:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

import java.util.ArrayList;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
    ArrayList<Integer> S = new ArrayList<Integer>();
    ArrayList<Integer> T = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    for(int i = 0; i < n; i++)
	S.add(sc.nextInt());
    int q = sc.nextInt();
    for(int i = 0; i < q; i++)
	T.add(sc.nextInt());
    int count = 0;
    for(int i = 0; i < n; i++)
	for(int j = 0; j < q; j++)
	    if(S.get(i).equals(T.get(j)))
		count++;
    System.out.println(count);
    }
}


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.ArrayList;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.ArrayList;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.Scanner;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.Scanner;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

#include<stdio.h>

#define M 10000

int main(void){
    int n,q,i,s[M],t,sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&s[i]);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d",&t);
    }
    
    for(i=0;i<n;i++){
        if(t==s[i]){
            sum++;
            break;
            }
        }
    }
  printf("%d",sum);
  return 0;
    
}



Compiler output:
main.c:23:10: error: expected declaration specifiers or '...' before string constant
   23 |   printf("%d",sum);
      |          ^~~~
main.c:23:15: error: unknown type name 'sum'
   23 |   printf("%d",sum);
      |               ^~~
main.c:24:3: error: expected identifier or '(' before 'return'
   24 |   return 0;
      |   ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>

#define M 10000

int main(void){
    int n,q,i,s[M],t,sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&s[i]);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d",&t);
    for(j=0;j<n;j++){
        if(t==s[j]){
            sum++;
            break;
            }
        }
    }
  printf("%d",sum);
  return 0;
    
}



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

#include<stdio.h>

#define M 10000

int main(void){
    int n,q,i,s[M],t,sum=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&s[i]);
    }
    scanf("%d",&q);
    for(i=0;i<q;i++){
        scanf("%d",&t);
        for(j=0;j<n;j++){
            if(t==s[j]){
                sum++;
                break;
            }
        }
    }
  printf("%d",sum);
  return 0;
    
}



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

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

  int *S, *T,n,N,C,i,j;

  scanf("%d",&n);
  S = (int *)malloc(sizeof(int)*n);

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

  scanf("%d",&N);
  T = (int *)malloc(sizeof(int)*N);
  for(i=0; i<=N-1; i++){
    scanf("%d",&T[i]);
  }

  C=0;
  
  for(i=0; i<=n-1; i++){
    for(j=0; j<=N-1; j++){
      if(S[i]==T[j]) C++
    }
  }

  printf("%d\n",C);
  
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:24:25: error: expected ';' before '}' token
   24 |       if(S[i]==T[j]) C++
      |                         ^
      |                         ;
   25 |     }
      |     ~
Language: C

#include<stdio.h>

int main{

  int n,q,i,j,C;
  int S[100000];
  int T[500];

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",S[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&T[i]);
  }
  for(i=0;i<q;i+=){
    for(j=0;j<n;j++){
      if(T[i]==S[j]){
	C++;
	break;
      }
    }
  }
  printf("%d\n",C);
  return 0;
}



Compiler output:
main.c:3:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int main{
      |         ^
Language: C

#include<stdio.h>

int main(){

  int n,q,i,j,C;
  int S[100000];
  int T[500];

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",S[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&T[i]);
  }
  for(i=0;i<q;i+=){
    for(j=0;j<n;j++){
      if(T[i]==S[j]){
	C++;
	break;
      }
    }
  }
  printf("%d\n",C);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:17:18: error: expected expression before ')' token
   17 |   for(i=0;i<q;i+=){
      |                  ^
Language: C

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

  int *S, *T,n,N,C,i,j,;

  scanf("%d",&n);
  S = (int *)malloc(sizeof(int)*n);

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

  scanf("%d",&N);
  T = (int *)malloc(sizeof(int)*N);
  for(i=0; i<=N-1; i++){
    scanf("%d",&T[i]);
  }

  C=0;
  
  for(i=0; i<=n-1; i++){
    for(j=0; j<=N-1; j++){
      if(S[i]==T[j]){
	C++;
	continue;
      }
    }
  }

  printf("%d\n",C);
  
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected identifier or '(' before ';' token
    5 |   int *S, *T,n,N,C,i,j,;
      |                        ^
Language: C

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

  int *S, *T,n,N,C,i,j,;

  scanf("%d",&n);
  S = (int *)malloc(sizeof(int)*n);

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

  scanf("%d",&N);
  T = (int *)malloc(sizeof(int)*N);
  for(i=0; i<=N-1; i++){
    scanf("%d",&T[i]);
  }

  C=0;
  
  for(i=0; i<=n-1; i++){
    for(j=0; j<=N-1; j++){
      if(S[i]==T[j]){
	C++;
      }
    }
  }

  printf("%d\n",C);
  
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected identifier or '(' before ';' token
    5 |   int *S, *T,n,N,C,i,j,;
      |                        ^
Language: C

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

  int *S, *T,n,N,C,i,j,;
  
  scanf("%d",&n);
  S = (int *)malloc(sizeof(int)*n);
  
  for(i=0; i<=n-1; i++){
    scanf("%d",&S[i]);
  }
  
  scanf("%d",&N);
  T = (int *)malloc(sizeof(int)*N);
  for(i=0; i<=N-1; i++){
    scanf("%d",&T[i]);
  }
  
  C=0;
  
  for(i=0; i<=n-1; i++){
    for(j=0; j<=N-1; j++){
      if(S[i]==T[j]){
	C++;
	break;
      }
    }
  }
  
  printf("%d\n",C);
  
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:24: error: expected identifier or '(' before ';' token
    5 |   int *S, *T,n,N,C,i,j,;
      |                        ^
Language: C

#iclude<stdio.h>

int main()
{
  int n, i, S[], q, key, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &S[i]);
    }
  scanf("%d", &q);
  for(i = 0; i < n; i++)
    {
      scanf("%d", key);
      if(linearSearch(key, S[], n))
	{
	  sum++;
	}
    }
  printf("%d\n", sum);
  return 0;
}

int linearSearch(int key, int A[], int n)
{
  int i;
  i = 0;
  A[n] = key;
  while(A[i] != key)
    {
      i++;
      if(i == n)
	{
	  return 0;
	}
    }
  return 1;
}



Compiler output:
main.c:1:2: error: invalid preprocessing directive #iclude; did you mean #include?
    1 | #iclude<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:5:13: error: array size missing in 'S'
    5 |   int n, i, S[], q, key, sum = 0;
      |             ^
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #iclude<stdio.h>
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d", &n);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:10: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   15 |       if(linearSearch(key, S[], n))
      |          ^~~~~~~~~~~~
main.c:15:30: error: expected expression before ']' token
   15 |       if(linearSearch(key, S[], n))
      |                              ^
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%d\n", sum);
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int main()
{
  int n, i, S[], q, key, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &S[i]);
    }
  scanf("%d", &q);
  for(i = 0; i < n; i++)
    {
      scanf("%d", key);
      if(linearSearch(key, S[], n))
	{
	  sum++;
	}
    }
  printf("%d\n", sum);
  return 0;
}

int linearSearch(int key, int A[], int n)
{
  int i;
  i = 0;
  A[n] = key;
  while(A[i] != key)
    {
      i++;
      if(i == n)
	{
	  return 0;
	}
    }
  return 1;
}



Compiler output:
main.c: In function 'main':
main.c:5:13: error: array size missing in 'S'
    5 |   int n, i, S[], q, key, sum = 0;
      |             ^
main.c:15:10: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   15 |       if(linearSearch(key, S[], n))
      |          ^~~~~~~~~~~~
main.c:15:30: error: expected expression before ']' token
   15 |       if(linearSearch(key, S[], n))
      |                              ^
Language: C

#include<stdio.h>

int main()
{
  int n, i, S[10000], q, key, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &S[i]);
    }
  scanf("%d", &q);
  for(i = 0; i < n; i++)
    {
      scanf("%d", key);
      if(linearSearch(key, S[], n))
	{
	  sum++;
	}
    }
  printf("%d\n", sum);
  return 0;
}

int linearSearch(int key, int A[], int n)
{
  int i;
  i = 0;
  A[n] = key;
  while(A[i] != key)
    {
      i++;
      if(i == n)
	{
	  return 0;
	}
    }
  return 1;
}



Compiler output:
main.c: In function 'main':
main.c:15:10: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   15 |       if(linearSearch(key, S[], n))
      |          ^~~~~~~~~~~~
main.c:15:30: error: expected expression before ']' token
   15 |       if(linearSearch(key, S[], n))
      |                              ^
Language: C

#include<stdio.h>

int main()
{
  int n, i, S[10000], q, key, sum = 0;
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    {
      scanf("%d", &S[i]);
    }
  scanf("%d", &q);
  for(i = 0; i < n; i++)
    {
      scanf("%d", key);
      if(linearSearch(key, S, n))
	{
	  sum++;
	}
    }
  printf("%d\n", sum);
  return 0;
}

int linearSearch(int key, int A, int n)
{
  int i;
  i = 0;
  A[n] = key;
  while(A[i] != key)
    {
      i++;
      if(i == n)
	{
	  return 0;
	}
    }
  return 1;
}



Compiler output:
main.c: In function 'main':
main.c:15:10: error: implicit declaration of function 'linearSearch' [-Wimplicit-function-declaration]
   15 |       if(linearSearch(key, S, n))
      |          ^~~~~~~~~~~~
main.c: In function 'linearSearch':
main.c:28:4: error: subscripted value is neither array nor pointer nor vector
   28 |   A[n] = key;
      |    ^
main.c:29:10: error: subscripted value is neither array nor pointer nor vector
   29 |   while(A[i] != key)
      |          ^
Language: C

#include <stdio.h>
#define Found 1
#define Not_Found 0
#define MAX 10000
#define max 500

int LinerSearch(int *,int);

int main(){

	int S[MAX],T[max],q,count,i,n;

	scanf("%d",&n);
	for( i = 0; i < n; i++) scanf("%d",&S[i]);
	scanf("%d",&q);
	for( i = 0; i < q; i++){
		scanf("%d",&T[i]);
		if(LinerSearch(S,T[i],n) == Found) count++;
	}

	printf("%d",count);

	return 0;

}


int LinerSearch(int *A,int key,int n){

	int i = 0;
	
	for( i = 0; i < n; i++){
		 if(A[i] == key) return Found; 
	}
	return Not_Found;
}


Compiler output:
main.c: In function 'main':
main.c:18:20: error: too many arguments to function 'LinerSearch'
   18 |                 if(LinerSearch(S,T[i],n) == Found) count++;
      |                    ^~~~~~~~~~~
main.c:7:5: note: declared here
    7 | int LinerSearch(int *,int);
      |     ^~~~~~~~~~~
main.c: At top level:
main.c:28:5: error: conflicting types for 'LinerSearch'; have 'int(int *, int,  int)'
   28 | int LinerSearch(int *A,int key,int n){
      |     ^~~~~~~~~~~
main.c:7:5: note: previous declaration of 'LinerSearch' with type 'int(int *, int)'
    7 | int LinerSearch(int *,int);
      |     ^~~~~~~~~~~
Language: C

#include<stdio.h>

int main(){
  int n,q,i,key,j,k=0;
  scanf("%d",&n);
  int S[n];
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
  scanf("%d",&q);
  int T[q];
  for(i=0;i<q;i++){
    scanf("%d",T[i]);
  }
  for(j=0;j<q;j++){
    i=0;
    while(1){
      if(T[j]==S[i]){
        k++
        break;
      }
      if(i==n){
        break;
      }
      i++;
    }
  }
  printf("%d\n",k);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:12: error: expected ';' before 'break'
   19 |         k++
      |            ^
      |            ;
   20 |         break;
      |         ~~~~~
Language: C

#include <stdio.h>

int main(){
  int i,j,n,q,count=0;
  scanf("%d",&n1);
  int A[n];
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  int B[q];
  for(i=0;i<q;i++){
    scanf("%d",&B[i]);
  }
    for(i=0;i<n;i++){
      for(j=0;j<q;j++){
	if(A[i]==B[j]){
	  count++;
	  break;
	}
      }
    }
  printf("%d\n",count);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:5:15: error: 'n1' undeclared (first use in this function); did you mean 'n'?
    5 |   scanf("%d",&n1);
      |               ^~
      |               n
main.c:5:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

#define M 1000000
#define L 14

int a=0;
char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}

/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key){ return key+'0'; }
int h2(int key){ return key-'0'; }

int find(char str[]){

  for(int i=0; i<a; i++){
    if(getKey(H[i]) == getKey(str))
      return 1;
    }
  }
  return 0;
}

void insert(char str[]){

  strcpy(H[a],str);
  a++;

}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    
    scanf("%d", &n);
    
    for ( i = 0; i < n; i++ ){
	scanf("%s %s", com, str);
	
	if ( com[0] == 'i' ){
	    insert(str);
	} else {
	    if (find(str)){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}



Compiler output:
main.c:37:3: error: expected identifier or '(' before 'return'
   37 |   return 0;
      |   ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

#include <stdio.h>
#define MAX 10000
#define NOT_FOUND -1

int linearSearch(int[],int);

int n;

int main(){
    int q,count = 0;
    int S[MAX],T[MAX];

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

    scanf("%d",&q);
    for(int i = 0;i < q;i++)scanf("%d",&T[i]);alignas

    for(int i = 0;i < q;i++)if(linearSearch(S,T[i]) >= 0)count++;

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

    return 0;
}

int linearSearch(int A[n],int key){
    int i = 0;
    A[n] = key;
    while(A[i] != key){
        i++;
    }
    if(i == n)return NOT_FOUND;
    return i;
}


Compiler output:
main.c: In function 'main':
main.c:17:47: error: 'alignas' undeclared (first use in this function)
   17 |     for(int i = 0;i < q;i++)scanf("%d",&T[i]);alignas
      |                                               ^~~~~~~
main.c:17:47: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:54: error: expected ';' before 'for'
   17 |     for(int i = 0;i < q;i++)scanf("%d",&T[i]);alignas
      |                                                      ^
      |                                                      ;
   18 | 
   19 |     for(int i = 0;i < q;i++)if(linearSearch(S,T[i]) >= 0)count++;
      |     ~~~
Language: C

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

  int n,q,S[10000],T[10000],i,j,count=0;

  scanf("%d",&n);

  for(i=0;i<n;i++){

    scanf("%d",&S[i]);

  }
   scanf("%d",&q);

  for(i=0;i<q;i++){

    scanf("%d",&T[i]);
    j=0;
    while(1){
      if(S[j]==T[i]){
	count++;
	break;
      }
      j++;
      if(j==n)break; 
    
  }
  }

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

  return 0;
}

  
  



Compiler output:
main.c:2:23: error: two or more data types in declaration specifiers
    2 | int  linearSearch(int int)
      |                       ^~~
main.c: In function 'linearSearch':
main.c:3:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | int main(){
      |           ^
main.c:39: error: expected '{' at end of input
Language: C

#include<stdio.h>

int search(int A[],int n,int key){
  int i=0;
  A[n] = key;
  while(A[i] != key){
    i++;
  }
  return i! = n;
}

int main(){
  int i,n,A[10000+1],q,key,sum=0;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    if(search(A,n,key)){
      sum++;
    }

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

    return 0;
	  	 
}



Compiler output:
main.c: In function 'search':
main.c:9:11: error: expected ';' before '!' token
    9 |   return i! = n;
      |           ^
      |           ;
main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C

int IsTriangle(Vertex *v){
  if(v[0].x == 0 && v[1].x == 0 && v[2].x == 0) return 0;
  else if(v[0].y == 0 && v[1].y == 0 && v[2].y == 0) return 0;
  else return 1;
}



Compiler output:
main.c:1:16: error: unknown type name 'Vertex'
    1 | int IsTriangle(Vertex *v){
      |                ^~~~~~
Language: C

#include <stdio.h>
  int main(){
  int i,j,n,q;
  int count=0;
  int right=0,mid=0,left=0;
  scnaf("%d",&n);
  int S[n];
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
  scanf("%d",&q);
  int T[q];
  for(i=0;i<q;i++){
    scanf("%d",&T[i]);
  }
  for(i=0;i<q;i++){
    left=0;
    right=n;
    while(left<right){
      mid=(left+right)/2;
      if(S[mid]==q){
        return mid;
      }
      else if(q<S[mid]){
        right=mid;
      }
        else left=mid+1;
        }
  }
  printf("%d\n",count);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |   scnaf("%d",&n);
      |   ^~~~~
      |   scanf
Language: C

#include<stdio.h>
int main(){
  int n,q,S[10],T[10],i,j,k,x;
  int count=0,judge[10];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&S[i]);
   scanf("%d",&q);
  for(i=0;i<q;i++) scanf("%d",&T[i]);
  for(i=0;i<n;i++){
    for(j=0;j<q;j++){
      if(S[i]==T[j]){
	x=T[j];
	for(k=0;k<=count;k++){
	  if(judge[k]==)
	}
	count++;
	}
      }
    }
  printf("\n%d\n",count);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:14:24: error: expected expression before ')' token
   14 |           if(judge[k]==)
      |                        ^
Language: C

include <stdio.h>
  int main(){
  int i,j,n,key;
  int count=0;
  scanf("%d",&n);
  int S[n];
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
  scanf("%d",&key);
  int T[key];
  for(i=0;i<key;i++){
    scanf("%d",&T[i]);
  }
  S[n]=key;
  while(S[i]!=key){
    i++;
    count++;
    if(i==n)
      break;
      }
  printf("%d\n",count);
  return 0;
}



Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

include <stdio.h>
  int main(){
  int i,j,n,key;
  int count=0;
  scanf("%d",&n);
  int S[n];
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
  scanf("%d",&key);
  int T[key];
  for(i=0;i<key;i++){
    scanf("%d",&T[i]);
  }
    for(i=0;i<key;i++){
    for(j=0;j<n;j++){
      if(S[j]==T[i]){
        count++;
        break;
      }
    }
    }
  printf("%d\n",count);
  return 0;
}




Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int BinarySearch(int *,int,int);

int main(){
  int i,j,n,q,c=0;
  int *S,*T;

  scanf("%d",&n);
  S=(int*)malloc(n*sizeof(int));
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }

  scanf("%d",&q);
  T=(int*)malloc(q*sizeof(int));
  for(i=0;i<q;i++){
    scanf("%d",&T[i]);
  }

  for(i=0;i<q;i++){
    c+=BinarySeach(S,n,T[i]);
  }

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

  return 0;

}

int BinarySearch(int *x,int key,int n){
  int mid,max,min=0;

  max=n;

  while(min<max){
    mid=(min+max)/2;
    if(key==x[mid]){
      return 1;
    }
    if(key>x[mid]){
      max=min+1;
    }
    else if(key<x[mid]){
      max=mid;
    }
  }

  return 0;
}
      



Compiler output:
main.c: In function 'main':
main.c:23:8: error: implicit declaration of function 'BinarySeach'; did you mean 'BinarySearch'? [-Wimplicit-function-declaration]
   23 |     c+=BinarySeach(S,n,T[i]);
      |        ^~~~~~~~~~~
      |        BinarySearch
Language: C

#include<stdio.h>

int main(){
  int i,j,n,q,S[10000],T[500],c=0;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&S[i]);
  }
  scanf("%d",qm);
  for(i=0;i<q;i++){
    scanf("%d",&T[i]);
  }
  for(i=0;i<q;i++){
    for(j=0;j<n;j++){
      if(S[j]==T[i]){
	c++;
	break;
      }
    }
  }
  printf("%d\n",c);
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:14: error: 'qm' undeclared (first use in this function); did you mean 'q'?
   10 |   scanf("%d",qm);
      |              ^~
      |              q
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
  int n,q,S[10],T[10],i,j,k,x;
  int count=0,judge[10];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&S[i]);
   scanf("%d",&q);
  for(i=0;i<q;i++) scanf("%d",&T[i]);
  for(i=0;i<n;i++){
    for(j=0;j<q;j++){
      if(S[i]==T[j]){
	x=T[j];
	for(k=0;k<=count;k++){
	  if(judge[k]==)
	}
	count++;
	}
      }
    }
  printf("\n%d\n",count);
  return 0;
}




Compiler output:
main.c: In function 'main':
main.c:14:24: error: expected expression before ')' token
   14 |           if(judge[k]==)
      |                        ^
Language: C

#include<iostream>

using namespace std;

#define N 1000
#define Q 500

int main(){

  int n[N];
  int q[Q];

  int num,num2,i,j,count=0;

  cin >>num;

  for(i=0;i<num;i++){
    cin >>n[i];
  }

  cin >>num2;
  for(i=0;i<num2;i++){
    cin >>q[i];
  }

  for(i=0;i<num;i++){
    for(j=0;j<num;j++){
      if(n[i]==q[j]){
	count++;
	break;
      }
    }
  }

  cout <<count<<endl;

  return 0;
}

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

#include<stdio.h>

main(){

  int i,j,n,q,S[10000000001],T[10000000001];
  int count = 0;

  scanf("%d",&n);

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

  scanf("%d",&q);

 for(i = 0; i < q; i++){
    scanf("%d",&T[i]);
  }


  for(i = 0; i < n; i++){
    for(j = 0; j < q; j++){

      if(S[i] == T[j]) count++;

    }
  }

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

    return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
Language: C

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int n;
int main()
{
  cin >>n;
  vector<int> s(n);
  int x;
  int ans = 0;
  for(int i = 0;i < n;i++){
    cin >>x;
    s.push_back(x);
  }
  int q;
  cin >>q;
  vector<int> t(q);
  int y
  for(int i = 0;i < q;i++){
    cin >>y;
    t.push_back(y);
  }
  sort(t.begin(),t.end());
  for(int i = 0;i <s.size();i++){
    int search = s[i];
    int left = 0;
    int right =t.size()-1;
    while(left <=right){
      int mid = (left+right)/2;
      if(search >t[mid]){
	left = mid+1;
      }else if(search <t[mid]){
	right = mid-1;
      }else{
	ans++;
	break;
      }
    }
  }
  cout <<ans<<endl;
  return 0;
}

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

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int n;
int main()
{
  cin >>n;
  vector<int> s(n);
  int x;
  int ans = 0;
  for(int i = 0;i < n;i++){
    cin >>x;
    s.push_back(x);
  }
  int q;
  cin >>q;
  vector<int> t(q);
  int y;
  for(int i = 0;i < q;i++){
    cin >>y;
    t.push_back(y);
  }
  sort(t.begin(),t.end());
  for(int i = 0;i <s.size();i++){
    int search = s[i];
    int left = 0;
    int right =t.size()-1;
    while(left <=right){
      int mid = (left+right)/2;
      if(search >t[mid]){
	left = mid+1;
      }else if(search <t[mid]){
	right = mid-1;
      }else{
	ans++;
	break;
      }
    }
  }
  cout <<ans<<endl;
  return 0;
}

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

#include<stdio.h>

int main(){
	int S[10001],T[501];
	int i,j,lenghS,lenghT,count=0;;
	
	scanf("%d",&lenghS);
	for(i=1;i<=lenghS;i++){
		scanf("%d",&S[i]);}
	
	scanf("%d",&lenghT);
	for(i=1;i<=lenghT;i++){
		scanf("%d",&T[i]);}
	
	for(i=1;i<=lenghS;i++){
		for(j=1;j<=lenghT;j++){
			if(S[i]==T[j]){
				count++;
				break;
		}}
	
	printf("%d\n",count);
	
	
	return 0;
}

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

#include<stdio.h>

int main(){
	long int S[10001],T[501],U[501];
    int i,j,lengh1,lengh2,count=0;
	
	scanf("%d",&lengh1);
	for(i=1;i<=lengh1;i++){
		scanf("%d",&S[i]);}
	
	scanf("%d",&lengh2);
	for(i=1;i<=lengh2;i++){
		scanf("%d",&T[i]);}
	
	for(i=1;i<=lengh2;i++){
		T[i]=U[i];}
	
	
	
	
	
	for(i=1;i<=lengh1;i++){
		for(j=1;j<=lengh2;j++){
			if(S[i]==T[j]){count++; break;}
			
		}}
		
		
		for(i=1;i<=lengh2;i++){
			for(j=1;j<=lengh2;j++){
				if(T[i]==U[j]) count--;
			}}
			
}	
	printf("%d\n",count);
	
	return 0;
}

Compiler output:
main.c:35:16: error: expected declaration specifiers or '...' before string constant
   35 |         printf("%d\n",count);
      |                ^~~~~~
main.c:35:23: error: unknown type name 'count'
   35 |         printf("%d\n",count);
      |                       ^~~~~
main.c:37:9: error: expected identifier or '(' before 'return'
   37 |         return 0;
      |         ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^