Codeforces Round #600 DIV2 A問題 (500pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, A[1d5], B[1d5];
{
int x, y;
REP(rd_int()){
rd(N,A(N),B(N));
rep(i,N) A[i] = B[i] - A[i];
x = 0;
y = N-1;
while(x <= y && A[x]==0) x++;
while(x <= y && A[y]==0) y--;
rep(i,x,y+1) if(A[i]!=A[x] || A[i]<0) wt("NO"), break_continue;
wt("YES");
}
}
Current time: 2024年04月19日08時58分47秒
Last modified: 2019年11月23日18時49分45秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF600 CF_Div2_A
トップページに戻る
Logged in as: unknown user (not login)