結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-08-03 09:30:55 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| + 345µs | |
| コード長 | 514 bytes |
| 記録 | |
| コンパイル時間 | 473 ms |
| コンパイル使用メモリ | 104,176 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-24 00:51:19 |
| 合計ジャッジ時間 | 1,770 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
using namespace std;
int main() {
int K, N, F;
cin >> K >> N >> F;
int s = K * N;
for (int i = 0; i < F; ++i) {
int A;
cin >> A;
s -= A;
}
if (s < 0) {
cout << -1 << endl;
} else {
cout << s << endl;
}
return 0;
}
f843nmfwisfeuw