結果
問題 | No.1941 CHECKER×CHECKER(1) |
ユーザー | 👑 箱 |
提出日時 | 2022-05-20 21:36:42 |
言語 | Kotlin (1.9.23) |
結果 |
AC
|
実行時間 | 290 ms / 2,000 ms |
コード長 | 1,038 bytes |
コンパイル時間 | 12,257 ms |
コンパイル使用メモリ | 438,240 KB |
実行使用メモリ | 53,904 KB |
最終ジャッジ日時 | 2023-10-20 11:58:27 |
合計ジャッジ時間 | 17,804 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 283 ms
53,892 KB |
testcase_01 | AC | 285 ms
53,872 KB |
testcase_02 | AC | 290 ms
53,888 KB |
testcase_03 | AC | 284 ms
53,892 KB |
testcase_04 | AC | 284 ms
53,892 KB |
testcase_05 | AC | 289 ms
53,880 KB |
testcase_06 | AC | 286 ms
53,904 KB |
testcase_07 | AC | 280 ms
53,892 KB |
testcase_08 | AC | 278 ms
53,880 KB |
testcase_09 | AC | 280 ms
53,884 KB |
testcase_10 | AC | 279 ms
53,888 KB |
testcase_11 | AC | 281 ms
53,888 KB |
testcase_12 | AC | 279 ms
53,880 KB |
testcase_13 | AC | 285 ms
53,884 KB |
testcase_14 | AC | 281 ms
53,884 KB |
ソースコード
import java.io.PrintWriter import java.util.* import kotlin.math.* fun PrintWriter.solve() { val grid = Array(3) { nextLine() } val s1 = "#.#" val s2 = ".#." if ((grid[0] == s1 && grid[1] == s2 && grid[2] == s1) || (grid[0] == s2 && grid[1] == s1 && grid[2] == s2) ) { println("Yes") } else { println("No") } } fun main() { Thread(null, { val writer = PrintWriter(System.out, false) writer.solve() writer.flush() }, "solve", abs(1L.shl(26))) .apply { setUncaughtExceptionHandler { _, e -> e.printStackTrace(); kotlin.system.exitProcess(1) } } .apply { start() }.join() } // region Scanner private var st = StringTokenizer("") private val br = System.`in`.bufferedReader() fun next(): String { while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine()) return st.nextToken() } fun nextInt() = next().toInt() fun nextLong() = next().toLong() fun nextLine() = br.readLine() fun nextDouble() = next().toDouble() // endregion