結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
kerotan
|
| 提出日時 | 2019-04-05 11:03:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 448 bytes |
| コンパイル時間 | 1,802 ms |
| コンパイル使用メモリ | 165,600 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 11:12:04 |
| 合計ジャッジ時間 | 2,515 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <bits/stdc++.h>
#define foreach(i, v) for(__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++ i)
#define BETWEEN(a, x, b) (a<=x&&x<b)
using namespace std;
typedef long long ll;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int k,n,f;
cin>>k>>n>>f;
int t = k * n;
for(int i=0;i<f;i++){
int p;cin>>p;t -= p;
}
cout<<(t >= 0 ? t : -1)<<endl;
return 0;
}
kerotan