結果

問題 No.2628 Shrinkage
ユーザー cho435cho435
提出日時 2024-02-17 00:47:19
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 646 bytes
コンパイル時間 4,816 ms
コンパイル使用メモリ 263,088 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-02-17 00:47:26
合計ジャッジ時間 5,511 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint998244353;

void solve(){
	vector<int> bfx(2),bfy(2),afx(2),afy(2);
	cin>>bfx.at(0)>>bfy.at(0)>>bfx.at(1)>>bfy.at(1)>>afx.at(0)>>afy.at(0)>>afx.at(1)>>afy.at(1);
	if(bfx==afx&&bfy==afy){
		cout<<"Yes\n";
		return;
	}
	ll dx1=bfx.at(0)-bfx.at(1),dx2=afx.at(0)-afx.at(1),dy1=bfy.at(0)-bfy.at(1),dy2=afy.at(0)-afy.at(1);
	if(dy1*dx2==dy2*dx1&&dx1*dx2>0&&dx1*dx1+dy1*dy1>dx2*dx2+dy2*dy2){
		cout<<"Yes\n";
	}else{
		cout<<"No\n";
	}
}

int main(){
	int t;
	cin>>t;
	rep(i,t) solve();
}
0