結果
問題 |
No.143 豆
|
ユーザー |
|
提出日時 | 2024-04-02 19:25:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 499 ms |
コンパイル使用メモリ | 69,344 KB |
最終ジャッジ日時 | 2025-02-20 19:41:59 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 11 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int n, m, a, res = 0; cin >> n >> m >> a; for(int i = 0; i < a; i++){ int l; cin >> l; res += l; } if (n*m - res < 0){ cout << -1 << endl; } else cout << res << endl; return 0; }