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

#include<iostream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  vector<int> count;
  
  cin >> N >> M;
  
  vector<int> count = vector<int>(N, 0);
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
    count.at(A)++;
    count.at(B)++;
  }
  
  for(int i = 0; i < N; i++){
    cout << count.at(i) << endl;
  }
  
  return 0;
}

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

#include<iostream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  int count;
  
  cin >> N >> M;
  
  vector<int> count = vector<int>(N, 0);
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
    count.at(A)++;
    count.at(B)++;
  }
  
  for(int i = 0; i < N; i++){
    cout << count.at(i) << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<int> count = vector<int>(N, 0);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> count = vector<int>(N, 0);
      |          ^~~
a.cc:14:11: error: request for member 'at' in 'count', which is of non-class type 'int'
   14 |     count.at(A)++;
      |           ^~
a.cc:15:11: error: request for member 'at' in 'count', which is of non-class type 'int'
   15 |     count.at(B)++;
      |           ^~
a.cc:19:19: error: request for member 'at' in 'count', which is of non-class type 'int'
   19 |     cout << count.at(i) << endl;
      |                   ^~
Language: C++

#include<iostream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  
  cin >> N >> M;
  
  vector<int> count = vector<int>(N, 0);
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
    count.at(A)++;
    count.at(B)++;
  }
  
  for(int i = 0; i < N; i++){
    cout << count.at(i) << endl;
  }
  
  return 0;
}

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

#include<iostream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  
  cin >> N >> M;
  
  vector<int> count(N, 0);
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
    count.at(A)++;
    count.at(B)++;
  }
  
  for(int i = 0; i < N; i++){
    cout << count.at(i) << endl;
  }
  
  return 0;
}

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

#include<ioatream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  
  cin >> N >> M;
  
  vector<int> count(N, 0);
  
  for(int i = 0; i < M; i++){
    cin >> A >> B;
    count.at(A)++;
    count.at(B)++;
  }
  
  for(int i = 0; i < N; i++){
    cout << count.at(i) << endl;
  }
  
  return 0;
}

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

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

int main() {
  int N,M;
  cin >> N >> M;
  vector<int> v(N);
  int j;
  0 < j < N;
  
  for(int i = 0;i < M;i++){
    int X;
    cin >> x;
    
    if(x = j){
      v.at(j)++;
    }
  }
  
  for(int i = 0;i < M;i++){
   cout << v.at(j) << endl;
  }
  
}


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

