結果

問題 No.2710 How many more?
ユーザー 👑 p-adicp-adic
提出日時 2024-04-04 22:07:55
言語 cLay
(20240104-1)
結果
AC  
実行時間 279 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 3,750 ms
コンパイル使用メモリ 182,596 KB
実行使用メモリ 19,584 KB
最終ジャッジ日時 2024-04-04 22:08:04
合計ジャッジ時間 7,190 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 1 ms
6,676 KB
testcase_02 AC 181 ms
14,080 KB
testcase_03 AC 130 ms
13,568 KB
testcase_04 AC 123 ms
17,152 KB
testcase_05 AC 65 ms
10,752 KB
testcase_06 AC 111 ms
15,360 KB
testcase_07 AC 20 ms
6,676 KB
testcase_08 AC 35 ms
7,296 KB
testcase_09 AC 166 ms
15,872 KB
testcase_10 AC 78 ms
10,496 KB
testcase_11 AC 103 ms
10,240 KB
testcase_12 AC 227 ms
18,176 KB
testcase_13 AC 248 ms
19,584 KB
testcase_14 AC 247 ms
19,584 KB
testcase_15 AC 245 ms
19,584 KB
testcase_16 AC 279 ms
19,584 KB
testcase_17 AC 249 ms
19,584 KB
testcase_18 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@N,@Q,@A[N],@--(x,y)[Q],s=0;map<ll,ll>c,d;rep(n,N)c[A[n]]++;d=c;auto i=c.begin(),e=c.end(),j=d.begin();while(i!=e)j->second=s,s=i->second+=s,i++,j++;rep(q,Q)wt(max(0,d[A[x[q]]]-c[A[y[q]]]));
0