結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-18 08:28:34 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 371 bytes |
| 記録 | |
| コンパイル時間 | 598 ms |
| コンパイル使用メモリ | 88,288 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-03 13:51:06 |
| 合計ジャッジ時間 | 1,137 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <iterator>
#include <numeric>
int main(){
int K,N,F;
std::vector<int> A;
std::cin >> K >> N >> F;
A.reserve(F);
std::copy_n(std::istream_iterator<int>(std::cin),F,std::back_inserter(A));
std::cout << std::max(-1,K*N - std::accumulate(A.begin(),A.end(),0)) << std::endl;
return 0;
}