Submission #896036

#TimeUsernameProblemLanguageResultExecution timeMemory
896036wilspLightning Rod (NOI18_lightningrod)C++17
7 / 100
2054 ms68040 KiB
#include <iostream> #include <vector> using namespace std; //aouxwoux's attempt at mock ZCO#1 Q1 (NOI 2018 P3) int main() { int n; cin >> n; vector<pair<int,int>> coords; bool checker = true; for(int i = 0 ; i < n ; i++) { int x, y; cin >> x >> y; if(y != 1) { checker = false; } coords.push_back({x,y}); } if(checker == true) { cout << n << "\n"; } else if(n == 2) { if(abs(coords[1].second-coords[0].second)>=abs(coords[1].first-coords[0].first)) { cout << 1 << '\n'; } else { cout << 2 << '\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...