結果

問題 No.2628 Shrinkage
ユーザー Yu_212Yu_212
提出日時 2024-02-16 21:33:13
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 723 bytes
コンパイル時間 3,132 ms
コンパイル使用メモリ 244,964 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-02-16 21:33:18
合計ジャッジ時間 4,351 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 3 ms
6,676 KB
testcase_02 AC 3 ms
6,676 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 12 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
testcase_16 AC 3 ms
6,676 KB
testcase_17 AC 2 ms
6,676 KB
testcase_18 AC 5 ms
6,676 KB
testcase_19 AC 2 ms
6,676 KB
testcase_20 AC 3 ms
6,676 KB
testcase_21 WA -
testcase_22 AC 2 ms
6,676 KB
testcase_23 AC 2 ms
6,676 KB
testcase_24 AC 2 ms
6,676 KB
testcase_25 AC 2 ms
6,676 KB
testcase_26 AC 2 ms
6,676 KB
testcase_27 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using i64 = long long;
#define var auto

int main() {
    cin.tie(0)->sync_with_stdio(false);
    int t;
    cin >> t;
    while (t --> 0) {
        ll x1, y1, x2, y2, gx1, gy1, gx2, gy2;
        cin >> x1 >> y1 >> x2 >> y2 >> gx1 >> gy1 >> gx2 >> gy2;
        x1 -= x2;
        y1 -= y2;
        gx1 -= gx2;
        gy1 -= gy2;
        if (x1 < 0) {
            x1 *= -1;
            gx1 *= -1;
        }
        if (y1 < 0) {
            y1 *= -1;
            gy1 *= -1;
        }
        bool ok = x1 * gy1 == y1 * gx1 && 0 <= gx1 && gx1 <= x1 && 0 <= gy1 && gy1 <= y1 && !(gx1 == x1 && gy1 == y1);
        cout << (ok ? "Yes" : "No") << endl;
    }
}
0