結果
| 問題 |
No.394 ハーフパイプ(1)
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2015-10-27 23:29:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 657 ms |
| コンパイル使用メモリ | 56,340 KB |
| 最終ジャッジ日時 | 2024-11-14 19:22:00 |
| 合計ジャッジ時間 | 1,018 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:19: error: ‘accumulate’ was not declared in this scope
12 | int ans = accumulate(s.begin(), s.end(), 0) - *min_element(s.begin(), s.end()) - *max_element(s.begin(), s.end());
| ^~~~~~~~~~
main.cpp:9:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d", &s[i]);
| ~~~~~^~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
using namespace std;
int main(){
vector<int> s(6);
for(int i=0; i<6; i++){
scanf("%d", &s[i]);
assert(0<=s[i] && s[i]<=100);
}
int ans = accumulate(s.begin(), s.end(), 0) - *min_element(s.begin(), s.end()) - *max_element(s.begin(), s.end());
ans *= 25;
printf("%d.%02d\n", ans/100, ans%100);
}
koyumeishi