結果
問題 | No.670 log は定数 |
ユーザー | 6soukiti29 |
提出日時 | 2018-03-24 01:00:25 |
言語 | Nim (2.0.2) |
結果 |
TLE
|
実行時間 | - |
コード長 | 593 bytes |
コンパイル時間 | 3,382 ms |
コンパイル使用メモリ | 68,664 KB |
実行使用メモリ | 14,044 KB |
最終ジャッジ日時 | 2023-09-12 17:40:19 |
合計ジャッジ時間 | 14,033 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | TLE | - |
testcase_01 | -- | - |
testcase_02 | -- | - |
testcase_03 | -- | - |
testcase_04 | -- | - |
testcase_05 | -- | - |
testcase_06 | -- | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
ソースコード
import sequtils,strutils,algorithm var N,Q,seed2,a : int seed : uint64 (N, Q, seed2) = stdin.readline.split.map(parseInt) seed = seed2.uint64 proc next():uint64 = seed = seed and ((1 shl 51) - 1) seed = (seed xor (seed shl 13)) seed = (seed xor (seed shr 7)) seed = (seed xor (seed shl 17)) return (seed shr 33) for i in 1..10000: discard next() var A = newSeq[uint64](N) x : uint64 cnt,ans : int64 for i in 0..<N: A[i] = next() A.sort(system.cmp) for i in 0..<Q: x = next() cnt = A.lowerBound(x) ans = (ans xor (cnt * i)) echo ans