Submission #973875

#TimeUsernameProblemLanguageResultExecution timeMemory
973875AtabayRajabliMonthly railway pass (LMIO18_menesinis_bilietas)C++17
6 / 100
71 ms9620 KiB
#include <bits/stdc++.h> #define int ll #define all(v) v.begin(), v.end() // author : a1abay using namespace std; typedef long long ll; typedef long double ld; const int sz = 5e5 + 5; const int inf = 1e9 + 7; int n, m, u, v; int d[sz]; char c; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m; for(int i = 1; i <= m; i++) { cin >> u >> v >> c; d[u]++; d[v]++; } int cnt = 0; for(int i = 1; i <= n; i++) cnt += d[i] == n - 1; cout << cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...