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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before 'ab'
    8 |   vector<int> ab(M * 2);
      |               ^~
a.cc:10:14: error: 'ab' was not declared in this scope; did you mean 'abs'?
   10 |       cin >> ab.at(i);
      |              ^~
      |              abs
a.cc:16:20: error: 'ab' was not declared in this scope; did you mean 'abs'?
   16 |       if (i + 1 == ab.at(j)) {
      |                    ^~
      |                    abs
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(void) {
2 int N, M;
3 cin >> N >> M;
4
5 const int NMMAX = 50;
6 int A[NMMAX], B[NMMAX];
7
8 for (int i = 0; i < M; ++i) {
9 cin >> A[i] >> B[i];
10 }
11
12 int road[NMMAX];
13 for (int i = 0; i < N; ++i) {
14 road[i] = 0;
15 }
16
17 for (int i = 0; i < M; ++i) {
18 road[A[i] - 1] += 1;
19 road[B[i] - 1] += 1;
20 }
21
22 for (int i = 0; i < N; ++i) {
23 cout << road[i] << endl;
24 }
25
26 return 0;
27 }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: expected ';' before 'int'
    5 | 2 int N, M;
      |  ^~~~
      |  ;
a.cc:6:2: error: expected ';' before 'cin'
    6 | 3 cin >> N >> M;
      |  ^~~~
      |  ;
a.cc:7:2: error: expected ';' before numeric constant
    7 | 4
      |  ^
      |  ;
    8 | 5 const int NMMAX = 50;
      | ~ 
a.cc:9:2: error: expected ';' before 'int'
    9 | 6 int A[NMMAX], B[NMMAX];
      |  ^~~~
      |  ;
a.cc:10:2: error: expected ';' before numeric constant
   10 | 7
      |  ^
      |  ;
   11 | 8 for (int i = 0; i < M; ++i) {
      | ~ 
a.cc:11:19: error: 'i' was not declared in this scope
   11 | 8 for (int i = 0; i < M; ++i) {
      |                   ^
a.cc:11:23: error: 'M' was not declared in this scope
   11 | 8 for (int i = 0; i < M; ++i) {
      |                       ^
a.cc:14:3: error: expected ';' before numeric constant
   14 | 11
      |   ^
      |   ;
   15 | 12 int road[NMMAX];
      | ~~ 
a.cc:16:3: error: expected ';' before 'for'
   16 | 13 for (int i = 0; i < N; ++i) {
      |   ^~~~
      |   ;
a.cc:16:24: error: 'N' was not declared in this scope
   16 | 13 for (int i = 0; i < N; ++i) {
      |                        ^
a.cc:19:3: error: expected ';' before numeric constant
   19 | 16
      |   ^
      |   ;
   20 | 17 for (int i = 0; i < M; ++i) {
      | ~~ 
a.cc:24:3: error: expected ';' before numeric constant
   24 | 21
      |   ^
      |   ;
   25 | 22 for (int i = 0; i < N; ++i) {
      | ~~ 
a.cc:28:3: error: expected ';' before numeric constant
   28 | 25
      |   ^
      |   ;
   29 | 26 return 0;
      | ~~ 
a.cc:30:3: error: expected ';' before '}' token
   30 | 27 }
      |   ^~
      |   ;
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ll long long

using namespace std;

int main(){
  int n,m;cin>>n>>m;

  map<int, int> m;
  rep(i,m){
    int a,b;cin>>a>>b;
    map[a]++;
    map[b]++;
  }

  rep(i,n){
    cout<<m[i+1]<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: conflicting declaration 'std::map<int, int> m'
   11 |   map<int, int> m;
      |                 ^
a.cc:9:9: note: previous declaration as 'int m'
    9 |   int n,m;cin>>n>>m;
      |         ^
a.cc:14:9: error: conflicting declaration 'auto a'
   14 |     map[a]++;
      |         ^
a.cc:13:9: note: previous declaration as 'int a'
   13 |     int a,b;cin>>a>>b;
      |         ^
a.cc:14:11: error: expected initializer before '++' token
   14 |     map[a]++;
      |           ^~
a.cc:15:9: error: conflicting declaration 'auto b'
   15 |     map[b]++;
      |         ^
a.cc:13:11: note: previous declaration as 'int b'
   13 |     int a,b;cin>>a>>b;
      |           ^
a.cc:15:11: error: expected initializer before '++' token
   15 |     map[b]++;
      |           ^~
a.cc:19:12: error: invalid types 'int[int]' for array subscript
   19 |     cout<<m[i+1]<<endl;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin >> a(M).at(i) >> b(M).at(i);
      |            ~^~~
a.cc:11:27: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin >> a(M).at(i) >> b(M).at(i);
      |                          ~^~~
a.cc:16:6: error: no match for call to '(std::vector<int>) (int&)'
   16 |     c(N).at(a(M).at(i) -1)++;
      |     ~^~~
a.cc:16:14: error: no match for call to '(std::vector<int>) (int&)'
   16 |     c(N).at(a(M).at(i) -1)++;
      |             ~^~~
a.cc:17:6: error: no match for call to '(std::vector<int>) (int&)'
   17 |     c(N).at(b(M).at(i) -1)++;
      |     ~^~~
a.cc:17:14: error: no match for call to '(std::vector<int>) (int&)'
   17 |     c(N).at(b(M).at(i) -1)++;
      |             ~^~~
a.cc:19:12: error: no match for call to '(std::vector<int>) (int&)'
   19 |   cout << c(N) << endl;
      |           ~^~~
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  
  vector<int> machi_a(M);
  vector<int> machi_b(M);
  vector<int> total(N);

  
  for(int i=0; i <M; i++){
    cin >> machi_a.at(i) >> machi_b.at(i);
    int A =machi_a.at(i);
    int B =machi_b.at(i);
    for(int j =0, j<N; j++){
      if(A == j){
        total.at(j)++;}
      if(B == j){
        total.at(j)++;}}
  }
  for(int i =0; i<N; i++){
    cout << total.at(j) << endl;}
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: expected ';' before '<' token
   17 |     for(int j =0, j<N; j++){
      |                    ^
      |                    ;
a.cc:17:20: error: expected primary-expression before '<' token
a.cc:24:22: error: 'j' was not declared in this scope
   24 |     cout << total.at(j) << endl;}
      |                      ^
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  
  vector<int> machi_a(M);
  vector<int> machi_b(M);
  vector<int> total(N);

  
  for(int i=0; i <M; i++){
    cin >> machi_a(i) >> machi_b(i);
    int A =machi_a(i);
    int B =machi_b(i);
    for(int j =0, j<N; j++){
      if(A == j){
        total.at(j)++;}
      if(B == j){
        total.at(j)++;}}
  }
  for(int i =0; i<N; i++){
    cout << total.at(j) << endl;}
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: no match for call to '(std::vector<int>) (int&)'
   14 |     cin >> machi_a(i) >> machi_b(i);
      |            ~~~~~~~^~~
a.cc:14:33: error: no match for call to '(std::vector<int>) (int&)'
   14 |     cin >> machi_a(i) >> machi_b(i);
      |                          ~~~~~~~^~~
a.cc:15:19: error: no match for call to '(std::vector<int>) (int&)'
   15 |     int A =machi_a(i);
      |            ~~~~~~~^~~
a.cc:16:19: error: no match for call to '(std::vector<int>) (int&)'
   16 |     int B =machi_b(i);
      |            ~~~~~~~^~~
a.cc:17:20: error: expected ';' before '<' token
   17 |     for(int j =0, j<N; j++){
      |                    ^
      |                    ;
a.cc:17:20: error: expected primary-expression before '<' token
a.cc:24:22: error: 'j' was not declared in this scope
   24 |     cout << total.at(j) << endl;}
      |                      ^
Language: C++

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

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

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

#include <iostream>
#include <fstream>
#include <algorithm>       // for next_permutation
#include <vector>
#include <bits/stl_numeric.h>

#define DEBUG 0
#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;


int main() {

    int N,M;
    cin >> N >> M;
    vector <int> do(N, 0);

    for(int i = 0; i < M: ++i)
    {
        int a,b;
        cin >> a >> b;
        --a;--b;
        ++do[a];
        ++do[b];
    }

    for(auto t:do)
    {
        cout << t << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected unqualified-id before 'do'
   19 |     vector <int> do(N, 0);
      |                  ^~
a.cc:21:20: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   21 |     for(int i = 0; i < M: ++i)
      |                    ^
a.cc:21:25: error: expected ';' before ':' token
   21 |     for(int i = 0; i < M: ++i)
      |                         ^
      |                         ;
a.cc:30:5: error: expected primary-expression before 'for'
   30 |     for(auto t:do)
      |     ^~~
a.cc:28:6: error: expected ';' before 'for'
   28 |     }
      |      ^
      |      ;
   29 | 
   30 |     for(auto t:do)
      |     ~~~
a.cc:30:5: error: expected primary-expression before 'for'
   30 |     for(auto t:do)
      |     ^~~
a.cc:28:6: error: expected ')' before 'for'
   28 |     }
      |      ^
      |      )
   29 | 
   30 |     for(auto t:do)
      |     ~~~
a.cc:21:8: note: to match this '('
   21 |     for(int i = 0; i < M: ++i)
      |        ^
a.cc:30:16: error: expected primary-expression before 'do'
   30 |     for(auto t:do)
      |                ^~
a.cc:30:16: error: expected ')' before 'do'
   30 |     for(auto t:do)
      |        ~       ^~
      |                )
a.cc:30:18: error: expected primary-expression before ')' token
   30 |     for(auto t:do)
      |                  ^
a.cc:35:12: error: expected 'while' before numeric constant
   35 |     return 0;
      |            ^
a.cc:35:12: error: expected '(' before numeric constant
   35 |     return 0;
      |            ^
      |            (
a.cc:35:13: error: expected ')' before ';' token
   35 |     return 0;
      |            ~^
      |             )
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'A' was not declared in this scope
   16 |     c.at(A.at(i) - 1) += 1;
      |          ^
a.cc:17:10: error: 'B' was not declared in this scope
   17 |     c.at(B.at(i) - 1) += 1;
      |          ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: unable to find numeric literal operator 'operator""m'
    8 |   for(int i=0;i<2m;i++){
      |                 ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  cin>>N>>M;
  int n,m;
  n=0;
  while(n<N){
    m=0;
    while(m<2*M){
      cin>>m;
      if(m==n){
        x++;
      }
      m++;
    } 
    cout<<m<<endl;
    n++;
  }
}
     
    
    
        
    

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

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

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}






int gcd(int a,int b)
{
 
  int r, tmp;
 
  
 
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
 
 
 
  return b;
}







int fac(int n){
  int m=1;
  while(n>=1) m*=n,n--;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}
///////////////////////////
int main() {
  int n,m;
  cin>>n>>m;
  vector<int> v;
  map<int,int> mp;
  rep(i,2*m){
    int a;
    cin>>a;
    v.push_back(a);
  }
  rep(i,2*m){
    mp[v[i]-1]++;
  }
  
  for(i,n){
    cout<<mp[i]<<endl;
  }
  
}
///////////////////////////



Compiler output:
a.cc: In function 'int main()':
a.cc:83:7: error: 'i' was not declared in this scope
   83 |   for(i,n){
      |       ^
a.cc:87:1: error: expected primary-expression before '}' token
   87 | }
      | ^
a.cc:85:4: error: expected ';' before '}' token
   85 |   }
      |    ^
      |    ;
   86 | 
   87 | }
      | ~   
a.cc:87:1: error: expected primary-expression before '}' token
   87 | }
      | ^
a.cc:85:4: error: expected ')' before '}' token
   85 |   }
      |    ^
      |    )
   86 | 
   87 | }
      | ~   
