結果

問題 No.1142 XOR と XOR
ユーザー tailstails
提出日時 2020-07-31 22:47:40
言語 cLay
(20240104-1)
結果
AC  
実行時間 373 ms / 2,000 ms
コード長 367 bytes
コンパイル時間 2,820 ms
コンパイル使用メモリ 176,628 KB
実行使用メモリ 7,104 KB
最終ジャッジ日時 2024-04-25 16:27:27
合計ジャッジ時間 9,625 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 362 ms
6,944 KB
testcase_04 AC 287 ms
6,940 KB
testcase_05 AC 243 ms
6,940 KB
testcase_06 AC 294 ms
6,948 KB
testcase_07 AC 364 ms
6,940 KB
testcase_08 AC 373 ms
6,940 KB
testcase_09 AC 356 ms
6,944 KB
testcase_10 AC 366 ms
7,004 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 192 ms
6,940 KB
testcase_15 AC 186 ms
6,944 KB
testcase_16 AC 17 ms
6,940 KB
testcase_17 AC 270 ms
6,944 KB
testcase_18 AC 62 ms
6,944 KB
testcase_19 AC 298 ms
6,944 KB
testcase_20 AC 189 ms
6,940 KB
testcase_21 AC 112 ms
6,940 KB
testcase_22 AC 64 ms
6,944 KB
testcase_23 AC 267 ms
7,004 KB
testcase_24 AC 315 ms
6,944 KB
testcase_25 AC 185 ms
6,940 KB
testcase_26 AC 295 ms
7,104 KB
testcase_27 AC 233 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int n,m,k,a[2d5],b[2d5];
Mint as[1024],bs[1024],c0[1024],c1[1024];
Mint r;
{
	rd(n,m,k,a(n),b(m));
	rep(j,1024)c0[j]=0;
	rep(i,n){
		rep(j,1024)c1[j]=c0[j^a[i]];
		c1[a[i]]+=1;
		rep(j,1024)as[j]+=c0[j]=c1[j];
	}
	rep(j,1024)c0[j]=0;
	rep(i,m){
		rep(j,1024)c1[j]=c0[j^b[i]];
		c1[b[i]]+=1;
		rep(j,1024)bs[j]+=c0[j]=c1[j];
	}
	rep(j,1024)r+=as[j]*bs[j^k];
	wt(r);
}
0