結果
| 問題 | No.143 豆 |
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2019-01-07 23:31:42 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| + 356µs | |
| コード長 | 234 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 75,356 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-24 00:19:45 |
| 合計ジャッジ時間 | 1,557 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int k, n, f;
cin >> k >> n >> f;
int ans = k * n;
for (int i = 0; i < f; i++)
{
int Ai;
cin >> Ai;
ans -= Ai;
}
cout << max(-1, ans) << endl;
}
toshiro_yanagi