Submission #320669

#TimeUsernameProblemLanguageResultExecution timeMemory
320669egasArcade (NOI20_arcade)C++14
7 / 100
1 ms364 KiB
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; long long m; cin >> m; vector<long long> a(m); for(long long i = 0 ; i < m ; i++) { cin >> a[i]; } vector<long long> b(m); for(long long i = 0 ; i < m ; i++) { cin >> b[i]; } bool one=true; for(long long i = 0 ; i < m-1 ; i++) { long long dif1 = abs(a[i]-a[i+1]); long long dif2 = abs(b[i]-b[i+1]); if(dif1<dif2) { one=false; } } if(one) { 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...