Submission #830508

#TimeUsernameProblemLanguageResultExecution timeMemory
830508vjudge1Lightning Rod (NOI18_lightningrod)C++17
4 / 100
1142 ms156132 KiB
#include<bits/stdc++.h> #define ll long long #define fi first #define se second using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N; cin >> N; vector<int>X(N+1); vector<int>Y(N+1); int lirod=0; for(int i=1; i<=N; i++) { cin >> X[i] >> Y[i]; if(i>1 && X[i]!=X[i-1]) lirod++; } cout << lirod+1 << endl; 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...