結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-02-09 14:51:18 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 299 ms / 2,000 ms |
| コード長 | 577 bytes |
| 記録 | |
| コンパイル時間 | 754 ms |
| コンパイル使用メモリ | 81,000 KB |
| 実行使用メモリ | 8,192 KB |
| 最終ジャッジ日時 | 2024-07-06 20:37:35 |
| 合計ジャッジ時間 | 6,623 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
using ll = long long;
const int INF = 100100100;
int main(){
int h , w , q;
cin >> h >> w >> q;
map<int , int> mp;
ll now = (ll)h * w;
while(q--){
int y , x;
cin >> y >> x;
if(mp[x] == 0){
now -= (h - y + 1);
mp[x] = y;
}else{
if(mp[x] <= y){
}else{
now -=(mp[x] - y);
mp[x] = y;
}
}
cout << now << endl;
}
return 0;
}
mmn15277198