結果
| 問題 |
No.2790 Athena 3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-21 21:26:15 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 891 bytes |
| コンパイル時間 | 1,941 ms |
| コンパイル使用メモリ | 196,516 KB |
| 最終ジャッジ日時 | 2025-02-21 23:45:39 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
template<typename T>
bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template<typename T>
bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
void solve();
int main() {
cin.tie(nullptr)->sync_with_stdio(false);
cout << fixed << setprecision(20);
int t = 1;
//cin >> t;
while (t--) {
solve();
}
}
int x[3],y[3];
void solve() {
rep(i,3)cin>>x[i]>>y[i];
double ans=0.0;
rep(S,1<<6){
vector<int>X(x,x+3),Y(y,y+3);
int s=S;
rep(i,3){
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
X[i]+=dx[s%4],Y[i]+=dy[s%4];
s/=4;
}
int a=X[1]-X[0],b=Y[1]-Y[0];
int c=X[2]-X[0],d=Y[2]-Y[0];
chmax(ans,(double)abs(a*d-b*c)/2.0);
}
cout<<ans<<endl;
}