結果

問題 No.1456 Range Xor
ユーザー fukafukatanifukafukatani
提出日時 2021-06-23 21:23:27
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 1,610 ms / 2,000 ms
コード長 411 bytes
コンパイル時間 12,170 ms
コンパイル使用メモリ 257,816 KB
実行使用メモリ 80,328 KB
最終ジャッジ日時 2023-10-24 06:26:11
合計ジャッジ時間 86,338 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 964 ms
65,952 KB
testcase_01 AC 961 ms
65,908 KB
testcase_02 AC 951 ms
65,972 KB
testcase_03 AC 1,567 ms
79,196 KB
testcase_04 AC 1,605 ms
79,952 KB
testcase_05 AC 1,563 ms
77,724 KB
testcase_06 AC 1,595 ms
77,804 KB
testcase_07 AC 1,537 ms
77,648 KB
testcase_08 AC 1,566 ms
80,056 KB
testcase_09 AC 1,583 ms
80,120 KB
testcase_10 AC 1,603 ms
80,328 KB
testcase_11 AC 1,315 ms
74,812 KB
testcase_12 AC 1,256 ms
74,532 KB
testcase_13 AC 1,402 ms
74,460 KB
testcase_14 AC 1,375 ms
75,468 KB
testcase_15 AC 1,513 ms
77,296 KB
testcase_16 AC 1,514 ms
77,812 KB
testcase_17 AC 1,417 ms
77,028 KB
testcase_18 AC 1,372 ms
75,088 KB
testcase_19 AC 1,497 ms
77,276 KB
testcase_20 AC 1,516 ms
77,872 KB
testcase_21 AC 1,452 ms
73,820 KB
testcase_22 AC 1,479 ms
75,512 KB
testcase_23 AC 1,390 ms
75,036 KB
testcase_24 AC 1,325 ms
74,364 KB
testcase_25 AC 1,374 ms
75,380 KB
testcase_26 AC 1,456 ms
77,068 KB
testcase_27 AC 1,499 ms
77,592 KB
testcase_28 AC 1,402 ms
73,968 KB
testcase_29 AC 1,557 ms
77,620 KB
testcase_30 AC 1,559 ms
79,412 KB
testcase_31 AC 1,367 ms
75,176 KB
testcase_32 AC 1,345 ms
74,148 KB
testcase_33 AC 1,582 ms
74,664 KB
testcase_34 AC 1,610 ms
75,908 KB
testcase_35 AC 1,457 ms
75,576 KB
testcase_36 AC 1,560 ms
75,584 KB
testcase_37 AC 1,571 ms
79,112 KB
testcase_38 AC 1,339 ms
74,600 KB
testcase_39 AC 1,526 ms
78,168 KB
testcase_40 AC 1,550 ms
79,216 KB
testcase_41 AC 1,119 ms
66,564 KB
testcase_42 AC 1,329 ms
71,376 KB
testcase_43 AC 988 ms
65,972 KB
testcase_44 AC 980 ms
65,976 KB
testcase_45 AC 990 ms
65,936 KB
testcase_46 AC 973 ms
65,996 KB
testcase_47 AC 956 ms
65,980 KB
testcase_48 AC 965 ms
65,996 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val n, k = sc.nextLong
  val a = Array.fill(n.toInt )(sc.nextInt)
  var cur = 0;
  var found = collection.mutable.HashSet(0l)
  for (i <- 0 until n.toInt) {
    cur = cur ^ a(i)
    found += cur
  }
  found.find(elem => found.contains(elem ^ k)) match {
    case Some(x) => println("Yes")
    case _ => println("No")
  }
}
0