# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
567002 | Bill_00 | 밀림 점프 (APIO21_jumps) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "hexagon.h"
#include <bits/stdc++.h>
#include <vector>
typedef long long ll;
const ll MOD = 1000000007;
const ll low = -1000000000;
using namespace std;
ll area, bound, x, y;
int draw_territory(int N, int A, int B, vector<int> D, vector<int> L){
if(B == 0){
for(int i = 0; i < N; i++){
bound += L[i];
if(D[i] == 1){
y += L[i];
}
if(D[i] == 2){
area += (2 * (y - low) * L[i]);
x += L[i];
}
if(D[i] == 3){
area += ((2 * (y - low) - L[i]) * L[i]);
x += L[i];
y -= L[i];
}
if(D[i] == 4){
y -= L[i];
}
if(D[i] == 5){
area -= (2 * (y - low) * L[i]);
x -= L[i];
}
if(D[i] == 6){
area -= ((2 * (y - low) + L[i]) * L[i]);
x -= L[i];
y += L[i];
}
}
if(bound != (3 * L[0])) while(1);
ll inter = (area + 2 - bound) / 2;
return (inter + bound) * (ll)(A);
}
return 0;
}