結果
問題 | No.2790 Athena 3 |
ユーザー | 乾麺 |
提出日時 | 2024-06-21 21:41:25 |
言語 | C++23 (gcc 12.3.0 + boost 1.83.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 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | AC | 2 ms
6,820 KB |
testcase_02 | AC | 2 ms
6,944 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 2 ms
6,944 KB |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,940 KB |
testcase_08 | AC | 2 ms
6,940 KB |
testcase_09 | AC | 2 ms
6,940 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,944 KB |
testcase_12 | AC | 2 ms
6,940 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,940 KB |
testcase_15 | AC | 2 ms
6,940 KB |
testcase_16 | AC | 2 ms
6,940 KB |
ソースコード
#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; }