結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-21 21:29:17 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,043 bytes |
コンパイル時間 | 1,881 ms |
コンパイル使用メモリ | 202,888 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-21 21:29:20 |
合計ジャッジ時間 | 2,527 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | AC | 2 ms
6,940 KB |
testcase_02 | AC | 2 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 2 ms
6,940 KB |
testcase_05 | AC | 2 ms
6,944 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 2 ms
6,944 KB |
testcase_08 | AC | 2 ms
6,940 KB |
testcase_09 | AC | 2 ms
6,944 KB |
testcase_10 | AC | 2 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,940 KB |
testcase_12 | AC | 2 ms
6,940 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,944 KB |
testcase_15 | AC | 2 ms
6,940 KB |
testcase_16 | AC | 0 ms
6,944 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define all(v) (v).begin(),(v).end() #define pb(a) push_back(a) #define rep(i, n) for(int i=0;i<n;i++) #define foa(e, v) for(auto& e : v) using ll = long long; const ll MOD7 = 1000000007, MOD998 = 998244353, INF = (1LL << 60); #define dout(a) cout<<fixed<<setprecision(10)<<a<<endl; int area(int a, int b, int c, int d, int e, int f) { c -= a; d -=b; e -=a; f -=b; return abs(c * f - e * d); } int main() { cin.tie(0); ios::sync_with_stdio(false); int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; int dy[4] = {-1, 0, 0, 1}; int dx[4] = {0, -1, 1, 0}; int ans = 0; rep(bit, 64) { vector<int> v; rep(i, 3) { int num = 0; num |= (bit >> (i * 2) & 3); v.pb(num); } ans = max(ans, area(a + dy[v[0]], b + dx[v[0]], c + dy[v[1]], d + dx[v[1]], e + dy[v[2]], f + dx[v[2]])); } if(ans & 1) cout << ans/2 << ".5" << endl; else cout << ans/2 << endl; return 0; }