# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875250 | Ahmed57 | Nicelines (RMI20_nicelines) | C++17 | 28 ms | 440 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "nice_lines.h"
using namespace std;
void solve(int subtaskid,int N){
int x = 0;
double l = -1000000000.0 , r = 1000000000.0;
for(int x = 0;x<1000;x++){
double f1 = l+(r-l)/3 , f2 = r-(r-l)/3;
if(query(0,f1)<=query(0,f2)){
r = f2;
}else l = f1;
}
double y1 = l;
l = -1000000000.0 , r = 1000000000.0;
for(int x = 0;x<1000;x++){
double f1 = l+(r-l)/3 , f2 = r-(r-l)/3;
if(query(1,f1)<=query(1,f2)){
r = f2;
}else l = f1;
}
double y2 = l;
double m = (y2-y1);
the_lines_are({m},{y1});
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |