# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
743335 |
2023-05-17T09:54:53 Z |
kxd |
Nicelines (RMI20_nicelines) |
C++17 |
|
60 ms |
208 KB |
#include "nice_lines.h"
#include <bits/stdc++.h>
//#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define p_q priority_queue
#define m_p make_pair
#define pii pair<int,int>
#define endl '\n'
#define INIT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define forn(i, n) for (int i = 0; i < n; i++)
#define forn1(i, n) for (int i = 1; i <= n; i++)
#define all(x) x.begin(),x.end()
#define ft first
#define sd second
using namespace std;
void solve(int subtask_id, int N) {
if(subtask_id != 1){
the_lines_are({1},{0});
return;
}
ld s = -1e12;
ld e = 1e12;
forn(i,1000){
ld mid = (s+e)/2;
ld mid2 = (s+e)/2+0.000001;
if(query(0,mid) > query(0,mid2)) s = mid;
else e = mid2;
}
ld s2 = s;
s = 1e12;
e = -1e12;
forn(i,1000){
ld mid = (s+e)/2;
ld mid2 = (s+e)/2+0.000001;
if(query(1,mid) > query(1,mid2)) s = mid;
else s = mid2;
}
int a = (int)round(s-s2);
int b = (int)round(s2);
the_lines_are({a}, {b});
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
60 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Incorrect |
2 |
Halted |
0 ms |
0 KB |
- |