結果
| 問題 | No.1338 Giant Class |
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2021-01-15 22:25:59 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 399 bytes |
| 記録 | |
| コンパイル時間 | 1,480 ms |
| コンパイル使用メモリ | 214,008 KB |
| 実行使用メモリ | 1,302,600 KB |
| 最終ジャッジ日時 | 2026-06-16 18:38:02 |
| 合計ジャッジ時間 | 5,582 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 RE * 1 MLE * 3 -- * 6 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
ll h,w,q;
cin>>h>>w>>q;
vector<ll> A(w);
rep(i,w) A[i]=h;
ll ans=h*w;
rep(i,q){
ll y,x;
cin>>y>>x;
y--,x--;
if(A[x]>y){
ans-=A[x]-y;
A[x]=y;
}
cout<<ans<<endl;
}
return 0;
}
umezo