Submission #833762

#TimeUsernameProblemLanguageResultExecution timeMemory
833762LiudasArcade (NOI20_arcade)C++17
0 / 100
0 ms212 KiB
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> T(M), A(M); for(int i = 0; i < M; i ++){ cin >> T[i]; } for(int j = 0; j < M; j ++){ cin >> A[j]; } int s = A[0], t = T[0]; for(int i = 0; i < M; i ++){ if(T[i]-t < abs(A[i]-s)){ cout << 2 << endl; return 0; } t = T[i]; s = A[i]; } cout << 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...