結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-24 19:32:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,294 bytes |
コンパイル時間 | 4,547 ms |
コンパイル使用メモリ | 251,360 KB |
最終ジャッジ日時 | 2025-02-22 00:20:16 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;typedef int64_t lint;#define rep(i, n) for(int i=0; i<n; i++)#define repx(i, l, n) for(int i=l; i<n; i++)#define all(v) v.begin(), v.end()#define show(x) cout << #x << ": " << x << endl;#define list(x) cout << #x << ": " << x << " ";#define pb push_backusing vi = vector<lint>;using vvi = vector<vector<lint>>;template<class T> inline void vin(vector<T>& v) { rep(i, v.size()) cin >> v.at(i); }template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }template<class T> inline void drop(T x) { cout << x << endl; exit(0); }template<class T> void vout(vector<T> v) { rep(i, v.size()) { cout << v.at(i) << ' '; } cout << endl; }constexpr lint LINF = LLONG_MAX/2;int main() {lint x1, y1, x2, y2, x3, y3;cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;lint a=0, b=0, c=0, x, y, z;int dx[4] = {1, -1, 0, 0};int dy[4] = {0, 0, 1, -1};rep(i, 4) {rep(j, 4) {rep(k, 4) {x = x1+dx[i];y = y1+dy[i];chmax(a, abs((x2+dx[j]-x)*(y3+dy[k]-y) - (x3+dx[k]-x)*(y2+dy[j]-y)));}}}cout << fixed << setprecision(10) << (double)a/2 << endl;}