Submission #689661

#TimeUsernameProblemLanguageResultExecution timeMemory
689661saayan007Arcade (NOI20_arcade)C++17
7 / 100
1 ms340 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; using pi = pair<int, int>; using pl = pair<long long, long long>; using vi = vector<int>; using vl = vector<long long>; using vpi = vector<pair<int, int>>; using vpl = vector<pair<long long, long long>>; #define fur(i, a, b) for(ll i = a; i <= (ll)b; ++i) #define ruf(i, a, b) for(ll i = a; i >= (ll)b; --i) #define fr first #define sc second #define mp make_pair #define pb push_back #define eb emplace_back #define nl "\n" #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() const ll mxm = 5e5L; ll n, m; ll t[mxm]; ll a[mxm]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m; fur(i, 1, m) { cin >> t[i]; } fur(i, 1, m) { cin >> a[i]; } ll ans = 1; fur(i, 2, m) { if(abs(t[i] - t[i - 1]) < abs(a[i] - a[i - 1])) { ans = 2; } } cout << ans << nl; }
#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...