# AtCoder Grand Contest 018

## Submission #6371339

### Source codeソースコード

```import algorithm, future, macros, math, sequtils, sets, strutils, tables

macro unpack(rhs: seq, cnt: static[int]): auto =
let t = genSym(); result = quote do:(let `t` = `rhs`;())
if NimMinor <= 17:
for i in 0..<cnt: result.add(quote do:`t`[`i`])
else:
for i in 0..<cnt: result.add(quote do:`t`[`i`])

template input(T: typedesc, cnt: Natural = 1): untyped =
when T is int:         line.map(parseInt).unpack(cnt)
elif T is float:       line.map(parseFloat).unpack(cnt)
elif T is string:      line.unpack(cnt)
elif T is char:        line.mapIt(it).unpack(cnt)
elif T is seq[int]:    line.map(parseint)
elif T is seq[float]:  line.map(parseFloat)
elif T is seq[string]: line
elif T is seq[char]:   line.mapIt(it)

proc `%=`(n: var int, m: int)  = n = n mod m
proc `//=`(n: var int, m: int) = n = n div m
proc `<<=`(n: var int, m: int) = n = n shl m
proc `>>=`(n: var int, m: int) = n = n shr m
proc `<?=`(n: var int, m: int) = n = min(n, m)
proc `>?=`(n: var int, m: int) = n = max(n, m)
proc newSeq2[T](n1, n2: Natural): seq[seq[T]] = newSeqWith(n1, newSeq[T](n2))
proc newSeq3[T](n1, n2, n3: Natural): seq[seq[seq[T]]] = newSeqWith(n1, newSeqWith(n2, newSeq[T](n3)))

# -------------------------------------------------- #

var (N, K) = input(int, 2)
var A = @ & input(seq[int]).sorted(cmp)
var allgcd = 0
for i in 1 .. N:
allgcd = gcd(allgcd, A[i])
if K mod allgcd == 0 and K <= max(A):
echo "POSSIBLE"
else:
echo "IMPOSSIBLE"```

### Submission

Task問題 A - Getting Difference nadeshino 2019/07/14 12:28:52 +0000 Nim (0.13.0) AC 300 1559 Byte 70 ms 9612 KB

### Compiler messageコンパイルメッセージ

Hint: system [Processing]
Hint: Main [Processing]
Hint: algorithm [Processing]
Hint: future [Processing]
Hint: macros [Processing]
Hint: math [Processing]
Hint: times [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: sequtils [Processing]
Hint: sets [Processing]
Hint: os [Processing]
Hint: posix [Processing]
Hint: hashes [Processing]
Hint: etcpriv [Processing]
Hint: tables [Processing]
Main.nim(24, 6) Hint: 'Main.>>=(n: var int, m: int)' is declared but not used [XDeclaredButNotUsed]
Main.nim(28, 6) Hint: 'Main.newSeq3(n1: Natural, n2: Natural, n3: Natural)' is declared but not used [XDeclaredButNotUsed]
Main.nim(25, 6) Hint: 'Main.<?=(n: var int, m: int)' is declared but not used [XDeclaredButNotUsed]
Main.nim(23, 6) Hint: 'Main.<<=(n: var int, m: int)' is declared but not used [XDeclaredButNotUsed]
Main.nim(27, 6) Hint: 'Main.newSeq2(n1: Natural, n2: Natural)' is declared but not used [XDeclaredButNotUsed]
Main.nim(26, 6) Hint: 'Main.>?=(n: var int, m: int)' is declared but not us...

### Test case

#### Set

Set name Score得点 / Max score Cases
Sample - sample_01.txt,sample_02.txt,sample_03.txt,sample_04.txt