제출 #484369

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4843692021-11-03 03:30:43melon940925Aliens (IOI16_aliens)C++14
0 / 100
0 ms332 KiB
#include<bits/stdc++.h>
#define pii pair<int,int>
#define x first
#define y second
using namespace std;
typedef long long ll;
pii aliens[500001];
ll dp[500001];
ll Q[500001];
ll candidates[500001];
ll numOfArea[500001];
ll front, rear;
ll N, K;
ll cost(ll a, ll b) {
return (aliens[b].x - aliens[a].y) * (aliens[b].x - aliens[a].y);
}
ll func(ll i, ll j) {
return dp[i] + cost(i + 1, j);
}
ll cross(ll i, ll j) {
ll l = j + 1, r = N + 1;
while (l > r) {
ll m = l + r >> 1;
if (func(i, m) <= func(j, m))l = m + 1;
else r = m;
}
return l - 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

aliens.cpp: In function 'll cross(ll, ll)':
aliens.cpp:26:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   26 |   ll m = l + r >> 1;
      |          ~~^~~
aliens.cpp: In function 'll bs(ll, ll)':
aliens.cpp:46:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   46 |  ll mid = l + r >> 1;
      |           ~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...