Submission #692655

#TimeUsernameProblemLanguageResultExecution timeMemory
692655zeroesandonesLightning Rod (NOI18_lightningrod)C++17
7 / 100
1387 ms262144 KiB
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; typedef vector<ll> vi; typedef pair<ll, ll> pi; #define FOR(i, j, k) for (ll i = j; i < (ll) k; ++i) #define FORD(i, j, k) for (ll i = j; i >= (ll) k; --i) #define nl "\n" #define sp " " #define all(x) (x).begin(), (x).end() #define sc second #define fr first #define pb emplace_back void solve() { ll n; cin >> n; ll x[n], y[n]; FOR(i, 0, n) { cin >> x[i] >> y[i]; } if(y[0] < y[1]) { swap(y[0], y[1]); swap(x[0], x[1]); } if(abs(x[0] - x[1]) <= y[0] - y[1]) { cout << 1 << nl; } else { cout << 2 << nl; } } signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll t = 1; // cin >> t; while (t--) { solve(); } }
#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...