省略
省略
C++に変換後のコードはこちら
int N, A[9], B[9];
{
int mx = -1, res = 0, score, ind[9];
rd(N,A(N),B(N));
rep_perm(ind,N){
score = 0;
rep(i,N) score += max(A[ind[i]] - B[i], 0);
if(mx < score) mx = score, res = 0;
if(mx == score) res++;
}
wt(res);
}
Current time: 2024年05月04日19時03分05秒
Last modified: 2020年11月15日09時59分26秒 (by laycrs)
Tags: Competitive_Programming_Incomplete yukicoder
トップページに戻る
Logged in as: unknown user (not login)