解法:
#include<iostream>
using namespace std;
int arr[100][100];
int main() {int vertex, edge;cin >> vertex >> edge;int i, j;while (edge--) {cin >> i >> j;arr[i][j] = 1;}for (int i = 0; i < vertex; i++) {int sum = 0;for (int j = 0; j < vertex; j++) {sum += arr[i][j];}cout << sum << endl;}return 0;
}