Submission #11354631
Source Code Expand
#include<iostream> #include<cstdio> #include<string> #include<vector> #include<queue> #include<cmath> #include<algorithm> #include<iomanip> #include<functional> #include<set> #include<map> #include<climits> #include<numeric> #include<utility> #define ul unsigned long long int #define ll long long int #define MAX 1000000+1 using namespace std; #define F first #define S second #define pi 2*acos(0.0) #define PB push_back #define CL clear() int main() { int n, m; cin >> n >> m; vector<int> arr[n+1]; for(int i= 1; i <=n; i++) arr[i].clear(); int a, b; for(int i = 0; i < m; i++) { cin >> a >> b; arr[a].PB(b); arr[b].PB(a); } for(int i= 1; i <=n; i++) cout << arr[i].size()<<"\n"; }
Submission Info
Submission Time | |
---|---|
Task | B - Counting Roads |
User | vjudge3 |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 768 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 |