結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-25 08:13:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 332 bytes |
| コンパイル時間 | 555 ms |
| コンパイル使用メモリ | 67,156 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-23 10:42:05 |
| 合計ジャッジ時間 | 1,116 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <vector>
int main() {
int k, n, f;
int tmp;
std::cin >> k >> n >> f;
int b = k * n;
for (int i = 0; i < f; i++) {
std::cin >> tmp;
b -= tmp;
}
if (b < 0) {
std::cout << -1 << std::endl;
} else {
std::cout << b << std::endl;
}
}