結果
| 問題 |
No.3180 angles sum
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-16 10:53:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 248 ms / 2,000 ms |
| コード長 | 720 bytes |
| コンパイル時間 | 2,111 ms |
| コンパイル使用メモリ | 200,916 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-16 10:53:51 |
| 合計ジャッジ時間 | 8,476 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 17 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int T; cin >> T;
while(T--){
vector<pair<long long,long long>> P(3);
vector<long long> A;
for(auto &[x,y] : P) cin >> x >> y,A.push_back(x),A.push_back(y);
long long now = A.at(1)*A.at(2)*A.at(4)+A.at(0)*A.at(3)*A.at(4)-A.at(0)*A.at(2)*A.at(5)+A.at(1)*A.at(3)*A.at(5);
vector<long double> An(3);
for(int i=0; i<3; i++){
auto [x,y] = P.at(i);
An.at(i) = atan2l(y,x);
}
bool yes = abs(An.at(0)+An.at(1)-An.at(2)) <= 1e-9;
if(now == 0 && yes) cout << "Yes\n";
else cout << "No\n";
}
}