Submission #5832824


Source Code Expand

import scala.io.{StdIn => in}

object Main extends App {
  val Array(h, w) = in.readLine.split(" ").map(_.toInt)
  val table = Iterator.continually(in.readLine)
    .take(h)
    .map(_.split(" "))
    .toArray

  val res = for {
    i <- 0 until h
    j <- 0 until w
    if table(i)(j) == "snuke"
  } yield (i, j)

  val ans = "" + (res.head._2 + 'A').toChar + (res.head._1 + 1)
  println(ans)
}

Submission Info

Submission Time
Task A - Where's Snuke?
User un_kk
Language Scala (2.11.7)
Score 100
Code Size 412 Byte
Status AC
Exec Time 344 ms
Memory 25552 KB

Judge Result

Set Name sample all
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 11
Set Name Test Cases
sample sample-01.txt, sample-02.txt
all sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, sample-01.txt, sample-02.txt
Case Name Status Exec Time Memory
01-01.txt AC 344 ms 25552 KB
01-02.txt AC 324 ms 25280 KB
01-03.txt AC 322 ms 25272 KB
01-04.txt AC 323 ms 23620 KB
01-05.txt AC 328 ms 25284 KB
01-06.txt AC 326 ms 25408 KB
01-07.txt AC 326 ms 25376 KB
sample-01.txt AC 328 ms 25424 KB
sample-02.txt AC 328 ms 25400 KB