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

import java.util.Scanner;

public class Beginners061A {

	public static void main(String[] args) {

		String ans = "NO";
		
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		sc.close();
		
		if (a <= b && b <= c){
			
			ans = "YES";
		}

		System.out.print(ans);
		return;
	}
}

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

#include <stdio.h>

int main(){
int a,b,c;

scanf("%d %d %d",&a,&b,&c);

printf((c >= a && c <= b)  ? "Yes" : "No":);

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:42: error: expected ')' before ':' token
    8 | printf((c >= a && c <= b)  ? "Yes" : "No":);
      |       ~                                  ^
      |                                          )
Language: Java

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

public class Main{
	public static void main(String[]args)throws IOException{
	
		BufferedReader br=
				new BufferedReader(new InputStreamReader(System.in));
		String str1=br.readLine();
		String[] str2 = str1.split(" ", 0);
	 
		int n1=Integer.parseInt(str2[0]);
		int n2=Integer.parseInt(str2[1]);
		int n3=Integer.parseInt(str2[2]);
		
		if(n1<=n3&&n3<=n2){
			System.out.println("Yes");
		}
		else{
			System.out.println("No");
		}
	}
	

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

#include  <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if((A<=C)&&(C<=B))
printf("YES\n");
else
printf("NO\n");
return 0
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: expected ';' before '}' token
   10 | return 0
      |         ^
      |         ;
   11 | }
      | ~
Language: C

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#pragma warning(disable : 4996)
 
using namespace std;
 
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
 
//最大公約数
long gcd(long a, long b){
	if (a%b==0){
		return b;
	}
	else{
		return gcd(b,a%b);
	}
}
 
//最小公倍数
long lcm(long a, long b){
	return (a*b) / gcd(a,b);
}
 
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a < b) { a = b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a > b) { a = b; return 1; } return 0; }
 
typedef long long ll;
 
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
 
int main(){
	int a, b, c;
	
	cin >> a >> b >> c;

        if (a <= c && c <= b) cout << "Yes"<< endl;
        else cout << "No" << endl;
	
	return 0;
}

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

#include <iostream>

int main(void){
  int a,b,c;
  cin >> a >> b >> c;
  if(a<=c&&c<=b){ cout << "Yes" << endl; }
  else{ cout << "No" << endl; }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b >> c;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if(a<=c&&c<=b){ cout << "Yes" << endl; }
      |                   ^~~~
      |                   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if(a<=c&&c<=b){ cout << "Yes" << endl; }
      |                                    ^~~~
      |                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   else{ cout << "No" << endl; }
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   else{ cout << "No" << endl; }
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;
public class beginner61A{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
        int C = sc.nextInt();
        
        if(C>=A && C<=B){
            System.out.println("YES");
        }else{
            System.out.println("NO");
        }
    }
}

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

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


int main() {
	int n, k;
	pair<int, int> p[200000];
	cin >> n >> k;
	for (int i = 0; i < n; i++) {
		cin >> p[i].first >> p[i].second;
	}
	sort(p, p + n);
	int kk = k;
	for (int i = 0; i < n; i++) {
		kk -= p[i].second;
		if (kk <= 0) {
			cout << p[i].first;
			break;
		}
	}
}

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


import java.io.*;
import java.util.*;
import java.lang.Math.*;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        try {
            main.solve(args);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void solve(String[] args) throws Exception {
        MyScanner scanner = new MyScanner();
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int C = scanner.nextInt();

        if (A <= C && C <= B) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";

        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() throws IOException {
            if (i < s.length) return s[i++];
            String line = br.readLine();
            while (line.equals("")) {
                line = br.readLine();
            }
            s = line.split(reg, 0);
            i = 0;
            return s[i++];
        }

        public int nextInt() {
            try {
                return Integer.parseInt(next());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return -1;
        }

        public double nextDouble() {
            try {
                return Double.parseDouble(next());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return -1;
        }

        public long nextLong()  {
            try {
                return Long.parseLong(next());
            } catch (Exception e) {
                e.printStackTrace();
            }
            return -1;
        }
    }
}


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

#include <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if(A<=C&&C<=B)
printf("YES\n");
else
printf("NO\n");
return 0
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: expected ';' before '}' token
   10 | return 0
      |         ^
      |         ;
   11 | }
      | ~
Language: Java

import java.util.Scanner;

public class Atcoder {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
//		String s = sc.next();
		
		if (c >= a && c <= b){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		
		
		

	}

}


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

include <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if(A<=C&&C<=B)
printf("YES\n");
else
printf("NO\n");
return 0
}

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

