Submission #743276

#TimeUsernameProblemLanguageResultExecution timeMemory
743276vjudge1Lightning Rod (NOI18_lightningrod)C++17
4 / 100
1553 ms13844 KiB
#include <iostream> #include <unordered_map> using namespace std; int main () { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long n, a, b, sum = 1, preva; cin >> n; for(long long i = 0;i < n;++i) { cin >> a >> b; if(i != 0) { if(a != preva) sum++; } preva = a; } cout << sum; }
#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...