結果
| 問題 |
No.80 四角形を描こう
|
| コンテスト | |
| ユーザー |
goodbaton
|
| 提出日時 | 2014-11-27 23:21:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 420 bytes |
| コンパイル時間 | 645 ms |
| コンパイル使用メモリ | 70,992 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-08 03:48:52 |
| 合計ジャッジ時間 | 1,220 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 8 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
16 | scanf("%d",&in);
| ~~~~~^~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
using namespace std;
int main(){
int in,ans=0;
scanf("%d",&in);
in/=2;
for(int i=1;i<in;i++){
ans=max(i*(in-i),ans);
}
printf("%d\n",ans);
return 0;
}
goodbaton