Submission #517325

#TimeUsernameProblemLanguageResultExecution timeMemory
517325blueArcade (NOI20_arcade)C++17
7 / 100
1 ms336 KiB
#include <iostream> #include <vector> #include <algorithm> using namespace std; using pii = pair<int, int>; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int N, M; cin >> N >> M; pii O[N]; for(int i = 0; i < M; i++) cin >> O[i].first; for(int i = 0; i < M; i++) cin >> O[i].second; sort(O, O+M); bool works = 1; for(int i = 0; i+1 < M; i++) if(abs(O[i+1].second - O[i].second) > abs(O[i+1].first - O[i].first)) works = 0; if(works) cout << 1 << '\n'; else cout << 2 << '\n'; }
#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...