結果

問題 No.635 自然門松列
ユーザー pekempeypekempey
提出日時 2018-01-19 21:41:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 555 ms
コンパイル使用メモリ 70,564 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-08-26 00:13:35
合計ジャッジ時間 4,305 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
7,644 KB
testcase_01 AC 54 ms
4,376 KB
testcase_02 AC 451 ms
4,380 KB
testcase_03 AC 317 ms
4,380 KB
testcase_04 WA -
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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");
  }
}
0