結果
問題 |
No.1123 Afforestation
|
ユーザー |
|
提出日時 | 2020-07-22 22:59:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 886 bytes |
コンパイル時間 | 706 ms |
コンパイル使用メモリ | 87,868 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-06-23 00:09:48 |
合計ジャッジ時間 | 16,576 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 90 |
コンパイルメッセージ
main.cpp: In function 'bool ok(Int)': main.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type] 33 | } | ^
ソースコード
#include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> #include<map> #include<set> #include<string> #include<queue> #include<stack> #include<complex> using namespace std; #define MOD 1000000007 #define MOD2 998244353 #define INF (1<<29) #define LINF (1LL<<60) #define EPS (1e-10) #define PI 3.1415926535897932384626433832795028 typedef long long Int; typedef pair<Int, Int> P; typedef long double Real; typedef complex<Real> CP; Int A, B, C, D, E; bool ok(Int x){ Int a = A - 3*x; Int b = B - 3*x; Int c = C - 3*x; Int d = D - 3*x; Int e = E - 3*x; } int main(){ cin >> A >> B >> C >> D >> E; Int bottom = 0; Int top = A + B + C + D + E; while(top - bottom > 1){ Int mid = (top + bottom ) / 2; if(ok(mid))bottom = mid; else top = mid; } cout << bottom << endl; return 0; }