結果

問題 No.2178 Payable Magic Items
ユーザー tailstails
提出日時 2023-01-06 22:29:29
言語 cLay
(20240104-1)
結果
AC  
実行時間 30 ms / 4,000 ms
コード長 281 bytes
コンパイル時間 2,410 ms
コンパイル使用メモリ 176,888 KB
実行使用メモリ 12,352 KB
最終ジャッジ日時 2024-05-08 13:36:40
合計ジャッジ時間 3,933 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
12,352 KB
testcase_01 AC 8 ms
7,936 KB
testcase_02 AC 8 ms
10,176 KB
testcase_03 AC 9 ms
10,180 KB
testcase_04 AC 8 ms
10,180 KB
testcase_05 AC 8 ms
8,064 KB
testcase_06 AC 9 ms
8,064 KB
testcase_07 AC 9 ms
10,056 KB
testcase_08 AC 8 ms
8,064 KB
testcase_09 AC 8 ms
8,064 KB
testcase_10 AC 8 ms
8,064 KB
testcase_11 AC 27 ms
9,088 KB
testcase_12 AC 26 ms
10,440 KB
testcase_13 AC 27 ms
10,436 KB
testcase_14 AC 26 ms
10,312 KB
testcase_15 AC 30 ms
10,308 KB
testcase_16 AC 29 ms
9,088 KB
testcase_17 AC 15 ms
10,692 KB
testcase_18 AC 8 ms
8,064 KB
testcase_19 AC 12 ms
10,432 KB
testcase_20 AC 9 ms
8,064 KB
testcase_21 AC 8 ms
10,056 KB
testcase_22 AC 9 ms
10,184 KB
testcase_23 AC 8 ms
10,180 KB
testcase_24 AC 22 ms
8,960 KB
testcase_25 AC 11 ms
10,184 KB
testcase_26 AC 13 ms
8,576 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