結果
問題 | No.183 たのしい排他的論理和(EASY) |
ユーザー | 👑 tatt61880 |
提出日時 | 2021-03-28 22:24:36 |
言語 | Kuin (KuinC++ v.2021.9.17) |
結果 |
AC
|
実行時間 | 272 ms / 5,000 ms |
コード長 | 468 bytes |
コンパイル時間 | 2,228 ms |
コンパイル使用メモリ | 150,532 KB |
実行使用メモリ | 4,356 KB |
最終ジャッジ日時 | 2023-10-14 18:10:04 |
合計ジャッジ時間 | 5,093 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,356 KB |
testcase_01 | AC | 2 ms
4,352 KB |
testcase_02 | AC | 2 ms
4,348 KB |
testcase_03 | AC | 3 ms
4,348 KB |
testcase_04 | AC | 2 ms
4,348 KB |
testcase_05 | AC | 3 ms
4,348 KB |
testcase_06 | AC | 2 ms
4,352 KB |
testcase_07 | AC | 272 ms
4,352 KB |
testcase_08 | AC | 225 ms
4,352 KB |
testcase_09 | AC | 154 ms
4,352 KB |
testcase_10 | AC | 186 ms
4,348 KB |
testcase_11 | AC | 246 ms
4,352 KB |
testcase_12 | AC | 3 ms
4,352 KB |
testcase_13 | AC | 2 ms
4,348 KB |
testcase_14 | AC | 189 ms
4,352 KB |
testcase_15 | AC | 253 ms
4,352 KB |
testcase_16 | AC | 3 ms
4,352 KB |
testcase_17 | AC | 58 ms
4,352 KB |
testcase_18 | AC | 244 ms
4,348 KB |
testcase_19 | AC | 29 ms
4,348 KB |
ソースコード
func main() var n: int :: cui@inputInt() var a: []int :: #[n]int for i(0, n - 1) do a[i] :: cui@inputInt() end for const max: int :: 16384 * 2 - 1 var dp: []bool :: #[max + 1]bool do dp[0] :: true for i(0, n - 1) var x: bit64 :: a[i] $ bit64 for j(0, max) if(dp[j]) do dp[x.xor(j $ bit64) $ int] :: true end if end for end for var ans: int :: 0 for i(0, max) if(dp[i]) do ans :+ 1 end if end for do cui@print("\{ans}\n") end func