結果
問題 |
No.1338 Giant Class
|
ユーザー |
![]() |
提出日時 | 2021-01-15 22:25:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 399 bytes |
コンパイル時間 | 1,967 ms |
コンパイル使用メモリ | 193,852 KB |
最終ジャッジ日時 | 2025-01-17 19:45:27 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 RE * 7 MLE * 3 |
ソースコード
#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; }