結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
siguma323
|
| 提出日時 | 2016-05-03 18:23:14 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 465 bytes |
| コンパイル時間 | 830 ms |
| コンパイル使用メモリ | 67,728 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 10:29:40 |
| 合計ジャッジ時間 | 1,178 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <algorithm>
#include <numeric>
#include <string>
#include <vector>
#include <iostream>
#include <queue>
#include <utility>
#include <cmath>
using namespace std;
using ull = unsigned long long;
int main()
{
int k,n,f;
cin >> k >> n >> f;
vector<int> family(f);
int sum = k*n;
for(auto&& x : family)
{
cin >> x;
sum -= x;
}
if(sum < 0)
cout << -1 << endl;
else
cout << sum << endl;
}
siguma323