Submission #4073343
Source Code Expand
#include<iostream> #include<vector> #include<algorithm> #include<complex> #include<string.h> using namespace std; typedef long long int llint; int main(){ int n, m; cin >> n >> m; vector<pair<int,int>>a(m); for (int i = 0; i < m; i++){ cin >> a[i].first >> a[i].second; } vector<int>ans(n, 0); for (int i = 0; i < n; i++){ for (int j = 0; j < m; j++){ if (a[j].first == i + 1 || a[j].second == i + 1){ ans[i]++; } } } for (int i = 0; i < n; i++){ cout << ans[i] << endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Counting Roads |
User | tRue |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 513 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |
subtask_1_1.txt | AC | 1 ms | 256 KB |
subtask_1_2.txt | AC | 1 ms | 256 KB |
subtask_1_3.txt | AC | 1 ms | 256 KB |
subtask_1_4.txt | AC | 1 ms | 256 KB |
subtask_1_5.txt | AC | 1 ms | 256 KB |
subtask_1_6.txt | AC | 1 ms | 256 KB |
subtask_1_7.txt | AC | 1 ms | 256 KB |