# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041870 | 2024-08-02T08:53:34 Z | 김기범(#11055) | Bring Down the Grading Server (CEOI23_gradingserver) | C++17 | 74 ms | 3724 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool fuck(ll x, ll y, ll z, ll w){ ll t = max({x, y, z, w}); w += t-x; x = t; y += t-z; z = t; if (t <= y && y >= w) return true; else if (t <= y) return false; else if (t <= w) return false; else if ((__int128)((t-y)*2 - (t-w)) * ((t-y)*2 - (t-w)) <= (__int128)(t-w) * (t-w) * 5) return true; // else if ((long double)(t-y) / (t-w) <= (sqrtl(5)+1)/2) return true; return false; } int main(){ int s, q; scanf("%d %d", &s, &q); // freopen("out2.txt", "w", stdout); // int LIM = 50; // for (int i=1;i<=LIM;i++) for (int j=0;j<=LIM;j++){ // for (int k=1;k<=LIM;k++) for (int l=0;l<=LIM;l++){ // if (fuck(i, j, k, l)) printf("#"); // else printf("."); // } // printf("\n"); // } // return 0; while(q--){ ll x, y, z, w; scanf("%lld %lld %lld %lld", &x, &y, &z, &w); if (fuck(x, y, z, w)) printf("YES\n"); else printf("NO\n"); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 74 ms | 3724 KB | Output is correct |
2 | Correct | 72 ms | 1612 KB | Output is correct |
3 | Correct | 68 ms | 1472 KB | Output is correct |
4 | Correct | 0 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |