結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2022-08-08 17:05:36 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 1,000 ms |
| コード長 | 509 bytes |
| コンパイル時間 | 643 ms |
| コンパイル使用メモリ | 70,396 KB |
| 最終ジャッジ日時 | 2025-01-30 19:26:46 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <list>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdint.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
#define CIN( LL , A ) LL A; cin >> A
#define GETLINE( A ) string A; getline( cin , A )
int main()
{
CIN( ll , K );
CIN( ll , N );
CIN( ll , F );
ll KN = K * N;
ll A;
for( ll i = 0 ; i < F ; i++ ){
cin >> A;
KN -= A;
}
if( KN < 0 ){
KN = -1;
}
cout << KN << endl;
return 0;
}