結果
| 問題 | No.441 和か積 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-18 08:24:12 |
| 言語 | Nim (2.2.6) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 529 bytes |
| 記録 | |
| コンパイル時間 | 2,734 ms |
| コンパイル使用メモリ | 69,568 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-22 01:09:26 |
| 合計ジャッジ時間 | 3,937 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 8) Warning: imported and not used: 'sequtils' [UnusedImport] /home/judge/data/code/Main.nim(1, 54) Warning: imported and not used: 'strformat' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'algorithm' [UnusedImport] /home/judge/data/code/Main.nim(1, 41) Warning: imported and not used: 'sugar' [UnusedImport]
ソースコード
import sequtils,strutils,algorithm,math,sugar,macros,strformat template get*():string = stdin.readLine().strip() macro unpack*(arr: auto,cnt: static[int]): auto = let t = genSym(); result = quote do:(let `t` = `arr`;()) for i in 0..<cnt: result[1].add(quote do:`t`[`i`]) let (a,b) = get().split().unpack(2) # \ 0 1 2 3 # 0 E S S S # 1 \ S S S # 2 \ \ E P # 3 \ \ \ P if a == "0" and b == "0": echo "E" elif a == "2" and b == "2": echo "E" elif a == "0" or b == "0": echo "S" elif a == "1" or b == "1": echo "S" else: echo "P"