Submission #572831

#TimeUsernameProblemLanguageResultExecution timeMemory
572831DevigoLightning Rod (NOI18_lightningrod)C++14
0 / 100
2103 ms213956 KiB
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair const int siz = 0; const int mod = 0; int main() { ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<pair<int,int>> v(n); for(int i=0; i<n; i++) { cin >> v[i].first >> v[i].second; } int cnt = 0; map<int,int> m; for(int i=0; i<n; i++) { m[v[i].first]++; if(m[v[i].first] == 1) cnt++; } cout << cnt << "\n"; return 0; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...