結果
| 問題 |
No.635 自然門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-19 21:41:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 600 bytes |
| コンパイル時間 | 628 ms |
| コンパイル使用メモリ | 70,180 KB |
| 実行使用メモリ | 17,096 KB |
| 最終ジャッジ日時 | 2024-12-24 12:29:02 |
| 合計ジャッジ時間 | 27,518 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 2 TLE * 15 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool is_kadomatsu(int x, int y, int z) {
return x != y && x != z && y != z && (x < y && y > z || x > y && y < z);
}
int main() {
int T;
cin >> T;
while (T--) {
int x[3];
int y[3];
for (int i = 0; i < 3; i++) cin >> x[i], x[i] *= 2000;
for (int i = 0; i < 3; i++) cin >> y[i];
bool ok = false;
for (int ii = 0; ii < 2000 * 2000; ii++) {
ok |= is_kadomatsu(x[0], x[1], x[2]);
x[0] += y[0];
x[1] += y[1];
x[2] += y[2];
}
puts(ok ? "YES" : "NO");
}
}