Codeforces Round #604 DIV1 A問題 (500pt)
Codeforces Round #604 DIV2 C問題 (1500pt)
Problem description
省略
省略
C++に変換後のコードはこちら
//no-unlocked
int N, A[4d5];
int sz, num[4d5];
{
int i, G, S, B;
REP(rd_int()){
rd(N,A(N));
sz = runLength(N, A, NULL, num);
i = G = S = B = 0;
G = num[i++];
while(i < sz && S <= G) S += num[i++];
while(i < sz && G + S + B + num[i] <= N/2) B += num[i++];
if(!(G < S && G < B && G+S+B <= N/2)) G = S = B = 0;
wt(G,S,B);
}
}
Current time: 2024年03月29日18時33分46秒
Last modified: 2020年02月29日16時16分46秒 (by laycrs)
Tags: Competitive_Programming_Incomplete Codeforces CF604 CF_Div1_A CF_Div2_C
トップページに戻る
Logged in as: unknown user (not login)