結果
問題 |
No.55 正方形を描くだけの簡単なお仕事です。
|
ユーザー |
![]() |
提出日時 | 2020-03-26 21:56:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 673 bytes |
コンパイル時間 | 2,079 ms |
コンパイル使用メモリ | 195,324 KB |
最終ジャッジ日時 | 2025-01-09 10:23:47 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 20 WA * 1 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); std::vector<std::complex<double>>a(3); for(lint i=0;i<3;i++){ double x,y;std::cin>>x>>y; a.at(i)={x,y}; } for(lint i=0;i<3;i++){ auto x=a.at(1)-a.at(0),y=a.at(2)-a.at(0); if(x.real()*y.real()+x.imag()*y.imag()==0){ auto ans=a.at(0)+x+y; std::cout<<(lint)ans.real()<<' '<<(lint)ans.imag()<<'\n'; return 0; } std::rotate(a.begin(),a.begin()+1,a.end()); } std::cout<<-1<<'\n'; }