結果
問題 | No.2845 Birthday Pattern in Two Different Calendars |
ユーザー | E49869826 |
提出日時 | 2024-08-23 23:45:28 |
言語 | Nim (2.0.2) |
結果 |
AC
|
実行時間 | 65 ms / 2,000 ms |
コード長 | 8,599 bytes |
コンパイル時間 | 4,085 ms |
コンパイル使用メモリ | 98,944 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-23 23:45:36 |
合計ジャッジ時間 | 5,814 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 7 ms
6,940 KB |
testcase_02 | AC | 13 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 12 ms
6,944 KB |
testcase_05 | AC | 9 ms
6,940 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 7 ms
6,944 KB |
testcase_08 | AC | 4 ms
6,940 KB |
testcase_09 | AC | 2 ms
6,940 KB |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 4 ms
6,944 KB |
testcase_12 | AC | 12 ms
6,944 KB |
testcase_13 | AC | 2 ms
6,940 KB |
testcase_14 | AC | 1 ms
6,940 KB |
testcase_15 | AC | 3 ms
6,940 KB |
testcase_16 | AC | 3 ms
6,940 KB |
testcase_17 | AC | 4 ms
6,940 KB |
testcase_18 | AC | 7 ms
6,940 KB |
testcase_19 | AC | 12 ms
6,944 KB |
testcase_20 | AC | 6 ms
6,944 KB |
testcase_21 | AC | 14 ms
6,944 KB |
testcase_22 | AC | 65 ms
6,944 KB |
コンパイルメッセージ
check is on optimized for speed
ソースコード
# Please use Nim-ACL import macros; macro ImportExpand(s:untyped):untyped = parseStmt(staticExec("echo " & $s[2] & " | base64 -d | xzcat")) # const OPTIMIZE_SIZE = true ImportExpand "e_lib/templates/prelude.nim" <=== "/Td6WFoAAATm1rRGAgAh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NO = "No" proc `$`(a:bool):string = return if a: YES else: NO # no echo proc solve(K,M,N:int):void = if M == 1: stdout.writeLine(NO); return let M0 = M-1 let g = gcd(M0,K) let te2 = (K div g) shr 1 if g*te2 < N: stdout.writeLine(NO); return var re0 = newSeqUninitialized[int](N) var i0 = 0 block bl1: for i in 0..<g: var te3 = i for j in 0..<te2: re0[i0] = te3+1 i0.inc() if i0 == N: break bl1 for _ in 0..<2: te3 += M0 if te3 >= K: te3 -= K stdout.writeLine(YES) stdout.writeLine(re0.join(" ")) return proc main():void = # Failed to predict input format let T = nextInt() for i in 0..<T: let K, M, N = nextInt() solve(K,M,N) return main()