結果

問題 No.635 自然門松列
ユーザー pekempeypekempey
提出日時 2018-01-19 21:41:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 581 ms
コンパイル使用メモリ 71,032 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-06 19:08:27
合計ジャッジ時間 24,020 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
5,248 KB
testcase_01 AC 22 ms
5,376 KB
testcase_02 AC 215 ms
5,376 KB
testcase_03 AC 121 ms
5,376 KB
testcase_04 WA -
testcase_05 TLE -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 AC 215 ms
5,376 KB
testcase_09 AC 219 ms
5,376 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
testcase_13 TLE -
testcase_14 TLE -
testcase_15 WA -
testcase_16 AC 23 ms
6,944 KB
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
権限があれば一括ダウンロードができます

ソースコード

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