AtCoder Beginner Contest 047
問題文
省略
省略
C++に変換後のコードはこちら
int W, H, N, X[100], Y[100], A[100];
{
int x1, x2, y1, y2, res;
rd(W,H,N,(X,Y,A)(N));
x1 = y1 = 0;
x2 = W;
y2 = H;
rep(i,N){
if(A[i]==1) x1 >?= X[i];
if(A[i]==2) x2 <?= X[i];
if(A[i]==3) y1 >?= Y[i];
if(A[i]==4) y2 <?= Y[i];
}
res = (x2 - x1) * (y2 - y1);
if(x1 > x2 || y1 > y2) res = 0;
wt(res);
}
Current time: 2024年04月20日16時51分05秒
Last modified: 2019年08月26日08時58分30秒 (by laycrs)
Tags: Competitive_Programming_Incomplete AtCoder AtCoder_Beginner_Contest ABC047 ABC_B
トップページに戻る
Logged in as: unknown user (not login)