l = input().split()

A = int(l[0])
B = int(l[1])
C = int(l[2])

if C >= A:
    if C <= B:
        print("Yes")
else:
    print("No")

Compiler output:
a.cc:1:1: error: 'l' does not name a type
    1 | l = input().split()
      | ^
Language: C++

#include<iostream>
#include<fstream>
#include<cmath>
#include<string>
#include<set>
#include <map>
#include<algorithm>
#include<vector>
#include <queue>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const double PI = acos(-1.0);
const ll INF = LLONG_MAX;
const int A = 1234567;
double arr[A]; 
 
int main() {
	int a, b, c;
	cin >> a >> b >> c;
	if (c => a && c <= b)
		cout << "Yes";
	else
		cout << "No";
	
}

Compiler output:
a.cc:15:16: error: 'LLONG_MAX' was not declared in this scope
   15 | const ll INF = LLONG_MAX;
      |                ^~~~~~~~~
a.cc:11:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <stack>
  +++ |+#include <climits>
   11 | using namespace std;
a.cc: In function 'int main()':
a.cc:22:16: error: expected primary-expression before '>' token
   22 |         if (c => a && c <= b)
      |                ^
Language: C++

#include <stdio.h>

void main(){
  int a,b,c;
  scanf("%d%d%d", &a, &b, &c);
  if(a <= b && b <= c){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
}


Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,c;

if(a<b){

}
else{
}

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

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


int main() {
  int a, b, c;
  scanf("%d %d %d", &a, &b, &c);
  if ( c >= a && c <=∑ b)
    printf("Yes");
  else
    printf("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: stray '\342' in program
    9 |   if ( c >= a && c <=<U+2211> b)
      |                      ^~~~~~~~
Language: Java

import java.util.Scanner;

public class AtCoder {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
//		String s = sc.next();
		
		if (c >= a && c <= b){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		
		
		
		

	}

}


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

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int a, b; c; cin >> a >> b >> c;
	if (a <= c&&c <= b)cout << "Yes\n";
	else cout << "No\n";
}

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

int main(void){
    long long a, b, c;
    cin >> a >> b >> c;
    if( a<=c && c<=b){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
     }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> b >> c;
      |     ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
    5 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << "No" << endl;
      |         ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope
    7 |         cout << "No" << endl;
      |                         ^~~~
Language: C++

#include "<iostream>
using namespace std;

int main() {
	int a, b, c;
	if (c >= a && c <= b)cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc:1:10: warning: missing terminating " character
    1 | #include "<iostream>
      |          ^
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include "<iostream>
      |          ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:30: error: 'cout' was not declared in this scope
    6 |         if (c >= a && c <= b)cout << "Yes" << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include "<iostream>
a.cc:6:47: error: 'endl' was not declared in this scope
    6 |         if (c >= a && c <= b)cout << "Yes" << endl;
      |                                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include "<iostream>
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |         else cout << "No" << endl;
      |              ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:30: error: 'endl' was not declared in this scope
    7 |         else cout << "No" << endl;
      |                              ^~~~
a.cc:7:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define ist istream_iterator
#define ost ostream_iterator

ll const inf = 100 * 1000;
int const N = (1 << 17) + 16;


int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);

  int a, b, c;
  cin >> a >> b >> c;

  cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |   cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
      |            ~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:20:38: error: expected ')' before ':' token
   20 |   cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
      |           ~                          ^~
      |                                      )
Language: C++

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

int N;
long long W;
long long w[100], v[100];

long double va[100];
long long sumw = 0, sumv = 0, strsw=0, strsv=0;

struct VAR
{
	long long w, v;
	double va;
};
VAR str, str_pop;
queue<VAR> que;
queue<VAR> sum;
long long sumw = 0;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	
	int a, b, c;
	cin >> a >> b >> c;
	if (c >= a && c <= b) {
		cout << "Yes\n";;
	}
	else {
		cout << "No\n";
	}

	return 0;
}

Compiler output:
a.cc:20:11: error: redefinition of 'long long int sumw'
   20 | long long sumw = 0;
      |           ^~~~
a.cc:10:11: note: 'long long int sumw' previously defined here
   10 | long long sumw = 0, sumv = 0, strsw=0, strsv=0;
      |           ^~~~
Language: C++

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


int main() {
	int a, b, c;
	if (c >= a && c <= b)cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		if(c>=a&&c<=b) System.out.println("Yes");
		else System.out.println("No");
	}

}

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<bits./stdc++.h>
using namespace std;

int main()
{
    int A,B,C;
    scanf("%d%d%d",&A,&B,&C);
    if(A <= C && C <= B)printf("Yes\n");
    else printf("No\n");
    return 0;
}


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

#include <stdio.h>

int main(){
   int A,B,C;
   scanf("%d %d %d",&A,&B,&C);
   if(A<C && B>C){
     printf("Yes\n");
   }
   else{
     printf("No\n");
   }
   return 0
}

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

#include <bits/stdc++.h>

#define lli long long int
#define pb push_back
#define pii pair <int, int>
#define pll pair <lli, lli>
#define _F first
#define _S second
#define mset(x) memset(x, 0, sizeof(x))
#define fastio() ios_base::sync_with_stdio(0)

using namespace std;

int main()
{
	int a, b, c;
	cin >> a >> b >> c;

	if((not (c < a)) && (not (c > b)))
		cout << "Yes" << endl;
	else
		cout << "No" << endl;1 3 2
	return (0-0);	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:39: error: expected ';' before numeric constant
   22 |                 cout << "No" << endl;1 3 2
      |                                       ^~
      |                                       ;
Language: Java

import java.util.*;

public class ABC061A {
    public static int solve() {
        return 0;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a, b, c;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();

        if (c >= a && c <= b)
            System.out.println("YES");
        else
            System.out.println("NO");

    }
}


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

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

int main()
{
    int A,B,C;
    scanf("%d%d%d",&A,&B,&C);
    if(A <= C && C <= B)printf("Yes\n");
    else printf("No\n");
}


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

#include<iostream>
#include<fstream>
#include<cmath>
#include<string>
#include<set>
#include <map>
#include<algorithm>
#include<vector>
#include <queue>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const double PI = acos(-1.0);
const ll INF = LLONG_MAX;
const int A = 1234567;
double arr[A]; 

int main() {
	int a, b, c;
	cin >> a >> b >> c;
	if (c > a && c < b)
		cout << "Yes";
	else
		cout << "No";
	
}

Compiler output:
a.cc:15:16: error: 'LLONG_MAX' was not declared in this scope
   15 | const ll INF = LLONG_MAX;
      |                ^~~~~~~~~
a.cc:11:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   10 | #include <stack>
  +++ |+#include <climits>
   11 | using namespace std;
Language: C++

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


int main() {
	int a, b, c;
	if (c >= a && c <= b)cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

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

#include <bits/stdc++.h>
 
using namespace std;
 
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplece_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
 
//int dxy[5] = {0, 1, 0, -1, 0};
// assign
 
signed main()
{
    int2(a, b);
    Int(c);
    if (a <= c && c <= b) 
        cout << "Yes" << endl;
    else {
        cout << "No" << endl;

    return 0;
}



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

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

int main() {
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);
	if (c >= A && c <= B) printf("Yes");
	else printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'A' was not declared in this scope
    7 |         if (c >= A && c <= B) printf("Yes");
      |                  ^
a.cc:7:28: error: 'B' was not declared in this scope
    7 |         if (c >= A && c <= B) printf("Yes");
      |                            ^
Language: C++

#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>

#define FOR(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define IFOR(i, a, b) for(int (i)=(a);(i)<=(b);(i)++)
#define RFOR(i, a, b) for(int (i)=(a);(i)>=(b);(i)--)

using namespace std;

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    cout < ((a <= c && c <= b) ? "Yes" : "No") << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:48: error: invalid operands of types 'const char*' and '<unresolved overloaded function type>' to binary 'operator<<'
   34 |     cout < ((a <= c && c <= b) ? "Yes" : "No") << endl;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: Java

import java.util.*;
import java.io.*;

public class A{
	public static void main(String[] args)  throws IOException,NumberFormatException{
		try {
		FastScanner sc=new FastScanner();
		int n=sc.nextInt(),m=sc.nextInt();
		int a[][]=new int[m][2];
		for(int i=0;i<m;i++) {
			a[i][0]=sc.nextInt();
			a[i][1]=sc.nextInt();
		}
		int road[]=new int[50];
		for(int i=0;i<m;i++) {
			road[a[i][0]-1]++;
			road[a[i][1]-1]++;
		}
		for(int i=0;i<n;i++) {
			System.out.println(road[i]);
		}
		}
		catch(Exception e) {
			return ;
		}
		
	}
	static final Random random=new Random();
	
	static void ruffleSort(int[] a) {
		int n=a.length;
		for(int i=0;i<n;i++) {
			int oi=random.nextInt(n),temp=a[oi];
			a[oi]=a[i]; a[i]=temp;
		}
		Arrays.sort(a);
	}
	
	public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
		String next() {
			while (!st.hasMoreTokens())
				try { 
                                      st=new StringTokenizer(br.readLine());				               
                              } catch (IOException e) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
		
		int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
		
		long[] readLongArray(int n) {
			long[] a=new long[n];
			for(int i=0; i<n ; i++) a[i]=nextLong();
			return a;
		}
		
		String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
	}

}


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

n, m = gets.chomp.split(" ").map(&:to_i)
arr = Array.new(n).map{Array.new}
m.times do |i|
    a, b = gets.chomp.split(" ").map(&:to_i)
    arr[a-1] << b
    arr[b-1] << a
end
arr.each do |i|
    puts i.size
end


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n, m = gets.chomp.split(" ").map(&:to_i)
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | n, m = gets.chomp.split(" ").map(&:to_i)
      |    ^
main.c:1:8: error: 'gets' undeclared here (not in a function)
    1 | n, m = gets.chomp.split(" ").map(&:to_i)
      |        ^~~~
main.c:1:35: error: expected expression before ':' token
    1 | n, m = gets.chomp.split(" ").map(&:to_i)
      |                                   ^
main.c:2:1: error: expected ',' or ';' before 'arr'
    2 | arr = Array.new(n).map{Array.new}
      | ^~~
main.c:3:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | m.times do |i|
      |  ^
Language: C++

using namespace std;

int main() {
  int N, M;
  cin >> N >> M;
  
  vector<int> A(N, 0);
  
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    A.at(a-1) += 1;
    A.at(b-1) += 1;
  }
  
  for (int i = 0; i < N; i++) {
    cout << A.at(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> M;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> A(N, 0);
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> A(N, 0);
      |          ^~~
a.cc:12:5: error: 'A' was not declared in this scope
   12 |     A.at(a-1) += 1;
      |     ^
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout << A.at(i) << endl;
      |     ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:13: error: 'A' was not declared in this scope
   17 |     cout << A.at(i) << endl;
      |             ^
a.cc:17:24: error: 'endl' was not declared in this scope
   17 |     cout << A.at(i) << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int N,M,city;
  cin>>N>>M;
  vector<int> road(N,0);
  for (int i=0;i<2*M;i++){
    cin>>city;
    for(int k=0;k<N;k++){
      if(k==city){
        road.at(k)+=1;
      }
    }
  }
  for (int i=0;i<N;i++){
    cout<<road.at(k)<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: 'k' was not declared in this scope
   16 |     cout<<road.at(k)<<endl;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main (){
  int N,M,city;
  cin>>N>>M;
  vector<int> road(N,0);
  for (i=0;i<2*M;i++){
    cin>>city;
    for(k=0;k<N;k++){
      if(k==city){
        road.at(k)+=1;
      }
    }
  }
  for (i=0;i<N;i++){
    cout<<road.at(k)<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
    7 |   for (i=0;i<2*M;i++){
      |        ^
a.cc:9:9: error: 'k' was not declared in this scope
    9 |     for(k=0;k<N;k++){
      |         ^
a.cc:15:8: error: 'i' was not declared in this scope
   15 |   for (i=0;i<N;i++){
      |        ^
a.cc:16:19: error: 'k' was not declared in this scope
   16 |     cout<<road.at(k)<<endl;
      |                   ^
Language: C++

#include <iostream>
#include <unordered_map>

using namespace std;

int main()	{
  int n, m;
  cin >> n >> m;
  unordered_map<int> cities;
  int a, b;
  for (int i = 0; i < m; i++)	{
    cin >> a >> b;
    cities[a]++;
    cities[b]++;
  }
  for (int i = 0; i < n; i++)	{
    cout << cities[i]++ << endl;;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: wrong number of template arguments (1, should be at least 2)
    9 |   unordered_map<int> cities;
      |                    ^
In file included from /usr/include/c++/14/unordered_map:41,
                 from a.cc:2:
/usr/include/c++/14/bits/unordered_map.h:109:11: note: provided for 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map'
  109 |     class unordered_map
      |           ^~~~~~~~~~~~~
a.cc:13:11: error: invalid types 'int[int]' for array subscript
   13 |     cities[a]++;
      |           ^
a.cc:14:11: error: invalid types 'int[int]' for array subscript
   14 |     cities[b]++;
      |           ^
a.cc:17:19: error: invalid types 'int[int]' for array subscript
   17 |     cout << cities[i]++ << endl;;
      |                   ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int m = scn.nextInt();
		int[] x = new int[n];
      	int a = 0;
      	int b = 0;
		for(int i=0; i<n; i++){
			a = scn.nextInt()-1;
          	b = scn.nextInt()-1;
          	ans[a]++;
          	ans[b]++;
		}
      	for(int i=0; i<n; i++) {
      		System.out.println(A[i]);
    	}
	}
}

Compiler output:
Main.java:14: error: cannot find symbol
          	ans[a]++;
          	^
  symbol:   variable ans
  location: class Main
Main.java:15: error: cannot find symbol
          	ans[b]++;
          	^
  symbol:   variable ans
  location: class Main
Main.java:18: error: cannot find symbol
      		System.out.println(A[i]);
      		                   ^
  symbol:   variable A
  location: class Main
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long  ll ;
typedef double db;
const double pi = 3.141592654;
#define pb         push_back
#define forab(i,a,b)       for(int i=(a);i<=(b);i++)
#define CIN	ios_base::sync_with_stdio(0); cin.tie(0)
#define pcase(z,x)     printf("Case %ld: %lld\n",z,x)
#define nw	 "\n"
ll arr[52][52];
int main(void)
{
	CIN;
	ll tc,l,k,sum=0,x=0,y,z=0,m=1,n=0,ans=0,cnt=0;
	cin>>n>>m;
	
	for(ll i=0;i<m;i++){
		cin>>x>>y;
		arr[x]++;
		arr[y]++;
	}
	for(ll i=1;i<=n;i++)
		cout<<arr[i]<<nw;

	

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: lvalue required as increment operand
   20 |                 arr[x]++;
      |                 ~~~~~^
a.cc:21:22: error: lvalue required as increment operand
   21 |                 arr[y]++;
      |                 ~~~~~^
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  int a;
  vector<int> towns(N);
  
  for (int i = 0; i < 2*M; i++){
    cin >> a;
    towns.at(a-1)++;
  }
  
  for (int i = 0; i < N; i++){
    cout << towns.at(i) << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
int main(void) { int N, M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX]; for (int i = 0; i < M; ++i) { cin >> A[i] >> B[i];
 }
int road[NMMAX]; for (int i = 0; i < N; ++i) { road[i] = 0; } for (int i = 0; i < M; ++i) { road[A[i] - 1] += 1;
road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl; } return;  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:81: error: return-statement with no value, in function returning 'int' [-fpermissive]
    6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl; } return;  }
      |                                                                                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void) { int N, M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX]; for (int i = 0; i < M; ++i) { cin >> A[i] >> B[i];
 }
int road[NMMAX]; for (int i = 0; i < N; ++i) { road[i] = 0; } for (int i = 0; i < M; ++i) { road[A[i] - 1] += 1;
road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:77: error: expected ';' before '}' token
    6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return  }
      |                                                                             ^~
      |                                                                             ;
a.cc:6:88: error: expected primary-expression before '}' token
    6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return  }
      |                                                                                        ^
a.cc:6:86: error: expected ';' before '}' token
    6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return  }
      |                                                                                      ^ ~
      |                                                                                      ;
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<int> city(n);
  for(int i = 0;i < m;i++){
    int a, b;
    cin >> a >> b;
    city.at(a-1)++;
    city.at(b-1)++;
  }
  for(int i = 0;i < n;i++){
    cout << a.at(i) << endl;
  }
}


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

// ConsoleApplication2.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <map>
#include <algorithm>

using namespace std;

int main()
{
	int n, m; 
	cin >> n >> m;
	vector<int> mati(n+1 , 0);
	for (int i = 0; i < m; i++) {
		int a, b;
		cin >> a >> b;
		mati[a]++;
		mati[b]++;
	}
	for (int i = 1; i <= n; i++) {
		cout << mati[i] << endl;
	}

}

// プログラムの実行: Ctrl + F5 または [デバッグ] > [デバッグなしで開始] メニュー
// プログラムのデバッグ: F5 または [デバッグ] > [デバッグの開始] メニュー

// 作業を開始するためのヒント: 
//    1. ソリューション エクスプローラー ウィンドウを使用してファイルを追加/管理します 
//   2. チーム エクスプローラー ウィンドウを使用してソース管理に接続します
//   3. 出力ウィンドウを使用して、ビルド出力とその他のメッセージを表示します
//   4. エラー一覧ウィンドウを使用してエラーを表示します
//   5. [プロジェクト] > [新しい項目の追加] と移動して新しいコード ファイルを作成するか、[プロジェクト] > [既存の項目の追加] と移動して既存のコード ファイルをプロジェクトに追加します
//   6. 後ほどこのプロジェクトを再び開く場合、[ファイル] > [開く] > [プロジェクト] と移動して .sln ファイルを選択します


Compiler output:
a.cc:4:10: fatal error: pch.h: No such file or directory
    4 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  
  for (int j = 0; j < M; j++) {
    int a, b;
    cin >> a >> b;
    vector<int> count(N);
    count.at(a - 1) += 1;
    count.at(b - 1) += 1;
  }
  for (int i = 0; i < count.size(); i++) {
    cout << count.at(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: overloaded function with no contextual type information
   15 |   for (int i = 0; i < count.size(); i++) {
      |                             ^~~~
a.cc:16:19: error: overloaded function with no contextual type information
   16 |     cout << count.at(i) << endl;
      |                   ^~
Language: C

#include<stdio.h>
int main()
{
int n,m,i;
  scanf("%d %d",&n,&m);
int road[n+1],point[2m];
  for(i=0;i<n;++i)
  {
  road[n]=0;
  }

  for(i=0;i<m;++i)
  {
  scanf("%d %d",&point[2i],&point[2i+1]);
  road[point[2i]]++;
  road[point[2i+1]]++;
  }
  
  for(i=1;i<n+1;++i)
  {  printf("%d\n",road[i]);
  }

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: invalid suffix "m" on integer constant
    6 | int road[n+1],point[2m];
      |                     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
    int A[M] ,B[M];
  for ( int i=0 ; i < M ;i++){
    cin >> A[i] >> B[i] ;
  }
  int road[N] ;
  for ( int i=0 ; i<N ; i++ ){
    road[i]=0
  }
  for ( int i=0 ; i < M ; i++){
    road[A[i]-1]++;
    road[B[i]-1]++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
   13 |     road[i]=0
      |              ^
      |              ;
   14 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
    int A[M] ,B[M];
  for ( int i=0 ; i < M ;i++){
    cin >> A[i] >> B[i] ;
  }
  int road[N] = 0;
  for ( int i=0 ; i < M ; i++){
    road[A[i]-1]++;
    road[B[i]-1]++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: array must be initialized with a brace-enclosed initializer
   11 |   int road[N] = 0;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
    int A[M] ,B[M];
  for ( int i=0 ; i < M ;i++){
    cin >> A[i] >> B[i] ;
  }
  int road[N] ;
  for ( int i=0 ; i < M ; i++){
    road(A[i]-1)++;
    road(B[i]-1)++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'road' cannot be used as a function
   13 |     road(A[i]-1)++;
      |     ~~~~^~~~~~~~
a.cc:14:9: error: 'road' cannot be used as a function
   14 |     road(B[i]-1)++;
      |     ~~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
    int A[M] ,B[M];
  for ( int i=0 ; i < M ;i++){
    cin >> A(i) >> B(i) ;
  }
  int road[N] ;
  for ( int i=0 ; i < M ; i++){
    road(A(i)-1)++;
    road(B(i)-1)++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'A' cannot be used as a function
    9 |     cin >> A(i) >> B(i) ;
      |            ~^~~
a.cc:9:21: error: 'B' cannot be used as a function
    9 |     cin >> A(i) >> B(i) ;
      |                    ~^~~
a.cc:13:11: error: 'A' cannot be used as a function
   13 |     road(A(i)-1)++;
      |          ~^~~
a.cc:13:16: error: 'road' cannot be used as a function
   13 |     road(A(i)-1)++;
      |                ^
a.cc:14:11: error: 'B' cannot be used as a function
   14 |     road(B(i)-1)++;
      |          ~^~~
a.cc:14:16: error: 'road' cannot be used as a function
   14 |     road(B(i)-1)++;
      |                ^
a.cc:17:17: error: 'road' cannot be used as a function
   17 |     cout << road(i) << endl;
      |             ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
    int A(M) ,B(M);
  for ( int i=0 ; i < M ;i++){
    cin >> A(i) >> B(i) ;
  }
  int road(N) ;
  for ( int i=0 ; i < M ; i++){
    road(A(i)-1)++;
    road(B(i)-1)++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'A' cannot be used as a function
    9 |     cin >> A(i) >> B(i) ;
      |            ~^~~
a.cc:9:21: error: 'B' cannot be used as a function
    9 |     cin >> A(i) >> B(i) ;
      |                    ~^~~
a.cc:13:11: error: 'A' cannot be used as a function
   13 |     road(A(i)-1)++;
      |          ~^~~
a.cc:13:16: error: 'road' cannot be used as a function
   13 |     road(A(i)-1)++;
      |                ^
a.cc:14:11: error: 'B' cannot be used as a function
   14 |     road(B(i)-1)++;
      |          ~^~~
a.cc:14:16: error: 'road' cannot be used as a function
   14 |     road(B(i)-1)++;
      |                ^
a.cc:17:17: error: 'road' cannot be used as a function
   17 |     cout << road(i) << endl;
      |             ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M 
    int A(M) ,B(M);
  for ( int i=0 ; i < M ;i++){
    cin >> A(i) >> B(i) ;
  }
  int road(N) ;
  for ( int i=0 ; i < M ; i++){
    road(A(i)-1)++;
    road(B(i)-1)++;
  }
  for ( int i=0 ; i< N ; i++){
    cout << road(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'int'
    6 |   cin >> N >> M
      |                ^
      |                ;
    7 |     int A(M) ,B(M);
      |     ~~~         
a.cc:9:12: error: 'A' was not declared in this scope
    9 |     cin >> A(i) >> B(i) ;
      |            ^
a.cc:9:20: error: 'B' was not declared in this scope
    9 |     cin >> A(i) >> B(i) ;
      |                    ^
a.cc:13:10: error: 'A' was not declared in this scope
   13 |     road(A(i)-1)++;
      |          ^
a.cc:13:16: error: 'road' cannot be used as a function
   13 |     road(A(i)-1)++;
      |                ^
a.cc:14:10: error: 'B' was not declared in this scope
   14 |     road(B(i)-1)++;
      |          ^
a.cc:14:16: error: 'road' cannot be used as a function
   14 |     road(B(i)-1)++;
      |                ^
a.cc:17:17: error: 'road' cannot be used as a function
   17 |     cout << road(i) << endl;
      |             ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N >> M ;
  for (int j=0 ; j < 2*M ; j++){
      int s[j] ;
      cin >> s[j] ;
    }
  for (int i=0 ; i<N ; i++){
    int count = 0;
    for (int j=0 ; j< 2*M ; j++){
    if ( s[j]==i+1){
      count++;
    }
    }
    cout << count << endl; 
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 's' was not declared in this scope
   14 |     if ( s[j]==i+1){
      |          ^
Language: C++

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

int main() {
  
  //都市の数N，道の数Mを宣言 	都市一時保存用A
  int N, M, A=0;
  cin >> N >> M;
  
  vector<int> road ( N,0 );
  
  for( int i = 0; i < 2*M ; i++){
   	cin >> A;
    ++road.at(A);
  }
  
  for( int i = 0; i < N ; i++){
   	cout << road(i) << endl; 
  }
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: no match for call to '(std::vector<int>) (int&)'
   18 |         cout << road(i) << endl;
      |                 ~~~~^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    
    int N, M;
    cin >> h >> w;
    
    int ans[51] = {};
    for(int i = 0;i < M; i ++){
        int a, b;    
        cin >> a >> b;
        ans[a]++;
        ans[b]++;
    }
    
    for(int i = 1; i <= N; i ++){
        cout << ans[i] << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'h' was not declared in this scope
    7 |     cin >> h >> w;
      |            ^
a.cc:7:17: error: 'w' was not declared in this scope
    7 |     cin >> h >> w;
      |                 ^
a.cc:19:6: error: expected '}' at end of input
   19 |     }
      |      ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

 int main(void) {
 int N, M;
 cin >> N >> M;

 const int NMMAX = 50;
 int A[NMMAX], B[NMMAX];

 for (int i = 0; i < M; ++i) {
 cin >> A[i] >> B[i];
 }

 int road[NMMAX];
 for (int i = 0; i < N; ++i) {
 road[i] = 0;
 }

 for (int i = 0; i < M; ++i) {
 road[A[i] - 1] += 1;
 road[B[i] - 1] += 1;
 }

 for (int i = 0; i < N; ++i) {
 cout << road[i] << endl;
 }

 return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> N >> M;
      |  ^~~
a.cc:23:2: error: 'cout' was not declared in this scope
   23 |  cout << road[i] << endl;
      |  ^~~~
a.cc:23:21: error: 'endl' was not declared in this scope
   23 |  cout << road[i] << endl;
      |                     ^~~~
Language: C++

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

int main()
{
  int N, M;
  cin >> N >> M;

  int A, B;

  for (int i = 0; i < M; i++)
  {
    cin >> A[i] >> B[i];
  }

  int road[];
  for (int i = 0; i < N; ++i)
  {
    road[i] = 0;
  }

  for (int i = 0; i < M; ++i)
  {
    road[A[i] - 1] += 1;
    road[B[i] - 1] += 1;
  }
  for (int i = 0; i < N; ++i)
  {
    cout << road[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: invalid types 'int[int]' for array subscript
   13 |     cin >> A[i] >> B[i];
      |             ^
a.cc:13:21: error: invalid types 'int[int]' for array subscript
   13 |     cin >> A[i] >> B[i];
      |                     ^
a.cc:16:7: error: storage size of 'road' isn't known
   16 |   int road[];
      |       ^~~~
a.cc:24:11: error: invalid types 'int[int]' for array subscript
   24 |     road[A[i] - 1] += 1;
      |           ^
a.cc:25:11: error: invalid types 'int[int]' for array subscript
   25 |     road[B[i] - 1] += 1;
      |           ^
Language: C

# include<stdio.h>

int main(){
    int n,m;
    scanf ( "%d %d",&n,&m );
    int r[m][2];
    for ( int i = 0;i < m;i++ )
        scanf ( "%d %d",&r[i][0],&r[i][1] );

    for ( int i = 0;i < m;i++ ){
        c[r[i][0]]++;
        c[r[i][1]]++;
    }
    for ( int i = 1;i < n+1;i++ )
        printf ( "%d\n",c[i] );
}


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

#include<iostream>
#include<vector>
using namespace std;
 
int main()
{
  int N,M;	//N個の都市、M本の道路
  cin>>N>>M;
  vector<int> a(M),b(M),total(N);
  for(int ni =0;ni<M;ni++)
  {
    cin>>a.at(ni)>>b.at(ni);
    total(a.at(ni)-1)++;
    total(b.at(ni)-1)++;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   13 |     total(a.at(ni)-1)++;
      |     ~~~~~^~~~~~~~~~~~
a.cc:14:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   14 |     total(b.at(ni)-1)++;
      |     ~~~~~^~~~~~~~~~~~