結果

問題 No.1142 XOR と XOR
ユーザー yuruhiyayuruhiya
提出日時 2021-03-18 18:41:13
言語 Ruby
(3.3.0)
結果
AC  
実行時間 415 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 19,200 KB
最終ジャッジ日時 2024-04-25 16:49:36
合計ジャッジ時間 11,444 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 290 ms
16,512 KB
testcase_01 AC 290 ms
16,768 KB
testcase_02 AC 287 ms
16,768 KB
testcase_03 AC 412 ms
19,200 KB
testcase_04 AC 384 ms
17,408 KB
testcase_05 AC 368 ms
18,048 KB
testcase_06 AC 391 ms
18,176 KB
testcase_07 AC 405 ms
17,792 KB
testcase_08 AC 413 ms
18,560 KB
testcase_09 AC 414 ms
18,688 KB
testcase_10 AC 415 ms
18,432 KB
testcase_11 AC 289 ms
16,512 KB
testcase_12 AC 291 ms
16,768 KB
testcase_13 AC 290 ms
16,768 KB
testcase_14 AC 357 ms
17,920 KB
testcase_15 AC 353 ms
17,920 KB
testcase_16 AC 293 ms
17,024 KB
testcase_17 AC 381 ms
16,896 KB
testcase_18 AC 305 ms
17,024 KB
testcase_19 AC 388 ms
18,176 KB
testcase_20 AC 355 ms
17,920 KB
testcase_21 AC 329 ms
17,536 KB
testcase_22 AC 311 ms
17,408 KB
testcase_23 AC 385 ms
18,176 KB
testcase_24 AC 393 ms
18,304 KB
testcase_25 AC 352 ms
17,664 KB
testcase_26 AC 385 ms
18,304 KB
testcase_27 AC 371 ms
17,920 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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