Submission #743008

# Submission time Handle Problem Language Result Execution time Memory
743008 2023-05-17T07:22:11 Z hmm789 Nicelines (RMI20_nicelines) C++14
11 / 100
1 ms 292 KB
#include <stdio.h>

#include "nice_lines.h"
#include <bits/stdc++.h>

void solve(int subtask_id, int N) {
    long double x = query(0, 0);
    long double y = query(1, 0);
    long double z = query(0.5, 0);
    long double w = query(0.000001, 0);
    if(z >= x || z >= y) {
		long double a = tan(asin(y-x));
		if(x == y) {
			the_lines_are({0}, {(int)round(x)});
		} else {
			int a1 = (int)round(a);
			int b1 = (int)round(a*x/(y-x));
			the_lines_are({a1}, {b1});
		}
	} else {
		long double a = tan(asin(x+y));
		if(w < x) a = -a;
		int a1 = (int)round(a);
		int b1 = (int)round(-a*x/(x+y));
		the_lines_are({a1}, {b1});
	}
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 208 KB Output is correct
2 Correct 1 ms 292 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 1 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 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 1 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 -