a.cc:83:6: note: to match this '('
   83 |   for(i,n){
      |      ^
a.cc:87:1: error: expected primary-expression before '}' token
   87 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)n;i++)
 
int main()
{
  int N, M, x, y;
  string all;
  cin >> N >> M;
  vector<int> x(M);
  rep(i,M)
  {
    rep(j,2)
    {
      cin >> x >> y;
      all+='0'+x+y;
    }
  }
  rep(k,all.size())
  {
    rep(l,N)
    {
      if(all.at(k)=='0'+l+1)
      x.at(l)++;
    }
  }
  rep(z,N){cout << x.at(z) << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: conflicting declaration 'std::vector<int> x'
   10 |   vector<int> x(M);
      |               ^
a.cc:7:13: note: previous declaration as 'int x'
    7 |   int N, M, x, y;
      |             ^
a.cc:24:9: error: request for member 'at' in 'x', which is of non-class type 'int'
   24 |       x.at(l)++;
      |         ^~
a.cc:27:22: error: request for member 'at' in 'x', which is of non-class type 'int'
   27 |   rep(z,N){cout << x.at(z) << endl;}
      |                      ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: lvalue required as increment operand
   13 |                 ++N[b]
Language: C

#include<iostream>
#include<vector>

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;
		ans[a-1]++; 
		ans[b-1]++;
	}
	
	for(int i = 0;i < n;i++){
		cout << ans[i] << endl;
	}
	
	return 0;
}

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

c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:67: error: 'n' undeclared (first use in this function)
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                                                                   ^
main.c:1:67: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:72: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | c[51];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                                                                        ^~~~~~
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:72: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |     ^~~~
main.c: In function 'main':
main.c:1:5: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:5: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:65: error: 'n' undeclared (first use in this function)
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                                                                 ^
main.c:1:65: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      |                                                                      ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:1: warning: array 'c' assumed to have one element
    1 | c[];main(b,a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;n/b;)printf("%d\n",c[b++]);}
      | ^
Language: C

b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |   ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:69: error: 'n' undeclared (first use in this function)
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |                                                                     ^
main.c:1:69: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:72: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |                                                                        ^~~~~~
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:72: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:72: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:3: warning: array 'c' assumed to have one element
    1 | b,c[];main(a){for(scanf("%d%*d",c);~scanf("%d",&a);)c[a]++;for(;b++<n;)printf("%d\n",c[b]);}
      |   ^
Language: C

r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:86: error: 'm' undeclared (first use in this function)
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      |                                                                                      ^
main.c:1:86: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:93: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | r[99];main(n,a,b){scanf("%d%d",&n,&a);while(~scanf("%d%d",&a,&b))r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r[++m]);}
      |                                                                                             ^~~~~~
main.c:1:93: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:93: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:93: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:7: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:98: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      |                                                                                                  ^~~~~~
main.c:1:98: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:98: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:98: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:113: error: lvalue required as increment operand
    1 | r[99];main(n,m,a,b){scanf("%d%d",&n,&m);while(m--)scanf("%d%d",&a,&b),r[a]++,r[b]++;for(++m;m<n;)printf("%d\n",r+++m);}
      |                                                                                                                 ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  int e[50];
  
  for(int i=1; i<=a ;i++){
  
       e[i] =0;
  }
    for(int j =1; j<=b;j++){
        e[c[j]-1] += 1;
        e[d[j]-1] += 1;
    }
      for(int i =1 ;i<=a;j++){
    cout << e[i] <<endl;
  }
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  int e[50],f[50];
  
  for(int i=1; i<=a ;i++){
  
       int e[i] = 0,f[i] = 0;
    for(int j =1; j<=b;j++){
        e[c[j]-1] += 1;
        f[d[j]-1] += 1;
    }
      
    cout << e[i]+f[i] <<endl;
  }
}
 
 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: array must be initialized with a brace-enclosed initializer
   14 |        int e[i] = 0,f[i] = 0;
      |                   ^
a.cc:14:28: error: array must be initialized with a brace-enclosed initializer
   14 |        int e[i] = 0,f[i] = 0;
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  int e[50],f[50];
  
  for(int i=1; i<=a ;i++){
  
       int e[i] =0,f[i] =0;
    for(int j =1; j<=b;j++){
        e[c[j]-1] += 1;
        f[d[j]-1] += 1;
    }
      
    cout << e[i]+f[i] <<endl;
  }
}
 
 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: array must be initialized with a brace-enclosed initializer
   14 |        int e[i] =0,f[i] =0;
      |                  ^
a.cc:14:26: error: array must be initialized with a brace-enclosed initializer
   14 |        int e[i] =0,f[i] =0;
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  
  
  for(int i=1; i<=a ;i++){
    int e[50] ,f[50];
    
    int e[i] =0,f[i] =0;
    for(int j =1; j<=b;j++){
        e[c[j]-1] += 1;
        f[d[j]-1] += 1;
    }
      
    cout << e[i]+f[i] <<endl;
  }
}
 
 


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: conflicting declaration 'int e [i]'
   15 |     int e[i] =0,f[i] =0;
      |         ^
a.cc:13:9: note: previous declaration as 'int e [50]'
   13 |     int e[50] ,f[50];
      |         ^
