# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
426282 | Amylopectin | Lightning Rod (NOI18_lightningrod) | C++14 | 2078 ms | 77412 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
#include <bits/stdc++.h>
using namespace std;
const int mxn = 2e7 + 10;
struct we
{
int xx,yy;
};
struct we a[mxn] = {};
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int i,j,n,m,ru = -1,cx,cy;
cin >> n;
// scanf("%d",&n);
for(i=0; i<n; i++)
{
cin >> cx >> cy;
// scanf("%d %d",&cx,&cy);
while(ru >= 0 && cx - a[ru].xx <= cy - a[ru].yy)
{
ru --;
}
if(ru == -1 || cx - a[ru].xx > a[ru].yy - cy)
{
ru ++;
a[ru] = {cx,cy};
}
}
cout << ru + 1 << "\n";
// printf("%d\n",ru + 1);
return 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... |
# | 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... |