#include<bits/stdc++.h>
using namespace std;
int m, n;
int buckets[50];
int main(){
  cin>>n>>m;
  int city[2*m];for(int i=0;i<m;i++)cin>>city[i]>>city[m+i];
  for(int i=0;city[i];i++){buckets[city[i]]++;}
  for(int i=1;i<=n;i++){cout<<buckets[i]<<"\n"};
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:47: error: expected ';' before '}' token
    9 |   for(int i=1;i<=n;i++){cout<<buckets[i]<<"\n"};
      |                                               ^
      |                                               ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int m, n;
int buckets[50];
int main(){
  cin>>n>>m;
  int city[2*m];for(int i=0;i<2*m;i++)cin>>city[i];
  for(int i=0;city[i];i++){buckets[city[i]]++;}
  for(int i=0;i<N;i++)cout<<buckets[i]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'N' was not declared in this scope
    9 |   for(int i=0;i<N;i++)cout<<buckets[i]<<endl;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int m, n;
int buckets[50];
int main(){
  cin>>n>>m;
  int city[2*m];for(int i=0;i<2*m;i++)cin>>city[i];
  for(int i=0;city[i];i++){bucket[city[i]]++;}
  for(int i=0;i<N;i++)cout<<bucket[i]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: 'bucket' was not declared in this scope; did you mean 'buckets'?
    8 |   for(int i=0;city[i];i++){bucket[city[i]]++;}
      |                            ^~~~~~
      |                            buckets
a.cc:9:17: error: 'N' was not declared in this scope
    9 |   for(int i=0;i<N;i++)cout<<bucket[i]<<endl;
      |                 ^
a.cc:9:29: error: 'bucket' was not declared in this scope; did you mean 'buckets'?
    9 |   for(int i=0;i<N;i++)cout<<bucket[i]<<endl;
      |                             ^~~~~~
      |                             buckets
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  vector<vector<int>> V(N,vector<int>(N,0));
  
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    a--, b--;
    V[a][b]++;
    V[b][a]++;
  }
  for(int i = 0; i < N; i++){
    int t = 0;
    for(int j = 0; j < N; j++){
      t += V[i][j]
    }
    cout << t << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: expected ';' before '}' token
   22 |       t += V[i][j]
      |                   ^
      |                   ;
   23 |     }
      |     ~
Language: C++

#include <isotream>
#include <vector>

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  vector<vector<int>> V(N,vector<int>(N,0));
  
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    a--, b--;
    V[a][b]++;
    V[b][a]++;
  }
  for(int i = 0; i < N; i++){
    int t = 0;
    for(int j = 0; j < N; j++){
      t += V[i][j]
    }
    cout << t << endl;
  }
}

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

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  int a,b;
  cin>>a>>b;
  vector<vector<int>> c(2,vector<int>(b));
  rep(i,2){
    rep(j,b)
      cin>>c.at(i).at(j);
      }
  for(int i=1;i<=a;i++){
    int e=0;
    rep(i,2){
      rep(j,b){
      if(c.at(i).at(j)==k)
        e++;
         }
      }
    cout<<e<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'k' was not declared in this scope
   20 |       if(c.at(i).at(j)==k)
      |                         ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  int a,b;
  cin>>a>>b;
  vector<vector<int>> c(2,vector<int>(b));
  rep(i,2){
    rep(j,b)
      cin>>c.at(i).at(j);
      }
  rep(k,a){
    int e=0;
    rep(i,2){
      rep(j,b){
      if(a.at(i).at(j)==k)
        e++;
         }
      }
    cout<<e<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: request for member 'at' in 'a', which is of non-class type 'long long int'
   20 |       if(a.at(i).at(j)==k)
      |            ^~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    int N, M;
    cin >> N >> M;
    vector<int> a(M);
    vector<int> b(M);
    vector<vector<int>> edge(M);
    REP(i, M) {
        cin >> a[i] >> b[i];
        a[i]--;
        b[i]--;
        edge[a[i]].push_back(b[i]);
        edge[b[i]].push_back(a[i]);
    }
    REP(i, M) { cout << edge[i].resize() << endl; }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:39: error: no matching function for call to 'std::vector<int>::resize()'
   47 |     REP(i, M) { cout << edge[i].resize() << endl; }
      |                         ~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1013:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(size_type) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]'
 1013 |       resize(size_type __new_size)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1013:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1034:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(size_type, const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int; value_type = int]'
 1034 |       resize(size_type __new_size, const value_type& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:1034:7: note:   candidate expects 2 arguments, 0 provided
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  
  for(int i = 0; i < M; i++) {
    vector<int> vec(2);
    cin >> vec(0) >> vec(1);
    int count = 0;
    
    for(int j = 0; j < N; j++) {
      if(vec.at(0) == j || vec.at(1) == j) {
        count ++ ;
      }
    cout << count << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<int>) (int)'
   10 |     cin >> vec(0) >> vec(1);
      |            ~~~^~~
a.cc:10:25: error: no match for call to '(std::vector<int>) (int)'
   10 |     cin >> vec(0) >> vec(1);
      |                      ~~~^~~
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  
  for(int i = 0; i < M; i++) {
    vector<int> vec(2);
    cin >> vec(0) >> vec(1);
    int count = 0;
    
    for(int j = 0; j < N; j++) {
      if(vec(0) == j || vec(1) == j) {
        count ++ ;
      }
    cout << count << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<int>) (int)'
   10 |     cin >> vec(0) >> vec(1);
      |            ~~~^~~
a.cc:10:25: error: no match for call to '(std::vector<int>) (int)'
   10 |     cin >> vec(0) >> vec(1);
      |                      ~~~^~~
a.cc:14:13: error: no match for call to '(std::vector<int>) (int)'
   14 |       if(vec(0) == j || vec(1) == j) {
      |          ~~~^~~
a.cc:14:28: error: no match for call to '(std::vector<int>) (int)'
   14 |       if(vec(0) == j || vec(1) == j) {
      |                         ~~~^~~
Language: C++

#include<iostream>
using namespace std;

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

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

import java.util.* ; 
class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner (System.in);
	int x = scan.nextInt() ;
  int y = scan.nextInt() ;
    int a[] = new int[y];
    int b[] =new int[y];
    
    for(int i = 0 ; i< y  ;i++){
      a[i] = scan.nextInt();
      b[i] =scan.nextInt() ;
    }
    
    for(int i = 1 ; i<= x ; i++){
      int count = 0;
      for(int j = 0 ; j<y ;j++){
        if(a[j] == i || b[j] == i){
        count++;
      	}
      }
      if(count>0){
        System.out.println(count);
      }
    }
     
  }
}


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

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

int main() {
  int N, i;
  cin >> N >> M;
  
  vector<int> count(N, 0);
  
  for (i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    
    if (i == a || i == b) {
		count.at(i)++;
    }
  }
  
  for (i = 0; i < N; i++) {
    cout << count.at(i);
  }
}
  

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

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

int main() {
  int N;
  cin >> N >> M;
  
  vector<int> count(N, 0);
  
  for (i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    
    if (i == a || i == b) {
		count.at(i)++;
    }
  }
  
  for (i = 0; i < N; i++) {
    cout << count.at(i);
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'M' was not declared in this scope
    6 |   cin >> N >> M;
      |               ^
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i = 0; i < M; i++) {
      |        ^
a.cc:19:8: error: 'i' was not declared in this scope
   19 |   for (i = 0; i < N; i++) {
      |        ^
Language: C

#include<stdio.h>
int main(){
  int a[50],b[50],n,m,ans[50];

  for(int i=1; i<=50; i++){
    ans[i]=0;
  }

  scanf("%d%d",&n, &m);
  for(i=1; i<m; i++){
    scanf("%d%d", &a[i],&b[i]);
    ans[a[i]]++;
    ans[b[i]]++;
  }
  for(i=1; i<=n; i++){
    printf("%d\n",ans[i]);
  }
  return 0;


}


Compiler output:
main.c: In function 'main':
main.c:10:7: error: 'i' undeclared (first use in this function)
   10 |   for(i=1; i<m; i++){
      |       ^
main.c:10:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = n; i > 0; i--)
#define rep3(i, s, e) for (int i = (s); i < (int)(e); i++)
#define rep4(i, s, e) for (int i = (e); i < (int)(s); i--)

int main() {
    int n, m;
    int a, b;
    cin >> n >> m;
    vector<int> road_num(n, 0);

    rep(i, m){
        cin >> a >> b;
        road_num.at(a - 1)++;
    }

    rep(i, n){
        cout << road_num(i) << endl;
    }
}


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

#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <iomanip>
#include <string>
#include <sstream>
#include  <list>
//#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
/*
int cmp(shi a,shi b)
{
    return a.x<b.x;
}
long long cmd(long long a, long long  b)
{
    return a > b;
}*/

int cmd(int a, int b)
{
    return a>b;
}
int loda[n+1][n+1]={0};
int main()
{
    int n,m;
    cin >>n>>m;
    
    for(int i=1;i<=m;i++){
        int a, b;
        cin >>a >>b;
        loda[a][b]++;
        loda[b][a]++;
    }int sum=0;
    for(int i=1;i<=n;i++){
            sum=0;
        for(int j=1;j<=n;j++){
            if(loda[i][j])
                sum += loda[i][j];
        }
        cout<<sum<<endl;
    }
    return 0;

}


Compiler output:
a.cc:27:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   27 | int loda[n+1][n+1]={0};
      |          ^
      |          yn
a.cc:27:15: error: 'n' was not declared in this scope; did you mean 'yn'?
   27 | int loda[n+1][n+1]={0};
      |               ^
      |               yn
a.cc: In function 'int main()':
a.cc:36:9: error: 'loda' was not declared in this scope
   36 |         loda[a][b]++;
      |         ^~~~
a.cc:42:16: error: 'loda' was not declared in this scope
   42 |             if(loda[i][j])
      |                ^~~~
Language: C++

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

int main(){
  int n, m, a, b, x[50] = {}
  cin >> n >> m;
  rep(i, m) {
    cin >> a >> b;
    x[a]++;
    x[b]++;
  }
  rep(i, n) cout << x[i] << endl;    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'cin'
    7 |   cin >> n >> m;
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin >> N>> M;
  // N要素の配列
 
  // 入力処理
  for (int i = 0; i < N; i++) {
    int sum=0;
  for (int j = 0; j < M; j++) {
    vector<int> A(2);
    cin >> A.at(0)>>A.at(1);
      if(i+1==A.at(0) || i+1==A.at(1))
        sum+=1;
  }
    cout << sum << endl; 
  }

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: unable to find numeric literal operator 'operator""M'
    8 |   vector<int> vec(2M);
      |                   ^~
a.cc:10:23: error: unable to find numeric literal operator 'operator""M'
   10 |   for(int i = 0 ; i < 2M ; i++){
      |                       ^~
a.cc:16:25: error: unable to find numeric literal operator 'operator""M'
   16 |     for(int k = 0 ; k < 2M ; k++ ){
      |                         ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int n,m;
 cin >> n >> m;
 int jk=0;
 vector<int>vec(m*2);
 for(int i=0;i <m*2;i++){
	cin >> vec.at(i);
}
for(int a=0;a < n;a++){
 for(int i =0;i < vec.size();i++){
     if(vec.at(i) == a){
       jk++;
	}
      }
   cout << jk << endl;
   jk = 0;
}

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

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'o' was not declared in this scope
   10 |     cin>>A.at(o)>>A.at(1);
      |               ^
a.cc:15:11: error: expected primary-expression before '.' token
   15 |     cout<<.at(i)<<endl;
      |           ^
Language: C++

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

int main() {
  int N,M;
  cin>>N>>M;
  vector<int> D(N);
  vector<int> A(2);
  for(int i=0;i<M;i++){
    cin>>A.at(o)>>A.at(1);
    D.at(A.at(0))++;
    D.at(A.at(1))++;
  }
  for(iny i=0;i<N;i++){
    cout<<.at(i)<<endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'o' was not declared in this scope
   10 |     cin>>A.at(o)>>A.at(1);
      |               ^
a.cc:14:7: error: 'iny' was not declared in this scope; did you mean 'int'?
   14 |   for(iny i=0;i<N;i++){
      |       ^~~
      |       int
a.cc:14:15: error: 'i' was not declared in this scope
   14 |   for(iny i=0;i<N;i++){
      |               ^
a.cc:15:11: error: expected primary-expression before '.' token
   15 |     cout<<.at(i)<<endl;
      |           ^
Language: C++

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

int main(){
  int N M;
  cin >> N >> M;
  vector<int> ans(N);
  for(int i=0;i<M;i++){
    int a, b;
    cin >> a >> b;
    for(int j=0;j<N;j++){
      if(ans.at(j)==a||ans.at(j)==a) ans.at(j)++;
    }
  }
  for(int i=0;i<N;i++) cout << ans.at(i) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected initializer before 'M'
    5 |   int N M;
      |         ^
a.cc:6:10: error: 'N' was not declared in this scope
    6 |   cin >> N >> M;
      |          ^
a.cc:6:15: error: 'M' was not declared in this scope
    6 |   cin >> N >> M;
      |               ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main() {
    int n,m;
    cin>>n>>m;
    vector<int>v[n+2];
    for(int i=0;i<m;i++)
    {
        int x,y;
        cin>>x>>y;
        v[x].push_back(y);
        v[y].push_back(x);
    }
    for(int i=1;i<n+1;i++)cout<<v[i].size();<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:45: error: expected primary-expression before '<<' token
   15 |     for(int i=1;i<n+1;i++)cout<<v[i].size();<<endl;
      |                                             ^~
Language: C++

// In His Name

#include <Bits/stdc++.h>

#define pb push_back
#define F first
#define S second
#define ll long long
#define gcd __gcd

using namespace std;

typedef pair<int, int> pii;

const int MAX = 100;
int n, m, deg[MAX];

int main(){
	ios_base::sync_with_stdio(0);
	cin >> n >> m;
	for (int i = 0 ; i < m ; i++){
        int u, v;
        cin >> u >> v;
        deg[u]++;
        deg[v]++;
	}
	for (int i = 1 ; i <= n ; i++)      cout << deg[i] << endl;
}

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

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

int main(){
    int N,M;
    cin >> N >> M;
    int a[M*2];
    for(int i=0;i<M*2; ++i) cin >> a[i];
    int tmp = {0};
    for(int i=0;i<M*2;++i) {
        tmp[a[i]]++;
    }
    for(int i=1;i<=N;++i) {
        cout << tmp[i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: invalid types 'int[int]' for array subscript
   11 |         tmp[a[i]]++;
      |            ^
a.cc:14:20: error: invalid types 'int[int]' for array subscript
   14 |         cout << tmp[i] << endl;
      |                    ^
Language: C++

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

int main() {
  int n, m, i, a;
  cin >> n >> m;
  
  vector<int> x(n);
  for(i = 0; i < 2 * m; i++){
    cin >> a;
    x.at(a - 1)++;
  }
  
  printf(x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: cannot convert 'std::vector<int>' to 'const char*'
   14 |   printf(x);
      |          ^
      |          |
      |          std::vector<int>
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

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

int main() {
  int n, m, i, a;
  cin >> n >> m;
  
  vector<int> x(n);
  for(i = 0; i < 2 * m; i++){
    cin >> a;
    x.at(a - 1)++;
  }
  
  print(x);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   14 |   print(x);
      |   ^~~~~
      |   rint
Language: C++

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

int main() {
  int n,m,sub;
  cin >> n >> m;
  vector<int> t(n);
  for(int i = 0; i < m; i++){
    cin >> sub;
    t(sub - 1)++;
    cin >> sub;
    t(sub - 1)++;
  }
  for(int i = 0; i < n; i++){
    cout << t(i) << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: no match for call to '(std::vector<int>) (int)'
   10 |     t(sub - 1)++;
      |     ~^~~~~~~~~
a.cc:12:6: error: no match for call to '(std::vector<int>) (int)'
   12 |     t(sub - 1)++;
      |     ~^~~~~~~~~
a.cc:15:14: error: no match for call to '(std::vector<int>) (int&)'
   15 |     cout << t(i) << endl;
      |             ~^~~
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0; i<M; i++){
      |       ^
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   for(i=0; i<M; i++){
      |       ^
a.cc:21:12: error: expected ';' before '}' token
   21 |     count=0
      |            ^
      |            ;
   22 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  int N, M;
  cin >> N >> M;
  const int NMAMX = 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]++;
    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:9: error: 'NMMAX' was not declared in this scope; did you mean 'NMAMX'?
    9 |   int A[NMMAX], B[NMMAX];
      |         ^~~~~
      |         NMAMX
a.cc:12:12: error: 'A' was not declared in this scope
   12 |     cin >> A[i] >> B[i];
      |            ^
a.cc:12:20: error: 'B' was not declared in this scope
   12 |     cin >> A[i] >> B[i];
      |                    ^
a.cc:17:5: error: 'road' was not declared in this scope; did you mean 'read'?
   17 |     road[i] = 0;
      |     ^~~~
      |     read
a.cc:21:5: error: 'road' was not declared in this scope; did you mean 'read'?
   21 |     road[A[i] - 1]++;
      |     ^~~~
      |     read
a.cc:21:10: error: 'A' was not declared in this scope
   21 |     road[A[i] - 1]++;
      |          ^
a.cc:22:10: error: 'B' was not declared in this scope
   22 |     road[B[i] - 1]++;
      |          ^
a.cc:26:13: error: 'road' was not declared in this scope; did you mean 'read'?
   26 |     cout << road[i] << endl;
      |             ^~~~
      |             read
Language: C++

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

int main(){
  int N,M;
  cin >> N >> M;
  int a[N]={};
  for(int i=0;i<M;i++){
    int a,b;
    cin >> a >> b;
    a[a]++;
    a[b]++;
  }
  for(int i=0;i<N;i++){
    cout << a[i] << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: invalid types 'int[int]' for array subscript
   11 |     a[a]++;
      |      ^
a.cc:12:6: error: invalid types 'int[int]' for array subscript
   12 |     a[b]++;
      |      ^
Language: C++

#include <iostream>
using namespace std;
int a[51]
int main(){
  int n,m;cin>>n>>m;
  for(int i = 0; m > i; i++){
  	int c,d;cin>>c>>d;
    a[c-1]++;
    a[d-1]++;
  }
  for(int i = 0; m > i; i++){
  	cout << a[i] << endl;
  }
}
  

Compiler output:
a.cc:4:1: error: expected initializer before 'int'
    4 | int main(){
      | ^~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
    int N;
    //都市の数,Nを定義
    int M;
    //道路の数,Mを定義
    cin >> N >> M;
    //N,Mの順で標準入力
    vector <int> num(N);
    for (int i = 0; i < M; i++){
        int Na;
        //他の都市Na
        int Nb;
        //他の都市Nb
        //それぞれの都市が他の都市に繋がる道路を何本もっているか保持する配列(Num)を用意する
        cin >> Na >> Nb;
        //道路の本数分入力を受け取る
        num [Na-1]++;
        num [Nb-1]++;
        //受け取った入力の道路に繋がっている都市の配列(Num)へカウント+1する
    }
    for (int i = 0; i < num.length(); i++){
        cout << num[i] << endl;
        //Numの要素を書き出す
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: 'class std::vector<int>' has no member named 'length'
   26 |     for (int i = 0; i < num.length(); i++){
      |                             ^~~~~~
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);
  }
  
  cor (int i = 0; i < N; i++) {
    cout << city.at(i) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: expected primary-expression before 'int'
   18 |   cor (int i = 0; i < N; i++) {
      |        ^~~
a.cc:18:19: error: 'i' was not declared in this scope
   18 |   cor (int i = 0; i < N; i++) {
      |                   ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>

using namespace::std;

int main(){
  int n,m;
  cin>>n>>m;
  vector<int> v[n+5];
  
  for(int i=0,l,r;i<m;i++)
    cin>>l>>r,v[l].push_back(r),v[r].push_back(l);
  
  for(int i=1;i<=n;i++)
    cout<<v[i].size()<<'\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> v[n+5];
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | 
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> v[n+5];
      |          ^~~
a.cc:11:15: error: 'v' was not declared in this scope
   11 |     cin>>l>>r,v[l].push_back(r),v[r].push_back(l);
      |               ^
a.cc:14:11: error: 'v' was not declared in this scope
   14 |     cout<<v[i].size()<<'\n';
      |           ^
Language: C++


int main() {
  int N, M;
  cin >> N >> M;
  
  vector<int> vec(M*2);
  
  for(int i = 0; i < M*2; i++){
  int c;
  cin >> c;
  vec.at(i) = c;
  
  }

  
  vector<int> veca(M);
  
  for(int i = 0; i< M; i++){
    veca.at(i) = vec.at(i*2);
  }
  


    vector<int> vecb(M);
  
  for(int i = 0; i< M; i++){
    vecb.at(i) = vec.at(i*2 + 1);
  }
  

  
  
  for(int j = 0; j < N; j++){
    int c = 0;
    int d = 0;
    for(int i = 0; i < M; i++){
      if(veca.at(i) == j + 1 ){
        c++;
      }
      if(vecb.at(i) == j + 1 ){
        d++;
      }
    }
    cout << c + d << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N >> M;
      |   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> vec(M*2);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> vec(M*2);
      |          ^~~
a.cc:11:3: error: 'vec' was not declared in this scope
   11 |   vec.at(i) = c;
      |   ^~~
a.cc:16:10: error: expected primary-expression before 'int'
   16 |   vector<int> veca(M);
      |          ^~~
a.cc:19:5: error: 'veca' was not declared in this scope
   19 |     veca.at(i) = vec.at(i*2);
      |     ^~~~
a.cc:19:18: error: 'vec' was not declared in this scope
   19 |     veca.at(i) = vec.at(i*2);
      |                  ^~~
a.cc:24:12: error: expected primary-expression before 'int'
   24 |     vector<int> vecb(M);
      |            ^~~
a.cc:27:5: error: 'vecb' was not declared in this scope
   27 |     vecb.at(i) = vec.at(i*2 + 1);
      |     ^~~~
a.cc:27:18: error: 'vec' was not declared in this scope
   27 |     vecb.at(i) = vec.at(i*2 + 1);
      |                  ^~~
a.cc:37:10: error: 'veca' was not declared in this scope
   37 |       if(veca.at(i) == j + 1 ){
      |          ^~~~
a.cc:40:10: error: 'vecb' was not declared in this scope
   40 |       if(vecb.at(i) == j + 1 ){
      |          ^~~~
a.cc:44:5: error: 'cout' was not declared in this scope
   44 |     cout << c + d << endl;
      |     ^~~~
a.cc:44:22: error: 'endl' was not declared in this scope
   44 |     cout << c + d << endl;
      |                      ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '==' token
   12 |     for(int j==0;j<N;j++){
      |              ^~
      |              ;
a.cc:12:14: error: expected primary-expression before '==' token
   12 |     for(int j==0;j<N;j++){
      |              ^~
a.cc:12:21: error: expected ')' before ';' token
   12 |     for(int j==0;j<N;j++){
      |        ~            ^
      |                     )
a.cc:12:22: error: 'j' was not declared in this scope
   12 |     for(int j==0;j<N;j++){
      |                      ^
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before 'for'
   25 | for(int i=0;i<N;i++){
      | ^~~
a.cc:25:13: error: 'i' does not name a type
   25 | for(int i=0;i<N;i++){
      |             ^
a.cc:25:17: error: 'i' does not name a type
   25 | for(int i=0;i<N;i++){
      |                 ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int aab; 
  cin >> a >> b;
  vector<int> A(2*b);
  for (int i=1;i<=a;i++) {
    int c=0;
    for(int j=0;j<2*b;j++) {
      cin >> A[j];
    if (A[j]==i)
      c++;
    }
    cout << c << endl;
  }
}


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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a、b; 
  cin >> a >> b;
  vector<int> A(2*b);
  for (int i=1;i<=a;i++) {
    int c=0;
    for(int j=0;j<2*b;j++) {
      cin >> A[j];
    if (A[j]==i)
      c++;
    }
    cout << c << endl;
  }
}

Compiler output:
a.cc:4:7: error: extended character 、 is not valid in an identifier
    4 |   int a、b;
      |       ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a >> b;
      |          ^
a.cc:5:15: error: 'b' was not declared in this scope
    5 |   cin >> a >> b;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n、m; 
  cin >> n >> m;
  int a[2*m];
  for (int i=1;i<=n;i++) {
    int c=0;
    for(int j=0;j<2*m;j++) {
      cin >> a[j];
    if (a[j]==i)
      c++;
    }
    cout << c << endl;
  }
}
 

Compiler output:
a.cc:4:7: error: extended character 、 is not valid in an identifier
    4 |   int n、m;
      |       ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin >> n >> m;
      |          ^
      |          yn
a.cc:5:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   cin >> n >> m;
      |               ^
      |               tm
a.cc:10:14: error: 'a' was not declared in this scope
   10 |       cin >> a[j];
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n、m; 
  cin >> n >> m;
  int a[2*m];
  for (int i=0;i<=n;i++) {
    int c=0
    for(int j=0;j<2*m;j++) {
      cin >> a;
    if (a[j]==i)
      c++;
    }
    cout << c << endl;
  }
}
 

Compiler output:
a.cc:4:7: error: extended character 、 is not valid in an identifier
    4 |   int n、m;
      |       ^
a.cc: In function 'int main()':
a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   cin >> n >> m;
      |          ^
      |          yn
a.cc:5:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   cin >> n >> m;
      |               ^
      |               tm
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(int j=0;j<2*m;j++) {
      |     ^~~
a.cc:9:17: error: 'j' was not declared in this scope
    9 |     for(int j=0;j<2*m;j++) {
      |                 ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main() {
  int n、m; cin >> n >> m;
  vector<int> a(2*m);
  for (int i=0;i<m;i++) {
    int c=0
    for(int j=0;j<2*m;j++) {
      cin >> a;
    if (a.at(j)==i)
      c++;
    }
    cout << c << endl;
  }
}
 

Compiler output:
a.cc:5:7: error: extended character 、 is not valid in an identifier
    5 |   int n、m; cin >> n >> m;
      |       ^
a.cc: In function 'int main()':
a.cc:5:20: error: 'n' was not declared in this scope
    5 |   int n、m; cin >> n >> m;
      |                    ^
a.cc:5:25: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |   int n、m; cin >> n >> m;
      |                         ^
      |                         tm
a.cc:9:5: error: expected ',' or ';' before 'for'
    9 |     for(int j=0;j<2*m;j++) {
      |     ^~~
a.cc:9:17: error: 'j' was not declared in this scope
    9 |     for(int j=0;j<2*m;j++) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N,M;
  vector<int> A(2*M);
  for(int i=0;i<2*M;i++){
  	cin >> A.at(i);
  }
  vector<int> B(N);
  for(int i=1;i<N+1;i++){
    int count=0;
  	for(int j=0;j<N;j++){
      if(A.at(j)==i){
      	count++
      }
    }
    B.at(i-1)=count;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: expected ';' before '}' token
   15 |         count++
      |                ^
      |                ;
   16 |       }
      |       ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'k' was not declared in this scope
    9 |     for(int j=0;k<N;j++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;cin>>N>>M;
  int a;
  ventor<int> t(N);
  for(int i=0;i<M;i++){
    cin>>a;
    for(int j=0;k<N;j++){
      if(j==a){
        t.at(j)++;
        break;
      }
    }
  }
  for(int i=0;i<N;i++)cout<<t.at(i)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ventor' was not declared in this scope
    6 |   ventor<int> t(N);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   ventor<int> t(N);
      |          ^~~
a.cc:9:17: error: 'k' was not declared in this scope
    9 |     for(int j=0;k<N;j++){
      |                 ^
a.cc:11:9: error: 't' was not declared in this scope
   11 |         t.at(j)++;
      |         ^
a.cc:16:29: error: 't' was not declared in this scope
   16 |   for(int i=0;i<N;i++)cout<<t.at(i)<<endl;
      |                             ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
typedef long long ll;
using namespace std;

int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

int main() {
	int n,m; cin >> n >> m;
	vector<int> a(m), b(m);
	rep(i,m) cin >> a[i] >> b[i];
	sort(all(a));
	sort(all(b));
	rep(i,n){
		int count = 0;
		rep(j,n){
			if (a[j] == i+1){
				count++
			}
			if (b[j] == i+1){
				count++
			}
		}
		cout << count << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:40: error: expected ';' before '}' token
   35 |                                 count++
      |                                        ^
      |                                        ;
   36 |                         }
      |                         ~               
a.cc:38:40: error: expected ';' before '}' token
   38 |                                 count++
      |                                        ^
      |                                        ;
   39 |                         }
      |                         ~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,m;
  cin>>n>>m;
  int c[n];
  
  for(int i=0;i<m*2;i++){
    int a;
    cin>>a;
    c[a-1]++;
  }
  
  for(int j=0;j<n;j++) cout<<c[i]<<endl;
  return 0;
}
  
  
  

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

#include<iostream>
using namespace std;

int main(){
  int n,m;
  cin>>n>>m;
  int c[n];
  
  for(int i=0;i<m*2;i++){
    int a;
    cin>>a;
    s[a-1]++;
  }
  
  for(int j=0;j<n;j++) cout<<c[i]<<endl;
  return 0;
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s[a-1]++;
      |     ^
a.cc:15:32: error: 'i' was not declared in this scope
   15 |   for(int j=0;j<n;j++) cout<<c[i]<<endl;
      |                                ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,m;
  cin>>n>>m;
  int c[n];
  
  for(int i=0;i<m*2;i++){
    int a;
    cin>>a;
    s[a-1]++;
  }
  
  for(int j=0;j<n;j++) cout<<s[i]<<endl;
  return 0;
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 's' was not declared in this scope
   12 |     s[a-1]++;
      |     ^
a.cc:15:30: error: 's' was not declared in this scope
   15 |   for(int j=0;j<n;j++) cout<<s[i]<<endl;
      |                              ^
a.cc:15:32: error: 'i' was not declared in this scope
   15 |   for(int j=0;j<n;j++) cout<<s[i]<<endl;
      |                                ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  int n[50], m[50];
  for(int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
  }
  int road[50];
  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:7:7: error: conflicting declaration 'int n [50]'
    7 |   int n[50], m[50];
      |       ^
a.cc:5:7: note: previous declaration as 'int n'
    5 |   int n, m;
      |       ^
a.cc:7:14: error: conflicting declaration 'int m [50]'
    7 |   int n[50], m[50];
      |              ^
a.cc:5:10: note: previous declaration as 'int m'
    5 |   int n, 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:16:10: error: 'a' was not declared in this scope
   16 |     road[a[i] - 1] = 1;
      |          ^
a.cc:17:10: error: 'b' was not declared in this scope
   17 |     road[b[i] - 1] = 1;
      |          ^
Language: C++

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

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

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

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

int main() {
  int N,M;
  int i;
  int path;
  
  cin >> N >> M;
  
  vector<int> town(N,0);
  
  for(i=0;i<M;i++){
    cin >> path;
    town.at(path) += 1;
    cin >> path;
    town.at(path) += 1;
  }
  
  for(i=0;i<N;i++){
    cout << town.at(i);
  }
}

    
  
  

  
}


Compiler output:
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^