結果

問題 No.1714 Tag on Grid
ユーザー 👑 箱星箱星
提出日時 2021-10-22 21:27:23
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 1,012 bytes
コンパイル時間 13,077 ms
コンパイル使用メモリ 436,004 KB
実行使用メモリ 53,832 KB
最終ジャッジ日時 2023-10-24 12:18:34
合計ジャッジ時間 21,334 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
53,824 KB
testcase_01 AC 279 ms
53,820 KB
testcase_02 AC 279 ms
53,816 KB
testcase_03 AC 282 ms
53,820 KB
testcase_04 AC 284 ms
53,820 KB
testcase_05 AC 288 ms
53,832 KB
testcase_06 AC 283 ms
53,832 KB
testcase_07 AC 283 ms
53,820 KB
testcase_08 AC 283 ms
53,824 KB
testcase_09 AC 285 ms
53,820 KB
testcase_10 AC 289 ms
53,816 KB
testcase_11 AC 291 ms
53,820 KB
testcase_12 AC 287 ms
53,820 KB
testcase_13 AC 285 ms
53,820 KB
testcase_14 AC 282 ms
53,820 KB
testcase_15 AC 279 ms
53,812 KB
testcase_16 AC 282 ms
53,816 KB
testcase_17 AC 289 ms
53,824 KB
testcase_18 AC 290 ms
53,824 KB
testcase_19 AC 282 ms
53,820 KB
testcase_20 AC 277 ms
53,816 KB
testcase_21 AC 277 ms
53,812 KB
testcase_22 AC 281 ms
53,824 KB
testcase_23 AC 282 ms
53,828 KB
testcase_24 AC 281 ms
53,824 KB
testcase_25 AC 295 ms
53,828 KB
testcase_26 AC 280 ms
53,828 KB
testcase_27 AC 290 ms
53,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:9: warning: variable 'h' is never used
    val h = nextInt()
        ^
Main.kt:7:9: warning: variable 'w' is never used
    val w = nextInt()
        ^

ソースコード

diff #

import java.io.PrintWriter
import java.util.*
import kotlin.math.*

fun PrintWriter.solve() {
    val h = nextInt()
    val w = nextInt()
    val ni = nextInt()
    val nj = nextInt()
    val zi = nextInt()
    val zj = nextInt()
    if ((ni + nj) % 2 == (zi + zj) % 2) {
        println("No")
    } else {
        println("Yes")
    }
}

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
0