結果

問題 No.2178 Payable Magic Items
ユーザー tailstails
提出日時 2023-01-06 22:29:29
言語 cLay
(20240104-1)
結果
AC  
実行時間 24 ms / 4,000 ms
コード長 281 bytes
コンパイル時間 2,734 ms
コンパイル使用メモリ 163,812 KB
実行使用メモリ 9,200 KB
最終ジャッジ日時 2023-08-21 08:19:30
合計ジャッジ時間 4,353 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
6,900 KB
testcase_01 AC 5 ms
6,616 KB
testcase_02 AC 5 ms
6,668 KB
testcase_03 AC 5 ms
7,572 KB
testcase_04 AC 5 ms
7,308 KB
testcase_05 AC 5 ms
7,652 KB
testcase_06 AC 5 ms
6,796 KB
testcase_07 AC 5 ms
6,672 KB
testcase_08 AC 6 ms
7,012 KB
testcase_09 AC 5 ms
6,492 KB
testcase_10 AC 5 ms
6,636 KB
testcase_11 AC 23 ms
9,200 KB
testcase_12 AC 20 ms
8,984 KB
testcase_13 AC 23 ms
9,056 KB
testcase_14 AC 22 ms
8,968 KB
testcase_15 AC 24 ms
9,072 KB
testcase_16 AC 23 ms
8,956 KB
testcase_17 AC 10 ms
7,544 KB
testcase_18 AC 5 ms
6,648 KB
testcase_19 AC 8 ms
7,112 KB
testcase_20 AC 5 ms
6,688 KB
testcase_21 AC 5 ms
6,436 KB
testcase_22 AC 5 ms
6,456 KB
testcase_23 AC 5 ms
6,884 KB
testcase_24 AC 16 ms
8,704 KB
testcase_25 AC 7 ms
6,820 KB
testcase_26 AC 9 ms
7,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll d[390625]{};
ll es[2d5];
ll@n,@k;
rep(i,n){
	ll e=0;
	string@s;
	rep(j,k){
		e=e*5+(s[j]-'0');
	}
	es[i]=e;
	d[e]=1;
}
ll m=1;
rep(o,8){
	rrep(i,5**7/m){
		rrep(j,m*4){
			d[i*m*5+j]+=d[i*m*5+j+m];
		}
	}
	m*=5;
}
ll z=0;
rep(i,n){
	ll e=es[i];
	if(d[e]>1){
		z+=1;
	}
}
wt(z);
0