結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
TangentDay
|
| 提出日時 | 2016-02-11 03:42:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 540 bytes |
| コンパイル時間 | 727 ms |
| コンパイル使用メモリ | 74,644 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-23 10:26:28 |
| 合計ジャッジ時間 | 1,319 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
ソースコード
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;
#define REP(i,n) for(int i=0; i<n; i++)
#define FOR(i,a,b) for(int i=a; i<=b; i++)
#define FORR(i,a,b) for (int i=a; i>=b; i--)
typedef long long ll;
int main(void){
int k,n,f;
cin >> k >> n >> f;
int ans = k*n;
REP(i,f){
int a;
cin >> a;
ans -= a;
}
if(ans>=0)
cout << ans << endl;
else
cout << -1 << endl;
return 0;
}
TangentDay