Submission #1069674

#TimeUsernameProblemLanguageResultExecution timeMemory
1069674NeroZeinBring Down the Grading Server (CEOI23_gradingserver)C++17
0 / 100
4091 ms1212 KiB
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); int s, q; cin >> s >> q; while (q--) { vector<long long> c(2), f(2), mn(2, LLONG_MAX); cin >> c[0] >> f[0] >> c[1] >> f[1]; for (int i = 0; i < 2; ++i) { for (int j = 0; j <= f[i ^ 1]; ++j) { long long damage = c[i] - f[i ^ 1] * s; if (damage > 0) { mn[i] = min(mn[i], (c[i ^ 1] + damage - 1) / damage + j); } } } cout << (mn[0] <= mn[1] ? "YES" : "NO") << '\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...
#Verdict Execution timeMemoryGrader output
Fetching results...