結果
問題 | No.2790 Athena 3 |
ユーザー | snrnsidy |
提出日時 | 2024-06-21 21:32:23 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 2,517 bytes |
コンパイル時間 | 3,180 ms |
コンパイル使用メモリ | 349,776 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-21 21:32:27 |
合計ジャッジ時間 | 3,522 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,816 KB |
testcase_01 | AC | 2 ms
6,944 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,940 KB |
testcase_06 | AC | 2 ms
6,940 KB |
testcase_07 | AC | 3 ms
6,940 KB |
testcase_08 | AC | 2 ms
6,944 KB |
testcase_09 | AC | 2 ms
6,940 KB |
testcase_10 | AC | 3 ms
6,940 KB |
testcase_11 | AC | 2 ms
6,940 KB |
testcase_12 | AC | 2 ms
6,944 KB |
testcase_13 | AC | 2 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,944 KB |
testcase_15 | AC | 2 ms
6,944 KB |
testcase_16 | AC | 2 ms
6,940 KB |
コンパイルメッセージ
main.cpp:27:41: warning: bad option '-fschedule-insnS2' to pragma 'optimize' [-Wpragmas] 27 | #pragma GCC optimize("-fschedule-insnS2") | ^ main.cpp:44:52: warning: bad option '-fdelete-null-Pointer-checks' to pragma 'optimize' [-Wpragmas] 44 | #pragma GCC optimize("-fdelete-null-Pointer-checks") | ^ main.cpp:55:51: warning: bad option '-fschedule-insnS2' to attribute 'optimize' [-Wattributes] 55 | int area(int x1,int y1,int x2,int y2,int x3,int y3) | ^ main.cpp:55:51: warning: bad option '-fdelete-null-Pointer-checks' to attribute 'optimize' [-Wattributes] main.cpp:59:17: warning: bad option '-fschedule-insnS2' to attribute 'optimize' [-Wattributes] 59 | void dfs(int now) | ^ main.cpp:59:17: warning: bad option '-fdelete-null-Pointer-checks' to attribute 'optimize' [-Wattributes] main.cpp:77:14: warning: bad option '-fschedule-insnS2' to attribute 'optimize' [-Wattributes] 77 | int main(void) | ^ main.cpp:77:14: warning: bad option '-fdelete-null-Pointer-checks' to attribute 'optimize' [-Wattributes]
ソースコード
#pragma GCC optimize("O3") #pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma GCC optimize("-fgcse-lm") #pragma GCC optimize("-fipa-sra") #pragma GCC optimize("-ftree-pre") #pragma GCC optimize("-ftree-vrp") #pragma GCC optimize("-fpeephole2") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-fsched-spec") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("-falign-jumps") #pragma GCC optimize("-falign-loops") #pragma GCC optimize("-falign-labels") #pragma GCC optimize("-fdevirtualize") #pragma GCC optimize("-fcaller-saves") #pragma GCC optimize("-fcrossjumping") #pragma GCC optimize("-fthread-jumps") #pragma GCC optimize("-funroll-loops") #pragma GCC optimize("-freorder-blocks") #pragma GCC optimize("-fschedule-insns") #pragma GCC optimize("inline-functions") #pragma GCC optimize("-ftree-tail-merge") #pragma GCC optimize("-fschedule-insnS2") #pragma GCC optimize("-fstrict-aliasing") #pragma GCC optimize("-falign-functions") #pragma GCC optimize("-fcse-follow-jumps") #pragma GCC optimize("-fsched-interblock") #pragma GCC optimize("-fpartial-inlining") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("-freorder-functions") #pragma GCC optimize("-findirect-inlining") #pragma GCC optimize("-fhoist-adjacent-loads") #pragma GCC optimize("-frerun-cse-after-loop") #pragma GCC optimize("inline-small-functions") #pragma GCC optimize("-finline-small-functions") #pragma GCC optimize("-ftree-switch-conversion") #pragma GCC optimize("-foptimize-sibling-calls") #pragma GCC optimize("-fexpensive-optimizations") #pragma GCC optimize("inline-functions-called-once") #pragma GCC optimize("-fdelete-null-Pointer-checks") #pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; int x[3]; int y[3]; int res = 0; int area(int x1,int y1,int x2,int y2,int x3,int y3) { return abs(x1*y2 + x2*y3 + x3*y1 - x2*y1 - x3*y2 - x1*y3); } void dfs(int now) { if(now==3) { res = max(res,area(x[0],y[0],x[1],y[1],x[2],y[2])); return; } x[now]-=1; dfs(now+1); x[now]+=2; dfs(now+1); x[now]-=1; y[now]-=1; dfs(now+1); y[now]+=2; dfs(now+1); y[now]-=1; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); cin >> x[0] >> y[0] >> x[1] >> y[1] >> x[2] >> y[2]; dfs(0); if(res%2==0) cout << res/2 << ".0" << '\n'; else cout << res/2 << ".5" << '\n'; return 0; }