Submission #743264

# Submission time Handle Problem Language Result Execution time Memory
743264 2023-05-17T09:18:01 Z jamielim Nicelines (RMI20_nicelines) C++14
11 / 100
1 ms 300 KB
#include "nice_lines.h"
#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define ALL(x) x.begin(),x.end()
#define SZ(x) (int)x.size()
typedef long long ll;
typedef pair<int,int> ii;
typedef pair<ii,ii> i4;
typedef vector<int> vi;
const int MOD=1000000007;
const int INF=1012345678;
const ll LLINF=1012345678012345678LL;
const double PI=3.1415926536;
const double EPS=1e-14;

typedef long double ld;

void solve(int subtask_id, int N) {
    if(N==1){
		ld s=query(0,1000000);
		ld t=query(0,1000001);
		ld angle=asin(abs(t-s));
		ld absa=1/tan(angle);
		int a=round(absa);
		int b=1000000-round(s/abs(t-s));
		if(query(1,a+b)>EPS)a=-a;
		the_lines_are({a},{b});
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 1 ms 300 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -