結果

問題 No.1142 XOR と XOR
ユーザー yuruhiyayuruhiya
提出日時 2021-03-17 15:15:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 502 ms / 2,000 ms
コード長 199 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 50,304 KB
最終ジャッジ日時 2024-04-25 16:48:15
合計ジャッジ時間 12,745 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 288 ms
16,512 KB
testcase_01 AC 296 ms
16,640 KB
testcase_02 AC 289 ms
16,512 KB
testcase_03 AC 499 ms
50,304 KB
testcase_04 AC 465 ms
44,416 KB
testcase_05 AC 411 ms
40,576 KB
testcase_06 AC 467 ms
45,184 KB
testcase_07 AC 493 ms
49,920 KB
testcase_08 AC 500 ms
50,176 KB
testcase_09 AC 495 ms
50,304 KB
testcase_10 AC 502 ms
50,048 KB
testcase_11 AC 293 ms
16,512 KB
testcase_12 AC 291 ms
16,768 KB
testcase_13 AC 290 ms
16,512 KB
testcase_14 AC 396 ms
36,992 KB
testcase_15 AC 393 ms
36,992 KB
testcase_16 AC 301 ms
23,424 KB
testcase_17 AC 430 ms
42,752 KB
testcase_18 AC 326 ms
26,624 KB
testcase_19 AC 466 ms
45,312 KB
testcase_20 AC 397 ms
36,992 KB
testcase_21 AC 355 ms
31,360 KB
testcase_22 AC 330 ms
27,008 KB
testcase_23 AC 436 ms
41,856 KB
testcase_24 AC 473 ms
46,336 KB
testcase_25 AC 393 ms
36,224 KB
testcase_26 AC 463 ms
45,056 KB
testcase_27 AC 414 ms
40,448 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

k,x,y=$<.map{_1.split.map &:to_i}
x,y=[x,y].map{|a|c=1,*t=[x=0]*M=1024
a.map{c[x^=_1]+=1}
i=0;c.map{|d|i<M&&(0...i).map{t[_1^i]+=d*c[_1]};i+=1;t[0]+=d*~-d/2}
t}
i=-1;p x.sum{_1*y[k[2]^i+=1]}.%10**9+7
0