結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-21 21:41:25 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 918 bytes |
コンパイル時間 | 3,563 ms |
コンパイル使用メモリ | 269,680 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-21 21:41:30 |
合計ジャッジ時間 | 4,115 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
#define _GLIBCXX_DEBUG#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<ll,ll> pi;#define ALL(x) x.begin(),x.end()#define rep(i,a,b) for(int i=a;i<b;i++)using vi = vector<int>;using vvi = vector<vi>;using li =vector<ll>;using lli=vector<li>;using si =vector<char>;using ssi =vector<si>;const long long INF = 1e18;const long long MOD=1e9+7;//for (auto [key, val] : mp)int main() {int x1,x2,x3,y1,y2,y3;cin>>x1>>y1>>x2>>y2>>x3>>y3;int ans=abs(x2*y3+x1*y2+x3*y1-x3*y2-x1*y3-x2*y1);rep(i,0,4)rep(j,0,4)rep(k,0,4){int X1=x1,X2=x2,X3=x3,Y1=y1,Y2=y2,Y3=y3;if(i==0)X1++;else if(i==1)X1--;else if(i==2)Y1++;else Y1--;if(j==0)X2++;else if(j==1)X2--;else if(j==2)Y2++;else Y2--;if(k==0)X3++;else if(k==1)X3--;else if(k==2)Y3++;else Y3--;ans=max(ans,abs(X2*Y3+X1*Y2+X3*Y1-X3*Y2-X1*Y3-X2*Y1));}double ANS=ans/(2.0);cout<<ANS;}