結果
| 問題 |
No.3005 トレミーの問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-17 22:05:30 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 913 bytes |
| コンパイル時間 | 5,607 ms |
| コンパイル使用メモリ | 331,900 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-17 22:05:57 |
| 合計ジャッジ時間 | 6,593 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using mint = atcoder::static_modint<998244353>;
//using mint = atcoder::static_modint<1000000007>;
using namespace std;
using namespace atcoder;
using ld = long double;
using ll = long long;
#define mp(a,b) make_pair(a,b)
#define rep(i,s,n) for(int i=s; i<n; i++)
const vector<int> dx{1,0,-1,0},dy{0,1,0,-1};
ll inner(pair<ll,ll>x,pair<ll,ll>y,pair<ll,ll>z){
return (x.first-z.first)*(y.first-z.first)+(x.second-z.second)*(y.second-z.second);
}
ll d(pair<ll,ll>x,pair<ll,ll>y){
return (x.first-y.first)*(x.first-y.first)+(x.second-y.second)*(x.second-y.second);
}
int main(){
vector<pair<ll,ll>> A(4);
for(auto&[x,y]:A)cin >> x >> y;
ll l=inner(A[0],A[1],A[2]);
ll r=inner(A[0],A[1],A[3]);
l*=l,r*=r;
l*=d(A[0],A[3]);
l*=d(A[1],A[3]);
r*=d(A[0],A[2]);
r*=d(A[1],A[2]);
if(l==r)cout << "YES";
else cout << "NO";
}