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

#include <stdio.h>
#include <math.h>

int main()
{
	in s[1000];
	int n;
	int i;
	double sum,ave;
	
	while(1){
		scanf("%d",&n);
		if(n==0)
			break
		sum = 0;
		for(i=0;i<n;i++){
			scanf("%d",&s[i]);
			sum += s[i];
		}
		ave = sum/n;
		
		sum = 0;
		for(i=0;i<n;i++)
			sum+= pow(s[i] -ave,2);
		printf("%lf",sqrt(sum/n));
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'in'; did you mean 'int'?
    6 |         in s[1000];
      |         ^~
      |         int
main.c:14:30: error: expected ';' before 'sum'
   14 |                         break
      |                              ^
      |                              ;
   15 |                 sum = 0;
      |                 ~~~
Language: C

#include <stdio.h>
#include <math.h>

int main()
{
	int s[1000];
	int n;
	int i;
	double sum,ave;
	
	while(1){
		scanf("%d",&n);
		if(n==0)
			break
		sum = 0;
		for(i=0;i<n;i++){
			scanf("%d",&s[i]);
			sum += s[i];
		}
		ave = sum/n;
		
		sum = 0;
		for(i=0;i<n;i++)
			sum+= pow(s[i] -ave,2);
		printf("%lf",sqrt(sum/n));
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:30: error: expected ';' before 'sum'
   14 |                         break
      |                              ^
      |                              ;
   15 |                 sum = 0;
      |                 ~~~
Language: C++


int main() {
	int n,i;
	int s[1000];
	while(1){
		cin >>n;
		if(n==0){
			break;
		}
		int sum=0;
		for(i=0; i<n; i++){
			cin >> s[i];
			sum += s[i];
		}
		double m=sum/n;
		double sum2=0;
		for(i=0; i<n; i++){
			sum2 += (s[i]-m)*(s[i]-m);
		}
		double a=sqrt(sum2/n);
		cout <<fixed<< setprecision(5)<<a<<endl;


	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin >>n;
      |                 ^~~
a.cc:20:26: error: 'sqrt' was not declared in this scope
   20 |                 double a=sqrt(sum2/n);
      |                          ^~~~
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout <<fixed<< setprecision(5)<<a<<endl;
      |                 ^~~~
a.cc:21:24: error: 'fixed' was not declared in this scope
   21 |                 cout <<fixed<< setprecision(5)<<a<<endl;
      |                        ^~~~~
a.cc:21:32: error: 'setprecision' was not declared in this scope
   21 |                 cout <<fixed<< setprecision(5)<<a<<endl;
      |                                ^~~~~~~~~~~~
a.cc:21:52: error: 'endl' was not declared in this scope
   21 |                 cout <<fixed<< setprecision(5)<<a<<endl;
      |                                                    ^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
int n,sum,i,cou;
int s[1000];
while(cin>>n,n){
	for(i=0;i<n;i++){
		cin>>s[i];
		sum+=s[i];
	}
	for(i=0;i<n;i++){
		cou+=(s[i]-sum/n)*(s[i]-sum/n)
	}
	cout<<fixed<<setprecision(8)<<sqrt(cou/n)<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected ';' before '}' token
   14 |                 cou+=(s[i]-sum/n)*(s[i]-sum/n)
      |                                               ^
      |                                               ;
   15 |         }
      |         ~
Language: C++

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

int main()
{
	while(true)
	{
		
	double n;
	
cin>>n;
if(n==0)break;
double s[1000];

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

double d=0;
double e=0;
for(int k=0;k<n;k++)
{
	d=d+s[k];
}
e=d/n;

double a=0;
double b=0;
double c=0;

for(int j=0;j<n;j++)
{
	b=s[j]-e;
a=a+pow(b,2)/n;
}
c=sqrt(a);
cout<<c<<endl;
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:5: error: 'pow' was not declared in this scope
   37 | a=a+pow(b,2)/n;
      |     ^~~
a.cc:39:3: error: 'sqrt' was not declared in this scope
   39 | c=sqrt(a);
      |   ^~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main()
{
	int n;
	while (1)
	{
		cin >> n;
		if (n == 0)
			break;
		vector<int> vec(n);
		int sum = 0;
		for (int& i : vec)
		{
			cin >> i;
			sum += i;
		}
		double m = sum / (double)n;
		double sum2 = 0;
		for (int i : vec)
			sum2 += (i - m)*(i - m);
		cout << fixed << sqrt(sum2 / (double)n) << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:34: error: 'sqrt' was not declared in this scope
   23 |                 cout << fixed << sqrt(sum2 / (double)n) << endl;
      |                                  ^~~~
Language: C++

import Control.Monad

avg :: (Floating a) => [a] -> a
avg xs = (sum xs) / (fromIntegral $ length xs)

var :: (Floating a) => [a] -> a
var xs = avg (map (^2) xs) - (avg xs)^2

solve :: Int -> [Float] -> Float
solve n l = sqrt $ var l

main = do
  n <- liftM read getLine :: IO Int
  if n == 0
  then return ()
  else do
    str <- getLine
    print $ solve n $ map read $ words str
    main

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import Control.Monad
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

import java.util.Scanner;

public class  Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		for (;;) {
			int num = sc.nextInt();
			if (num == 0)break;
System.out.printf("\n");

			int[] ten;
			ten = new int[num];
			int ttl = 0;

			for (int i = 0; i < num; i++) {
				ten[i] = sc.nextInt();
				ttl = ttl + ten[i];
			}

			double ave = ttl / num;
			double ans = 0;
			double temp = 0;
			for (int i = 0; i < num; i++) {
				temp = ten[i] - ave;
				temp = temp * temp;
				ans = ans + temp;
			}
			ans = Math.sqrt(ans / num);
			System.out.printf("%f", ans);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class  Main {
      | ^~~~~~
Language: C++

import java.util.Scanner;

public class Main {
 public static void main(String[] args) {
  Scanner sc = new Scanner(System.in);
  while (true) {
   int n = sc.nextInt();
   if (n == 0) {
    break;
   }
   int[] scores = new int[n];
   for (int i = 0; i < scores.length; i++) {
    scores[i] = sc.nextInt();
   }
   double average = 0, variance = 0;
   double sum = 0;
   for (int i = 0; i < scores.length; i++) {
    average += scores[i]/scores.length;
   }
   
   // System.out.printf("%f",average);
   for (int i = 0; i < scores.length; i++) {
    variance += (((scores[i] - average) * (scores[i] - average)) / n);
   }
   System.out.println(Math.sqrt(variance));
  }
 }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>

using namespace std;

int main(){
	int n;
	while(cin >> n)
	{
		double m = 0, sum = 0;
        double bunsan, heikin;
		vector<double> v(n);
		
		if(n == 0) break;
		double m = 0;
		for(int i = 0; i < n; ++i)
		{
			cin >> v[i];
		}
		for(int i = 0; i < n; ++i)
		{
			m += v[i];
		}

		heikin = m / n;
		
		int sum = 0;
		for(int i = 0; i < n; ++i)
			sum += ( v[i]-heikin ) * ( v[i]-heikin );
		
		printf("%0.8f\n",sqrt(sum/n));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: redeclaration of 'double m'
   17 |                 double m = 0;
      |                        ^
a.cc:12:24: note: 'double m' previously declared here
   12 |                 double m = 0, sum = 0;
      |                        ^
a.cc:29:21: error: conflicting declaration 'int sum'
   29 |                 int sum = 0;
      |                     ^~~
a.cc:12:31: note: previous declaration as 'double sum'
   12 |                 double m = 0, sum = 0;
      |                               ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>

using namespace std;

int main(){
	int n;
	while(cin >> n)
	{
		double m = 0, sum = 0;
        double bunsan, heikin;
		vector<double> v(n);
		
		if(n == 0) break;
		double m = 0;
		for(int i = 0; i < n; ++i)
		{
			cin >> v[i];
		}
		for(int i = 0; i < n; ++i)
		{
			m += v[i];
		}

		heikin = m / n;
		
		int sum = 0;
		for(int i = 0; i < n; ++i)
			sum += ( v[i]-heikin ) * ( v[i]-heikin );
		
		printf("%0.8lf\n",sqrt(sum/n));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: redeclaration of 'double m'
   17 |                 double m = 0;
      |                        ^
a.cc:12:24: note: 'double m' previously declared here
   12 |                 double m = 0, sum = 0;
      |                        ^
a.cc:29:21: error: conflicting declaration 'int sum'
   29 |                 int sum = 0;
      |                     ^~~
a.cc:12:31: note: previous declaration as 'double sum'
   12 |                 double m = 0, sum = 0;
      |                               ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>

using namespace std;

int main(){
	int n;
	while(cin >> n)
	{
		double m = 0, sum = 0;
        double bunsan, heikin;
		double v[n];
		
		if(n == 0) break;
		double m = 0;
		for(int i = 0; i < n; ++i)
		{
			cin >> v[i];
		}
		for(int i = 0; i < n; ++i)
		{
			m += v[i];
		}

		heikin = m / n;
		
		int sum = 0;
		for(int i = 0; i < n; ++i)
			sum += ( v[i]-heikin ) * ( v[i]-heikin );
		
		printf("%0.8f\n",sqrt(sum/n));
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: redeclaration of 'double m'
   17 |                 double m = 0;
      |                        ^
a.cc:12:24: note: 'double m' previously declared here
   12 |                 double m = 0, sum = 0;
      |                        ^
a.cc:29:21: error: conflicting declaration 'int sum'
   29 |                 int sum = 0;
      |                     ^~~
a.cc:12:31: note: previous declaration as 'double sum'
   12 |                 double m = 0, sum = 0;
      |                               ^~~
Language: C++

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in); while (true) {
int n = sc.nextInt();
if (n == 0) { break; }
int[] scores = new int[n];
for (int i = 0; i < scores.length; i++)
 {
scores[i] = sc.nextInt(); 
double sum=0;
sum=sum+scores[i];
}
double average = 0, variance = 0;
average=sum/n;
for (int i = 0; i < scores.length; i++)
 {
variance=(scores[i]-average)*(scores[i]-average)/n;
}

 System.out.printf("%. 8f?\n",Math.sqrt(variance));
} }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main {
      | ^~~~~~
Language: C++

#include<cstdio>
#include<cmath>
using namespace std;

int main(){
int n,s[1010];
double m,a;
while(cin >> n,n){
m=0; a=0;
for(int i=0;i<n;i++){
ci >> s[i];
m += s[i];
}
m /= n;
for(int i=0;i<n;i++)a += (s[i]-m)*(s[i]-m);
cout << sqrt(a/n) << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'cin' was not declared in this scope
    8 | while(cin >> n,n){
      |       ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cmath>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:11:1: error: 'ci' was not declared in this scope; did you mean 'i'?
   11 | ci >> s[i];
      | ^~
      | i
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout << sqrt(a/n) << endl;
      | ^~~~
a.cc:16:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:22: error: 'endl' was not declared in this scope
   16 | cout << sqrt(a/n) << endl;
      |                      ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<cmath>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

#define PI 6 * asin(0.5)

typedef long long ll;

using namespace std;


int main(void){

	while(cin >> N){
		int N;
		int s[1000];
		int sum = 0;
		double m, alpha=0.0;

		if(!N) break;
		for(int i=0; i<N; ++i){
			cin >> s[i];
			sum += s[i];
		}
		m = (double)sum / N;
		for(int i=0; i<N; ++i){
			alpha += (double)(s[i]-m)*(s[i]-m)/N;
		}
		cout << setprecision(15) << sqrt(alpha) << endl;

	}
	return 0;

}

	

Compiler output:
a.cc: In function 'int main()':
a.cc:34:22: error: 'N' was not declared in this scope
   34 |         while(cin >> N){
      |                      ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int n;
	int s[1010];
	int m;
	while(cin>>n,n!=0){
		m=0;
		for(int i=0;i<n;i++){
			cin>>s[i];
			m+=s[i];
		}
		m/=n;
		double ans=0;
		
		for(int i=0;i<n;i++){
			ans+=pow(s[i]-m,2)/n;
		}
		ans=sqrt(ans);
		
		cout.setf(ios::fixed,ios::floatfield);
		cout<<ans<<endl;
		
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: 'pow' was not declared in this scope
   18 |                         ans+=pow(s[i]-m,2)/n;
      |                              ^~~
a.cc:20:21: error: 'sqrt' was not declared in this scope
   20 |                 ans=sqrt(ans);
      |                     ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
using namespace std;
int main(){
  int n;
  int s[1000];
  double m=0;
  int sum=0;
  double a;
  while(true){
    memset(s,0,sizeof(s));
    cin>>n;
    if(n==0)break;
    m=0; sum=0;
    for(int i=0;i<n;i++){
      cin>>s[i];
      sum+=s[i];
    }
    m=sum/n; sum=0;
    for(int i=0;i<n;i++){
      sum+=(s[i]-m)*(s[i]-m);
    }
    a=sqrt(sum/n);
    printf("%.8f\n",a);
  }
}   
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset(s,0,sizeof(s));
      |     ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<cstdlib>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

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

int main(){
	int n;
	double s[1000],m,a,sum;
	while(1){
		cin>>n;
		if(n==0)break;
		sum=0;
		a=0;
		for(int i=0;i<n;i++){
			cin>>s[i];
			sum+=s[i];
		}
		m=sum/n;
		for(int i=0;i<n;i++){
			a+=(s[i]-m)*(s[i]-m)/n;
		}
		printf("%f\n",sqrt(a));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:31: error: 'sqrt' was not declared in this scope
   21 |                 printf("%f\n",sqrt(a));
      |                               ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<stdio.h>

using namespace std;

int main(){
	int n;

	// 学生の数を入力
	cin >> n;

	while(n != 0){
		int i,s;
		double m = 0,p = 0;
		vector<int> points;

		// 点数入力のループ
		for(i=1;i<=n;i++){
			// 点数を入力
			cin >> s;

			// 点数を記録
			points.push_back(s);
			m += s;
		}

		// 平均点の算出
		m /= n;

		// 分散の算出
		for(i=0;i<n;i++){
			p += ((points[i] - m) * (points[i] - m));
		}
		p /= n;

		// 標準偏差の出力
		printf("%.4f\n",sqrt(p));

		// 学生の数を入力
		cin >> n;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'sqrt' was not declared in this scope
   38 |                 printf("%.4f\n",sqrt(p));
      |                                 ^~~~
Language: C++

#include <cstdio>
using namespace std;

int main(){
  int n;
  double s[1000];
  while(scanf("%d",&n),n){
    double ave = 0,ans = 0;
    for(int i = 0; i < n ; i++)s[i] = 0;
    for(int i = 0 ; i < n ; i++ ){
      cin >> s[i];
      ave+=s[i];
    }

    for(int i = 0 ; i < n ; i++ ){
      ans += pow(s[i]-(ave/n),2);
    }
    printf(" ans %f\n",(double)sqrt(ans/n));
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:7: error: 'cin' was not declared in this scope
   11 |       cin >> s[i];
      |       ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cstdio>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:16:14: error: 'pow' was not declared in this scope
   16 |       ans += pow(s[i]-(ave/n),2);
      |              ^~~
a.cc:18:32: error: 'sqrt' was not declared in this scope
   18 |     printf(" ans %f\n",(double)sqrt(ans/n));
      |                                ^~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	double d;
	double tokuten[1000];
	double heikin;

	while(1) {
		cin >> d;

		if(d == 0) {
			break;
		}

		else {
			for(int i = 0; i < d; i++){
				cin >> tokuten[i];
			}

			double sum = 0;
			double kari1 = 0;
			double kari2 = 0;

			for(int i = 0; i < d; i++){
				sum += tokuten[i];
			}

			heikin = sum / d;

			for(int i = 0; i < d; i++){
				kari1 += (tokuten[i] - heikin) * (tokuten[i] - heikin);
			}

			kari2 = sqrt(kari1 / d);

			printf("%.8lf\n", kari2);
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'sqrt' was not declared in this scope
   38 |                         kari2 = sqrt(kari1 / d);
      |                                 ^~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	double d;
	double tokuten[1000];
	double heikin;

	while(1) {
		cin >> d;

		if(d == 0) {
			break;
		}

		else {
			for(int i = 0; i < d; i++){
				cin >> tokuten[i];
			}

			double sum = 0;
			double kari1 = 0;
			double kari2 = 0;

			for(int i = 0; i < d; i++){
				sum += tokuten[i];
			}

			heikin = sum / d;

			for(int i = 0; i < d; i++){
				kari1 += (tokuten[i] - heikin) * (tokuten[i] - heikin);
			}

			kari2 = sqrt(kari1 / d);

			cout << kari2 << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'sqrt' was not declared in this scope
   38 |                         kari2 = sqrt(kari1 / d);
      |                                 ^~~~
Language: C++

#include <stdio.h>
#include <iostream>

using namespace std;

int main() {

	int d;
	int tokuten[1000];
	double heikin;

	while(1) {
		cin >> d;

		if(d == 0) {
			break;
		}

		else {
			for(int i = 0; i < d; i++){
				cin >> tokuten[i];
			}

			double sum = 0;
			double kari1 = 0;
			double kari2 = 0;

			for(int i = 0; i < d; i++){
				sum += tokuten[i];
			}

			heikin = sum / d;

			for(int i = 0; i < d; i++){
				kari1 += (tokuten[i] - heikin) * (tokuten[i] - heikin);
			}

			kari2 = sqrt(kari1 / d);

			cout << kari2 << endl;
		}

	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'sqrt' was not declared in this scope
   38 |                         kari2 = sqrt(kari1 / d);
      |                                 ^~~~
Language: C++

#include <iostream>
#include <complex>
#include <cmath>
#include <vector>
#include <numeric>
#include <functional>
using namespace std;

typedef complex<double> pt;
const double pi = atan(1) * 4;

double f(double m, double s){
	return (s - m) * (s - m);
}

int main(){
	int n;
	while(cin >> n && n){
		vector<double> vec(n);
		for(int i=0;i<n;i++)cin >> vec[i];

		double sum = accumulate(vec.begin(), vec.end(), 0);
		double m = sum / n;

		transform(vec.begin(), vec.end(), vec.begin(), bind(f, m));

		double alpha2 = accumulate(vec.begin(), vec.end(), 0) / n;
		double alpha = sqrt(alpha2);

		printf("%.10f\n", alpha);
	}
	return 0;
}

Compiler output:
In file included from a.cc:6:
/usr/include/c++/14/functional: In instantiation of 'struct std::_Bind_check_arity<double (*)(double, double), double&>':
/usr/include/c++/14/functional:866:12:   required from 'struct std::_Bind_helper<false, double (&)(double, double), double&>'
  866 |     struct _Bind_helper
      |            ^~~~~~~~~~~~
/usr/include/c++/14/functional:888:5:   required by substitution of 'template<class _Func, class ... _BoundArgs> typename std::_Bind_helper<std::__is_socketlike<_Func>::value, _Func, _BoundArgs ...>::type std::bind(_Func&&, _BoundArgs&& ...) [with _Func = double (&)(double, double); _BoundArgs = {double&}]'
  888 |     bind(_Func&& __f, _BoundArgs&&... __args)
      |     ^~~~
a.cc:25:54:   required from here
   25 |                 transform(vec.begin(), vec.end(), vec.begin(), bind(f, m));
      |                                                                ~~~~^~~~~~
/usr/include/c++/14/functional:837:43: error: static assertion failed: Wrong number of arguments for function
  837 |       static_assert(sizeof...(_BoundArgs) == sizeof...(_Args),
      |                     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/functional:837:43: note: the comparison reduces to '(1 == 2)'
a.cc: In function 'int main()':
a.cc:25:17: error: 'transform' was not declared in this scope
   25 |                 transform(vec.begin(), vec.end(), vec.begin(), bind(f, m));
      |                 ^~~~~~~~~
Language: C++

#include <cmath>
#include <vector>
int main(){
int t,d;
std::cin>>t;
while(t) {
d=t;
std::vector<int> vec(t);
while(t--)std::cin>>vec[t];
double s=0;
t=d;while(t--){s+=vec[t];}
double m=s/d;
double a2=0
t=d;while(t--){a2+=(vec[t]-m)*(vec[t]-m);}
a2/=d;
std::cout << std::sqrt(a2) << std::endl;
std::cin>>t
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' is not a member of 'std'
    5 | std::cin>>t;
      |      ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <vector>
  +++ |+#include <iostream>
    3 | int main(){
a.cc:9:16: error: 'cin' is not a member of 'std'
    9 | while(t--)std::cin>>vec[t];
      |                ^~~
a.cc:9:16: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:1: error: expected ',' or ';' before 't'
   14 | t=d;while(t--){a2+=(vec[t]-m)*(vec[t]-m);}
      | ^
a.cc:16:6: error: 'cout' is not a member of 'std'
   16 | std::cout << std::sqrt(a2) << std::endl;
      |      ^~~~
a.cc:16:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:36: error: 'endl' is not a member of 'std'
   16 | std::cout << std::sqrt(a2) << std::endl;
      |                                    ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <vector>
  +++ |+#include <ostream>
    3 | int main(){
a.cc:17:6: error: 'cin' is not a member of 'std'
   17 | std::cin>>t
      |      ^~~
a.cc:17:6: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

  5         Scanner scan = new Scanner(System.in);
  6         int n = Integer.parseInt(scan.next());
  7         int[] S = new int[n];
  8         for( int i = 0; i < n; i++ ){
  9             S[i] = Integer.parseInt(scan.next());
 10         }
 11         int q = Integer.parseInt(scan.next());
 12         int[] T = new int[q];
 13         for( int i = 0; i < q; i++ ){
 14             T[i] = Integer.parseInt(scan.next());
 15         }
 16         int count = 0;
 17         for( int i = 0; i < q; i++ ){
 18             for( int j = 0; j < n; j++ ){
 19                 if( T[i] == S[j] ){
 20                     count++;
 21                 }
 22             }
 23         }
 24         System.out.println(count);
 25         return;
 26     }
 27 }

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
  5         Scanner scan = new Scanner(System.in);
  ^
Main.java:2: error: class, interface, enum, or record expected
  6         int n = Integer.parseInt(scan.next());
  ^
Main.java:3: error: class, interface, enum, or record expected
  7         int[] S = new int[n];
  ^
Main.java:4: error: class, interface, enum, or record expected
  8         for( int i = 0; i < n; i++ ){
  ^
Main.java:4: error: class, interface, enum, or record expected
  8         for( int i = 0; i < n; i++ ){
                            ^
Main.java:4: error: class, interface, enum, or record expected
  8         for( int i = 0; i < n; i++ ){
                                   ^
Main.java:6: error: class, interface, enum, or record expected
 10         }
 ^
Main.java:8: error: class, interface, enum, or record expected
 12         int[] T = new int[q];
 ^
Main.java:9: error: class, interface, enum, or record expected
 13         for( int i = 0; i < q; i++ ){
 ^
Main.java:9: error: class, interface, enum, or record expected
 13         for( int i = 0; i < q; i++ ){
                            ^
Main.java:9: error: class, interface, enum, or record expected
 13         for( int i = 0; i < q; i++ ){
                                   ^
Main.java:11: error: class, interface, enum, or record expected
 15         }
 ^
Main.java:13: error: class, interface, enum, or record expected
 17         for( int i = 0; i < q; i++ ){
 ^
Main.java:13: error: class, interface, enum, or record expected
 17         for( int i = 0; i < q; i++ ){
                            ^
Main.java:13: error: class, interface, enum, or record expected
 17         for( int i = 0; i < q; i++ ){
                                   ^
Main.java:14: error: class, interface, enum, or record expected
 18             for( int j = 0; j < n; j++ ){
                                ^
Main.java:14: error: class, interface, enum, or record expected
 18             for( int j = 0; j < n; j++ ){
                                       ^
Main.java:17: error: class, interface, enum, or record expected
 21                 }
 ^
Main.java:21: error: class, interface, enum, or record expected
 25         return;
 ^
Main.java:22: error: class, interface, enum, or record expected
 26     }
 ^
20 errors
Language: Java

import java.util.HashMap;
import java.util.Map.Entry;
 
public class Main{
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int n = sc.nextInt();
        HashMap<Integer, Integer> map = new HashMap<>(n);
        for(int i = 0;i<n;i++){
            map.put(sc.nextInt(),2);
        }
         
        int q = sc.nextInt();
        HashMap<Integer, Integer> map2 = new HashMap<>(q);
        for(int i = 0;i<q;i++){
            map2.put(sc.nextInt(),2);
        }
         
        int t = 0;
        if(n>q){
            for (Entry<Integer, Integer> m : map2.entrySet()) {
                if(map.get(m.getKey())!=null){
                    t++;
                     
                }
            }
        }else{
            for (Entry<Integer, Integer> m : map.entrySet()) {
                if(map2.get(m.getKey())!=null){
                    t++;
                }
            }
        }
        System.out.println(t);
         
    }
}


class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;
	
	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) { return false; }
		}
		return true;
	}
	
	private byte readByte() {
		if (hasNextByte()) {
			return buffer[ptr++];
		} else {
			System.out.println("poyo");
			return -1;
		}
	}
	
	private boolean isPrintableChar(int c) {
		return '!' <= c && c <= '~';
	}
	
	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr])) {
			ptr++;
		}
	}
	
	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}
	
	public int nextInt() {
		if (!hasNext()) { throw new NoSuchElementException(); }
		int n = 0;
		boolean minus = false;
		byte b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) { throw new NumberFormatException(); }
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}
	
}

Compiler output:
Main.java:41: error: cannot find symbol
	private final InputStream in = System.in;
	              ^
  symbol:   class InputStream
  location: class FastScanner
Main.java:53: error: cannot find symbol
			} catch (IOException e) {
			         ^
  symbol:   class IOException
  location: class FastScanner
Main.java:86: error: cannot find symbol
		if (!hasNext()) { throw new NoSuchElementException(); }
		                            ^
  symbol:   class NoSuchElementException
  location: class FastScanner
3 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
 counter=0;
  int n=sc.nextInt();
  int[] S =new int[100000];
  for(int i=0;i<n;i++){
   S[i]=sc.nextInt();
  }
  int q=sc.nextInt();
  int T;
  for(int j=0;j<q;j++){
   T=sc.nextInt()
   for(int k=0;k<n;k++){
    if(T==S[k]){
     counter++;
     break;
     }
   }
  }
  System.out.println(counter);
 }
}

Compiler output:
Main.java:15: error: ';' expected
   T=sc.nextInt()
                 ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
 counter=0;
  int n=sc.nextInt();
  int[] S =new int[100000];
  for(int i=0;i<n;i++){
   S[i]=sc.nextInt();
  }
  int q=sc.nextInt();
  int T;
  for(int j=0;j<q;j++){
   T=sc.nextInt();
   for(int k=0;k<n;k++){
    if(T==S[k]){
     counter++;
     break;
     }
   }
  }
  System.out.println(counter);
 }
}

Compiler output:
Main.java:6: error: cannot find symbol
 counter=0;
 ^
  symbol:   variable counter
  location: class Main
Main.java:18: error: cannot find symbol
     counter++;
     ^
  symbol:   variable counter
  location: class Main
Main.java:23: error: cannot find symbol
  System.out.println(counter);
                     ^
  symbol:   variable counter
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

  class Main{
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int[] a = new int[n-1];
     for (int i = 0; i < n; i++) {
        a[i] = stdIn.nextInt();
     }
    Scanner std =new Scanner(System.in);
    int N = std.nextInt();
    int[] b = new int[N-1];
      for(int j=0;j < N;j++){
        b[j] = std.nextInt();
      }
for(int k=0;k<n;k++){
  for(int p=0;p<N;p++){
  if(a[k]==b[p])return a[k];break;
   }
  }
System.out.println();
 }
}

Compiler output:
Main.java:19: error: incompatible types: unexpected return value
  if(a[k]==b[p])return a[k];break;
                        ^
1 error
Language: Java

import java.util.Scanner;

  class Main{
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int[] a = new int[n];
     for (int i = 0; i < n; i++) {
        a[i] = stdIn.nextInt();
     }
    Scanner std =new Scanner(System.in);
    int N = std.nextInt();
    int[] b = new int[N];
      for(int j=0;j < N;j++){
        b[j] = std.nextInt();
      }
for(int k=0;k<n;k++){
  for(int p=0;p<N;p++){
  if(a[k]==b[p])return a[k];break;
   }
  }
System.out.println();
 }
}

Compiler output:
Main.java:19: error: incompatible types: unexpected return value
  if(a[k]==b[p])return a[k];break;
                        ^
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;


public class SearchII {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);

		int n = scn.nextInt();
		int sArray[] = new int[n];
		int c=0;


		for(int i=0; i<n; i++){
			sArray[i] = scn.nextInt();
		}

		int q = scn.nextInt();
		int tArray[] = new int[q];

		for(int i=0; i<q; i++){
			tArray[i] = scn.nextInt();
		}

		Arrays.sort(sArray);
		Arrays.sort(tArray);

		for(int j=0; j<q; j++){
			for(int i=0; i<n; i++){
				if(tArray[j] == sArray[i]){
					c++;
					break;
				}
			}
		}
		System.out.println(c);
	}
}

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

import java.util.*;

public class notTLE {
	public static void main( String args[] ) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int[] n_num = new int[n];
		int[] check = new int[n];
		for(int i=0; i<n; i++) {
			n_num[i] = in.nextInt();
			check[i] = n_num[i];
			for(int j=0; j<i; j++) {
				if (check[j] == n_num[i]) {
					i--; n--;
				}
			}
		}
		int q = in.nextInt();
		int[] q_num = new int[q];
		for(int i=0; i<q; i++) {
			q_num[i] = in.nextInt();
		}
		Arrays.sort(n_num);
		Arrays.sort(q_num);
		
		int count = 0;
		for(int i=0; i<n; i++) {
			for(int j=0; j<q; j++) {
				if(n_num[i] > q_num[j]) break;
				if(n_num[i] == q_num[j]) count++;
			}
		}
		System.out.println(count);
	}
}

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

import java.util.HashMap;
import java.util.Scanner;

public class SemiMain {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		HashMap<Integer, Integer> S = new HashMap<Integer, Integer>(n);
		for(int i=0; i<n; i++) {
			S.put(in.nextInt(), 0);
		}
		int q = in.nextInt();
		int count = 0;
		for(int i = 0; i < q; i++) {
			if(S.get(in.nextInt()) != null) count++;

		}
		System.out.println(count);

	}

}

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

import java.util.Scanner;

public class aoj10031 {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int count = 0;
		int n = in.nextInt();
		int[]S = new int [100000];
		int[]T = new int [50000];
		for(int i = 0;i < n;i++){
			S[i] = in.nextInt();
		}
		int q = in.nextInt();
		for(int i = 0;i < q;i++){
			T[i] = in.nextInt();
		}
		for(int i = 0;i < q;i++){
			for(int j = 0;j < n;j++){
				if(T[i] == S[j]){
					count++;
					break;
				}
			}
		}
		System.out.println(count);
	}
}

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

import java.util.Scanner;
public class AOJ1003101 {
	static void search(){
		Scanner sc = new Scanner(System.in);
		int m,n,number = 0;
		m = sc.nextInt();
		int[] num1 = new int[m];
		for(int i = 0; i < m; i++){
			num1[i] = sc.nextInt();
		}
		n = sc.nextInt();
		int[] num2 = new int[n];
		for(int i = 0; i < n; i++){
			num2[i] = sc.nextInt();
		}
		for(int i = 0; i < m; i++){
			for(int j = 0; j < n; j++){
				if(num1[i] == num2[j]) number++;
			}
		}
		System.out.println(number);
	}
	public static void main(String[] args) {
		search();
	}
}

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

public class Main {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int count=0;
		int slength=sc.nextInt();
		int tt=0;
		int S[]=new int[slength];
		for(int i=0;i<slength;i++){
			int ss=sc.nextInt();
			S[i]=ss;
		}
		int tlength=sc.nextInt();
		for(int j=0;j<tlength;j++){
			tt=sc.nextInt();
			for(int k=0;k<slength;k++){
				if(S[k]==tt){
					count++;
				}
			}
		}
		System.out.println(count);
	}
}

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

import java.util.Scanner;
public class v10031 {
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in);
		int count=0;
		int slength=sc.nextInt();
		int tt=0;
		int S[]=new int[slength];
		for(int i=0;i<slength;i++){
			int ss=sc.nextInt();
			S[i]=ss;
		}
		int tlength=sc.nextInt();
		for(int j=0;j<tlength;j++){
			tt=sc.nextInt();
			for(int k=0;k<slength;k++){
				if(S[k]==tt){
					count++;
					break;
				}
			}
		}
		System.out.println(count);
	}
}

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

import java.util.Scanner;
public class AOJ1003101 {
	static void search(){
		Scanner sc = new Scanner(System.in);
		int m, n, num2, number = 0;
		m = sc.nextInt();
		int[] num1 = new int[m];
		int idx = 10000000;
		int[] num = new int[idx];
		for(int i = 0; i < idx; i++) num[i] = 0;
		for(int i = 0; i < m; i++){
			num1[i] = sc.nextInt();
		}
		n = sc.nextInt();
		for(int i = 0; i < n; i++){
			num2 = sc.nextInt();
			int j = 0;
			while(j < m){
				if(num1[j] == num2 && num[num2] == 0){
					number++;
					num[num2] = 1;
					break;
				}
				j++;
			}
		}
		System.out.println(number);
	}
	public static void main(String[] args) {
		search();
	}
}

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

public class neo {
	public static void main(String[] args) {
		java.util.Scanner in = new java.util.Scanner(System.in);
		int n = in.nextInt();
		int[] n_num = new int[n];
		for(int i=0; i<n; i++) {
			n_num[i] = in.nextInt();
		}
		java.util.Arrays.sort(n_num);
		
		int q = in.nextInt();
		int[] q_num = new int[q];
		for(int i=0; i<q; i++) {
			q_num[i] = in.nextInt();
		}
		int count = 0;
		for(int i=0; i<q; i++) {
			for(int j=0; j<n; j++) {
				if(q_num[i] == n_num[j] && n_num[j-1] != n_num[j]) {
					count++;
					break;
				}
				if(q_num[i] < n_num[j]) break;
			}
		}
		System.out.println(count);
	}
}

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

import java.util.*;

public class aoj10031 {
	public static void main(String[] args) {
	    Scanner scan = new Scanner(System.in);
	    int cnt = 0;
	    int[] S = new int[100000];
	    int n = scan.nextInt();
	    for(int i = 0; i < n;i++){
	        S[i] = scan.nextInt();
	    }
	    int q = scan.nextInt();
	    for(int i = 0; i < q;i++){
	        int t = scan.nextInt();
	        for(int j = 0; j < n;j++){
	        	if(t == S[j])cnt++;
	        }
	    }
	    System.out.println(cnt);
	}
}

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

#include <stdio.h>

#define MAX 1e+7

int main(void)
{
    int i, j;

    int n;
    scanf("%d", &n);

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

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

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

    int cnt = 0;
    for (i = 0; i < q; i++) {
        for (j = 0; j < n; j++) {
            if (targets[i] == numbers[j]) {
                cnt++;
                break;
            }
        }
    }

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

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: size of array 'numbers' has non-integer type
   12 |     int numbers[MAX];
      |         ^~~~~~~
main.c:20:9: error: size of array 'targets' has non-integer type
   20 |     int targets[MAX];
      |         ^~~~~~~
Language: C

#include<stdio.h>

#define SMAX (100000)
#define TMAX (50000)

int main(void)
{
	int i;
	int j;
	int n;
	int S[SMAX];
	int q;
	int T[TMAX];
	int c;
	int d;
	
	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]);
	}
	
	sort(S, 0 , n - 1);
	
	d = -1;
	c = 0;
	for(i = 0;i < q;i++){
		for(j = 0;j < n;j++){
			if(S[j] == d){
				continue;
			}
			else if(T[i] == S[j]){
				c++;
				d = T[i];
			}
		}
	}
	
	printf("%d\n",c);
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:26:9: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
   26 |         sort(S, 0 , n - 1);
      |         ^~~~
Language: C

#include <stdio.h>

int s[1000000] = {'0'};

int main(void)
{
	int t,c=0,n,i;
	
	scanf("%d", &n) != EOF)
		 for (i = 0; i < n; i++){
			 scanf("%d", &t);
                        s[t] = 1;
		}
		scanf("%d", &n);
		for (i = 0; i < n; i++){
			scanf("%d", &t);
			if(s[t] == 1)c++;
			
		}
	
	printf("%d\n", c);
	
	return (0);
	
}

Compiler output:
main.c: In function 'main':
main.c:9:31: error: expected ';' before ')' token
    9 |         scanf("%d", &n) != EOF)
      |                               ^
main.c:9:31: error: expected statement before ')' token
Language: C

#include <stdio.h>

main()
{
	int i;
	int j;
	int count = 0;
	int input_s;
	scanf("%d", &input_s);
	int s[100000];
	for(i = 0; i < input_s; i++)
	{
		scanf("%d", &s[i]);
	}
	
	int input_t;
	scanf("%d", &input_t);
	int t[50000];
	for(i = 0; i < input_t; i++)
	{
		scanf("%d", &t[i]);
	}
	
	for(i = 0; i < input_t; i++)
	{
		for(j = ???; j < input_s; j++)
		{
			if(s[j] == t[i])
			{
				count++;
				break;
			}
		}
	}
	
	printf("%d\n", count);
	
	return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:26:25: error: expected expression before '?' token
   26 |                 for(j = ???; j < input_s; j++)
      |                         ^
Language: C

#include <stdio.h>
int main(int argc,const char *argv[]){
    int n,q,S[100000]={0},T[50000]={0},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]);
    }
    for(i=0;i<q;i++){
        for(j=0;j<=n\2;j++){
            if(T[i]==S[j]){
                count++;
                break;
            }
        }
        for(j=n;j<n/2;j--){
            if(T[i]==S[j]){
                count++
                break;
            }
        }
    }
    printf("%d\n",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: stray '\' in program
   13 |         for(j=0;j<=n\2;j++){
      |                     ^
main.c:13:21: error: expected ';' before numeric constant
   13 |         for(j=0;j<=n\2;j++){
      |                     ^~
      |                     ;
main.c:21:24: error: expected ';' before 'break'
   21 |                 count++
      |                        ^
      |                        ;
   22 |                 break;
      |                 ~~~~~
Language: C

#include <stdio.h>
int main(int argc,const char *argv[]){
    int n,q,S[100000]={0},T[50000]={0},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]);
    }
    for(i=0;i<q;i++){
        for(j=0;j<=n\2;j++){
            if(T[i]==S[j]){
                count++;
                break;
            }
        }
        for(j=n;j<n/2;j--){
            if(T[i]==S[j]){
                count++;
                break;
            }
        }
    }
    printf("%d\n",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:21: error: stray '\' in program
   13 |         for(j=0;j<=n\2;j++){
      |                     ^
main.c:13:21: error: expected ';' before numeric constant
   13 |         for(j=0;j<=n\2;j++){
      |                     ^~
      |                     ;
Language: C

#include<stdio.h>
#include<algorithm>

int main() {
  int i, c = 0, n, s[100000], q, t[50000], low, high, mid;
  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]);
  }
  std::sort(s, s + n);
  for(i = 0; i < q; i++) {
    high = n - 1;
    low = 0;
    while(1) {
      mid = (low + high) / 2;
      if(s[mid] == t[i]) {
        c++;
        break;
      } else {
        if(s[mid] < t[i]) {
          low = mid + 1;
        } else {
          high = mid - 1;
        }
      }
      if(high < low) break;
    }
  }
  printf("%d\n", c);
  return 0;
}

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

#include<stdio.h>
int main(void){
      const int TARGET = 1000000;
      int i,k,sum = 0,n,q,s[100000],t[50000];
      static int data[TARGET];
      scanf("%d",&n);
      for(i = 0; i < n; i ++ )scanf("%d",&s[i]);
      scanf("%d",&q);
      for(k = 0; k < q; k ++ )scanf("%d",&t[k]);
      for(i = 0; i < TARGET; i ++ )data[i] = 0;
      for(k = 0; k < q; k ++ ){
            for(i = 0; i < n; i ++ ){
                  if(t[k] == s[i]){
                        data[t[k]] = 1;
                        sum += data[t[k]];
                        break;
                  }
            }
      }
      printf("%d\n",sum);
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: storage size of 'data' isn't constant
    5 |       static int data[TARGET];
      |                  ^~~~
Language: C

#include<stdio.h>
int main(void){
      int i,k,sum = 0,n,q,s[100000],t[50000];
      static int data[1000000];
      scanf("%d",&n);
      for(i = 0; i < n; i ++ )scanf("%d",&s[i]);
      scanf("%d",&q);
      for(k = 0; k < q; k ++ )scanf("%d",&t[k]);
      for(i = 0; i < TARGET; i ++ )data[i] = 0;
      for(k = 0; k < q; k ++ ){
            for(i = 0; i < n; i ++ ){
                  if(t[k] == s[i]){
                        data[t[k]] = 1;
                        sum += data[t[k]];
                        break;
                  }
            }
      }
      printf("%d\n",sum);
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: 'TARGET' undeclared (first use in this function)
    9 |       for(i = 0; i < TARGET; i ++ )data[i] = 0;
      |                      ^~~~~~
main.c:9:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <algorithm>

int main() {
  int i, j, n, q, work, N = 0;
  int S[100000], T[50000];
  scanf("%d", &n);
  for(i = 0; i < n; i++) scanf("%d", &S[i]);
  std::sort(S, S + n);
  scanf("%d", &q);
  for(i = 0; i < q; i++){
    scanf("%d", &T[i]);
    int low = 0, high = n - 1, mid;
    while(1) {
      mid = (low + high) / 2;
      if(S[mid] == T[i]){
        N++;
        break;
      }else if(S[mid] < T[i]) low = mid + 1;
      else high = mid - 1;
      if(high < low){
        break;
      }
    }
  }
  printf("%d\n", N);
  return 0;
}

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

#include<stdio.h>
#include<algorithm>
int main() {
    int i, k, n, q,cnt = 0,low=0,mid,high;
    int s[10000] ={0},t[10000]={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]);
    }
    std::sort(s,s+n);
    for(i=0;i<q;i++){
        low = 0;
        high = n-1;
        while(1){
            mid = (low+high)/2;
            if(s[mid] == t[i]){
                cnt++;
                break;
            }else if(s[mid] < t[i]) low = mid + 1;
           else high = mid - 1;
           if(high < low) break;
        }
    }
    printf("%d\n", cnt);
    return 0;
}

Compiler output:
main.c:2:9: fatal error: algorithm: No such file or directory
    2 | #include<algorithm>
      |         ^~~~~~~~~~~
compilation terminated.