結果
問題 | No.80 四角形を描こう |
ユーザー |
![]() |
提出日時 | 2016-08-25 15:28:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 59,440 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 02:17:38 |
合計ジャッジ時間 | 1,030 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 |
ソースコード
#include <iostream> #include <cstring> #include <vector> #include <algorithm> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<(n);i++) int main(void){ int d; cin >> d; int tmp = d / 2; int ans = 0; for (int i = 1; i < tmp; ++i){ int l = i, r = tmp - i; ans = max(l * r, ans); } cout << ans << endl; }