# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1108530 | 2024-11-04T11:03:31 Z | dzhoz0 | Balloons (CEOI11_bal) | C++17 | 2000 ms | 9840 KB |
/* ghmt the cutie :3 UwU */ #include <bits/stdc++.h> #include <iomanip> using namespace std; #define int long long #define INF 1e18 #define f first #define s second #define pii pair<int, int> #define vi vector<int> const int MOD = 1'000'000'000 + 7; void setIO(string name = "") { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); #ifdef LOCAL freopen("inp.txt", "r", stdin); freopen("out.txt", "w", stdout); #else if (!name.empty()) { freopen((name + ".INP").c_str(), "r", stdin); freopen((name + ".OUT").c_str(), "w", stdout); } #endif } const int MAXN = 2e5; int n; long double x[MAXN + 5], r[MAXN + 5]; long double res[MAXN + 5]; int sq(int x) { return x * x; } namespace sub1 { bool check() { return n <= 2'000; } void solve() { for(int i = 1; i <= n; i++) { res[i] = r[i]; for(int j = 1; j < i; j++) { // if(r[i] >= r[j]) swap(i, j); res[i] = min(res[i], (x[i] - x[j]) * (x[i] - x[j]) / (4 * r[j])); // if(r[j] >= r[i]) swap(i, j); } } for(int i = 1; i <= n; i++) cout << fixed << setprecision(6) << res[i] << '\n'; } } void solve() { cin >> n; for(int i = 1; i <= n; i++) { cin >> x[i] >> r[i]; } // if(sub1::check()) { sub1::solve(); // return; // } } signed main() { setIO(); int t = 1; // cin >> t; while (t--) solve(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 4432 KB | 5th numbers differ - expected: '17.1630000000', found: '4.3706900000', error = '12.7923100000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 4432 KB | 2 numbers |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 4600 KB | 5th numbers differ - expected: '0.1170000000', found: '0.0833330000', error = '0.0336670000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 13 ms | 4432 KB | 3rd numbers differ - expected: '121.0000000000', found: '120.0182930000', error = '0.9817070000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1155 ms | 9032 KB | 3rd numbers differ - expected: '211.0000000000', found: '210.0105630000', error = '0.9894370000' |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2062 ms | 8780 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2068 ms | 8776 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2052 ms | 8780 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2057 ms | 9100 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2036 ms | 9840 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |