結果
| 問題 |
No.191 供託金
|
| コンテスト | |
| ユーザー |
r2en_
|
| 提出日時 | 2017-03-17 20:13:15 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 323 bytes |
| コンパイル時間 | 518 ms |
| コンパイル使用メモリ | 63,360 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-04 13:43:55 |
| 合計ジャッジ時間 | 1,275 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 23 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:15:20: warning: 'cnt' may be used uninitialized [-Wmaybe-uninitialized]
15 | cout << cnt << "\n";
| ^~~~
main.cpp:5:11: note: 'cnt' was declared here
5 | int n,cnt;
| ^~~
ソースコード
#include <iostream>
using namespace std;
int main(){
int n,cnt;
long long c[100000] = {};
long long sum = 0;
cin >> n;
for(int i = 0; i < n; i++){
cin >> c[i]; sum += c[i];
}
for(int i = 0; i < n; i++){
if(sum/10>=c[i]){ cnt+=30; }
}
cout << cnt << "\n";
return 0;
}
r2en_