結果
| 問題 | No.228 ゆきこちゃんの 15 パズル |
| コンテスト | |
| ユーザー |
mencotton
|
| 提出日時 | 2020-11-02 22:54:30 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 445 bytes |
| 記録 | |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 87,380 KB |
| 実行使用メモリ | 9,800 KB |
| 最終ジャッジ日時 | 2026-08-23 04:10:11 |
| 合計ジャッジ時間 | 1,947 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 8 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using ll = long long;
int main() {
bool ret = true;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
int x;
cin >> x;
if (x == 0)x += 16;
x--;
if (abs(i - (x / 4)) + abs(j - (x % 4)) > 1) ret = false;
}
}
cout << (ret ? "Yes" : "No") << endl;
return 0;
}
mencotton