結果
| 問題 |
No.2790 Athena 3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-21 22:02:44 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 913 bytes |
| コンパイル時間 | 3,212 ms |
| コンパイル使用メモリ | 248,160 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-21 22:02:49 |
| 合計ジャッジ時間 | 3,901 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=a;i<b;i++)
#define ALL(x) (x).begin(),(x).end()
#define dbgv(x); for(auto now : x) cout << now << " "; cout << endl;
int x[3],y[3];
int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};
int main(){
rep(i,3) cin >> x[i] >> y[i];
double ans = 0;
rep(ii,4)rep(jj,4)rep(kk,4){
int xx[3],yy[3];
vector<int> poses = {ii,jj,kk};
rep(i,3) xx[i] = x[i]+dx[poses[i]];
rep(i,3) yy[i] = y[i]+dy[poses[i]];
rep(i,2) xx[i] -= xx[2];
rep(i,2) yy[i] -= yy[2];
cerr << xx[0] << " " << xx[1] << " " << yy[0] << " " << yy[1] << " " << (yy[1]-xx[0])*(yy[0]-xx[1])/2 << endl;
cerr << ii << " " << jj << " " << kk << endl;
double now = (double)((yy[1]*xx[0])-(yy[0]*xx[1]))/2;
ans = max(ans,abs(now));
}
printf("%.8f\n",ans);
}