結果
| 問題 |
No.55 正方形を描くだけの簡単なお仕事です。
|
| コンテスト | |
| ユーザー |
latte0119
|
| 提出日時 | 2016-01-12 19:24:17 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 692 bytes |
| コンパイル時間 | 1,474 ms |
| コンパイル使用メモリ | 164,788 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-19 18:52:11 |
| 合計ジャッジ時間 | 1,930 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 13 WA * 8 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
signed main(){
vpint vec(3);
rep(i,3)cin>>vec[i].first>>vec[i].second;
sort(all(vec));
do{
if(vec[0].first!=vec[1].first)continue;
if(vec[0].second!=vec[2].second)continue;
if(abs(vec[0].second-vec[1].second)!=abs(vec[0].first-vec[2].first))continue;
cout<<vec[2].first<<" "<<vec[1].second<<endl;
return 0;
}while(next_permutation(all(vec)));
cout<<"-1"<<endl;
return 0;
}
latte0119