# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
397072 | Nicholas_Patrick | Sure Bet (CEOI17_sure) | C++17 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <queue>
#include <cmath>
#include <set>
using namespace std;
struct point{
long long x, y;
point(long long x=0, long long y=0):x(x), y(y){}
bool operator<(point rhs)const{
if(x!=rhs.x)return x<rhs.x;
return y<rhs.y;
}
};
int main(){
int n;
scanf("%d", &n);
if(n>10)return 0;
set<point> candy;
candy.emplace();
vector<point> p(n);
long long ans=0;
for(auto& i: p){
float x, y;
scanf("%f%f", &x, &y), x-=1, y-=1;
i=point(round(x*10000), round(y*10000));
auto candycopy=candy;
for(auto j: candycopy){
ans=max(ans, min(j.x-10000, j.y+i.y));
candy.emplace(j.x-10000, j.y+i.y);
ans=max(ans, min(j.x+i.x, j.y-10000));
candy.emplace(j.x+i.x, j.y-10000);
}
}
printf("%.4lf\n", ans/10000.0);
}
컴파일 시 표준 에러 (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... |