結果
| 問題 |
No.85 TVザッピング(1)
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 22:05:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 367 bytes |
| コンパイル時間 | 204 ms |
| コンパイル使用メモリ | 82,600 KB |
| 実行使用メモリ | 53,568 KB |
| 最終ジャッジ日時 | 2025-04-15 22:06:57 |
| 合計ジャッジ時間 | 2,032 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 11 |
ソースコード
n, m, c = map(int, input().split())
x = (c - 1) // m + 1
y = (c - 1) % m + 1
is_corner = (x == 1 or x == n) and (y == 1 or y == m)
if n == 1 or m == 1:
print("YES")
elif n == 2 and m == 2:
print("NO")
else:
if is_corner:
if n % 2 == 1 and m % 2 == 1:
print("NO")
else:
print("YES")
else:
print("YES")
lam6er