結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 304 ms
16,640 KB
testcase_01 AC 303 ms
16,512 KB
testcase_02 AC 303 ms
16,512 KB
testcase_03 AC 513 ms
50,304 KB
testcase_04 AC 472 ms
44,672 KB
testcase_05 AC 423 ms
40,320 KB
testcase_06 AC 477 ms
45,184 KB
testcase_07 AC 504 ms
49,664 KB
testcase_08 AC 511 ms
50,048 KB
testcase_09 AC 507 ms
50,048 KB
testcase_10 AC 508 ms
50,048 KB
testcase_11 AC 301 ms
16,512 KB
testcase_12 AC 299 ms
16,512 KB
testcase_13 AC 302 ms
16,768 KB
testcase_14 AC 405 ms
37,248 KB
testcase_15 AC 399 ms
36,864 KB
testcase_16 AC 307 ms
23,168 KB
testcase_17 AC 438 ms
42,624 KB
testcase_18 AC 335 ms
26,752 KB
testcase_19 AC 474 ms
45,056 KB
testcase_20 AC 401 ms
36,864 KB
testcase_21 AC 364 ms
31,104 KB
testcase_22 AC 343 ms
27,136 KB
testcase_23 AC 441 ms
41,728 KB
testcase_24 AC 483 ms
46,208 KB
testcase_25 AC 400 ms
36,224 KB
testcase_26 AC 477 ms
45,184 KB
testcase_27 AC 421 ms
40,192 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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