結果

問題 No.80 四角形を描こう
ユーザー Yug_min_nullYug_min_null
提出日時 2021-10-13 13:14:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 115 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 1,762 ms
コンパイル使用メモリ 186,684 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 19:04:36
合計ジャッジ時間 4,071 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
4,348 KB
testcase_01 AC 114 ms
4,348 KB
testcase_02 AC 115 ms
4,348 KB
testcase_03 AC 115 ms
4,348 KB
testcase_04 AC 114 ms
4,348 KB
testcase_05 AC 115 ms
4,348 KB
testcase_06 AC 115 ms
4,348 KB
testcase_07 AC 114 ms
4,348 KB
testcase_08 AC 114 ms
4,348 KB
testcase_09 AC 114 ms
4,348 KB
testcase_10 AC 115 ms
4,348 KB
testcase_11 AC 115 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  int D; cin >> D;
  int ans = 0;
  for(int i = 1; i <= 10000; i++){
    for(int j = 1; j <= 10000; j++){
      if((i+j)*2 <= D) ans = max(ans, i*j);
    }
  }
  cout << ans << endl;
}
0