結果
| 問題 | No.2628 Shrinkage |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-16 23:28:17 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 672 bytes |
| 記録 | |
| コンパイル時間 | 1,744 ms |
| コンパイル使用メモリ | 167,832 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-09-28 22:18:34 |
| 合計ジャッジ時間 | 2,685 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 WA * 8 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pt pair<int,int>
#define x first
#define y second
__int128 one=1;
int sq(pt a,pt b,pt c)
{
return a.x*b.y+b.x*c.y+c.x*a.y-a.y*b.x-b.y*c.x-c.y*a.x;
}
int dist(pt a,pt b)
{
return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);
}
int32_t main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t;cin>>t;
while(t--)
{
pt a,b,c,d;cin>>a.x>>a.y;cin>>b.x>>b.y;cin>>c.x>>c.y;cin>>d.x>>d.y;
if((a.x-b.x)*(c.y-d.y)==(a.y-b.y)*(c.x-d.x) && dist(a,b)>dist(c,d) && sq(a,c,b)*one*sq(a,c,d)>0) {cout<<"Yes\n";}
else {cout<<"No\n";}
}
return 0;
}