a.cc:15:17: error: conflicting declaration 'int f [i]'
   15 |     int e[i] =0,f[i] =0;
      |                 ^
a.cc:13:16: note: previous declaration as 'int f [50]'
   13 |     int e[50] ,f[50];
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  
  
  for(int i=1; i<=a ;i++){
    int e[50] = 0;
    int f[50] = 0;
    for(int j =1; j<=b;j++){
        e[c[j]-1] += 1;
        f[d[j]-1] += 1;
    }
      
    cout << e[i]+f[i] <<endl;
  }
}
 
 


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c[50],d[50];
  cin>> a >>b;
  
  for(int i=0; i<b;i++){
    cin >> c[i] >>d[i];
  }
  
  
  for(int i=0; i<a ;i++){
    int e = 0;
    for(int j =0; j<b;j++){
      if(a[j] == i){
        e++;
      }
      if(b[j] == i){
        e++;
      }
    }
    cout << e <<endl;
  }
}
 
 
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: invalid types 'int[int]' for array subscript
   15 |       if(a[j] == i){
      |           ^
a.cc:18:11: error: invalid types 'int[int]' for array subscript
   18 |       if(b[j] == i){
      |           ^
Language: C++

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

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

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

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


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int N, M, a, b, i;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> N >> M;
      |     ^~~
a.cc:7:20: error: 'N' was not declared in this scope
    7 |   vector<int> road(N);
      |                    ^
a.cc:8:5: error: expected unqualified-id before 'for'
    8 |     for(i=0; i<M; i++){
      |     ^~~
a.cc:8:14: error: 'i' does not name a type
    8 |     for(i=0; i<M; i++){
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 |     for(i=0; i<M; i++){
      |                   ^
a.cc:14:3: error: expected unqualified-id before 'for'
   14 |   for (i=0; i<N; i++){
      |   ^~~
a.cc:14:13: error: 'i' does not name a type
   14 |   for (i=0; i<N; i++){
      |             ^
a.cc:14:18: error: 'i' does not name a type
   14 |   for (i=0; i<N; i++){
      |                  ^
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int N, M, a, b, i;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> N >> M;
      |     ^~~
a.cc:7:20: error: 'N' was not declared in this scope
    7 |   vector<int> road(N)
      |                    ^
a.cc:8:5: error: expected ',' or ';' before 'for'
    8 |     for(i=0; i<M; i++){
      |     ^~~
a.cc:8:14: error: 'i' does not name a type
    8 |     for(i=0; i<M; i++){
      |              ^
a.cc:8:19: error: 'i' does not name a type
    8 |     for(i=0; i<M; i++){
      |                   ^
a.cc:14:3: error: expected unqualified-id before 'for'
   14 |   for (i=0; i<N; i++){
      |   ^~~
a.cc:14:13: error: 'i' does not name a type
   14 |   for (i=0; i<N; i++){
      |             ^
a.cc:14:18: error: 'i' does not name a type
   14 |   for (i=0; i<N; i++){
      |                  ^
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

int main(void) {
    int N, M;
    cin >> N >> M;
    const int NMMAX = 50;
    int A[NMMAX], B[NMMAX];
for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
}
int road[NMMAX];
for (inti=0;i<N;++i){
road[i] = 0; }
for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
}
for (inti=0;i<N;++i){ cout << road[i] << 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 >> N >> M;
      |     ^~~
a.cc:6:6: error: 'inti' was not declared in this scope; did you mean 'int'?
    6 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
      |      ^~~~
      |      int
a.cc:6:13: error: 'i' was not declared in this scope
    6 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i];
      |             ^
a.cc:9:6: error: 'inti' was not declared in this scope; did you mean 'int'?
    9 | for (inti=0;i<N;++i){
      |      ^~~~
      |      int
a.cc:9:13: error: 'i' was not declared in this scope
    9 | for (inti=0;i<N;++i){
      |             ^
a.cc:11:6: error: 'inti' was not declared in this scope; did you mean 'int'?
   11 | for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
      |      ^~~~
      |      int
a.cc:11:13: error: 'i' was not declared in this scope
   11 | for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1;
      |             ^
a.cc:13:6: error: 'inti' was not declared in this scope; did you mean 'int'?
   13 | for (inti=0;i<N;++i){ cout << road[i] << endl;
      |      ^~~~
      |      int
a.cc:13:13: error: 'i' was not declared in this scope
   13 | for (inti=0;i<N;++i){ cout << road[i] << endl;
      |             ^
a.cc:13:23: error: 'cout' was not declared in this scope
   13 | for (inti=0;i<N;++i){ cout << road[i] << endl;
      |                       ^~~~
a.cc:13:42: error: 'endl' was not declared in this scope
   13 | for (inti=0;i<N;++i){ cout << road[i] << endl;
      |                                          ^~~~
Language: C++

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

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

  for(int i=0; i<n; i++){
    cout << bridge.at(i) << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: invalid declarator before 'bridge'
    9 |   int vector<int> bridge(n);
      |                   ^~~~~~
a.cc:12:5: error: 'bridge' was not declared in this scope
   12 |     bridge.at(a) += 1;
      |     ^~~~~~
a.cc:17:13: error: 'bridge' was not declared in this scope
   17 |     cout << bridge.at(i) << endl;
      |             ^~~~~~
Language: C++

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

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

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> list(2 * m);
  
  for (int i = 0; i < 2 * m; i++)
	cin >> list.at(i);
  
  for (int j = 1; j <= n; j++) {
	int x = 0;
    for (int k = 0; k < 2 * m; k++) {
      if (list.at(k) == j)
        x++;
    }
    cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: 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>A(M),B(M);
  for(int i=0;i<M;i++) {
    cin>>A.at(i),B.at(i);
  }
  for(int i =1;i<N+1;i+=1) {
    for(int j=1;j<N+1;j+=1) {
      int countj = 0;
      if(A.at(i-1)==j || B.at(i-1)==j) {
         countj +=1;
      }
    }
  }
  for(int j=1; j<N+1;j+=1) {
    count<< countj <<endl;
  }
}
        
      
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |     cin>>A.at(i),B.at(i);
      |                  ~~~~^~~
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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:19:13: error: 'countj' was not declared in this scope
   19 |     count<< countj <<endl;
      |             ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |     cin>>A.at(i),B.at(i);
      |                  ~~~~^~~
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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:12:17: error: expected initializer before 'int'
   12 |       int count int j = 0
      |                 ^~~
a.cc:19:13: error: 'countj' was not declared in this scope
   19 |     count<< countj <<endl;
      |             ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |     cin>>A.at(i),B.at(i);
      |                  ~~~~^~~
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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:12:17: error: expected initializer before 'j'
   12 |       int count j = 0
      |                 ^
a.cc:19:13: error: 'countj' was not declared in this scope
   19 |     count<< countj <<endl;
      |             ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before ')' token
    7 |   for(int i=0;i<M) {
      |                  ^
      |                  ;
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |     cin>>A.at(i),B.at(i);
      |                  ~~~~^~~
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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:12:17: error: expected initializer before 'j'
   12 |       int count j = 0
      |                 ^
a.cc:19:13: error: 'countj' was not declared in this scope
   19 |     count<< countj <<endl;
      |             ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before ')' token
    7 |   for(int i=0;i<M) {
      |                  ^
      |                  ;
a.cc:8:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |     cin>>A.at(i),B.at(i);
      |                  ~~~~^~~
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:1180:7: note: declared here
 1180 |       at(size_type __n)
      |       ^~
a.cc:12:17: error: expected initializer before 'j'
   12 |       int count j = 0
      |                 ^
a.cc:19:13: error: 'countj' was not declared in this scope
   19 |     count<< countj <<endl;
      |             ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(void){
  
  int N, M, A, B;
  
  cin >> N >> M;
  
  int count[N];
  for(int i = 0; i < N; i++){
    count.at(i) = 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:11:11: error: request for member 'at' in 'count', which is of non-class type 'int [N]'
   11 |     count.at(i) = 0;
      |           ^~
a.cc:16:11: error: request for member 'at' in 'count', which is of non-class type 'int [N]'
   16 |     count.at(A)++;
      |           ^~
a.cc:17:11: error: request for member 'at' in 'count', which is of non-class type 'int [N]'
   17 |     count.at(B)++;
      |           ^~
a.cc:21:19: error: request for member 'at' in 'count', which is of non-class type 'int [N]'
   21 |     cout << count.at(i) << endl;
      |                   ^~