提出 #74099789
ソースコード 拡げる
#include <bits/stdc++.h>
#define ll long long
const ll N = 2e5 + 5, MOD = 998244353, inf = 2e18;
using namespace std;
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
char di[] = {'R', 'L', 'D', 'U'};
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<class T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
void Ebraam() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("Input.txt", "r", stdin);
freopen("Output.txt", "w", stdout);
#endif
}
void solve() {
int h, w, q;
cin >> h >> w >> q;
while (q--) {
int x, y;
cin >> x >> y;
if (x == 1) {
cout << w * y;
h -= y;
} else {
cout << h * y;
w -= y;
}
cout << "\n";
}
}
int main() {
Ebraam();
int t = 1;
// cin >> t;
while (t--) {
solve();
if (t)cout << endl;
}
return 0;
}
提出情報
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
200 / 200 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
sample00.txt |
| All |
sample00.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| sample00.txt |
AC |
1 ms |
3528 KiB |
| testcase00.txt |
AC |
1 ms |
3556 KiB |
| testcase01.txt |
AC |
1 ms |
3504 KiB |
| testcase02.txt |
AC |
1 ms |
3528 KiB |
| testcase03.txt |
AC |
1 ms |
3540 KiB |
| testcase04.txt |
AC |
1 ms |
3588 KiB |
| testcase05.txt |
AC |
1 ms |
3708 KiB |
| testcase06.txt |
AC |
1 ms |
3516 KiB |
| testcase07.txt |
AC |
1 ms |
3528 KiB |
| testcase08.txt |
AC |
1 ms |
3468 KiB |
| testcase09.txt |
AC |
1 ms |
3484 KiB |
| testcase10.txt |
AC |
1 ms |
3504 KiB |
| testcase11.txt |
AC |
1 ms |
3708 KiB |
| testcase12.txt |
AC |
1 ms |
3556 KiB |
| testcase13.txt |
AC |
1 ms |
3708 KiB |
| testcase14.txt |
AC |
1 ms |
3528 KiB |
| testcase15.txt |
AC |
1 ms |
3516 KiB |
| testcase16.txt |
AC |
1 ms |
3644 KiB |
| testcase17.txt |
AC |
1 ms |
3512 KiB |
| testcase18.txt |
AC |
1 ms |
3588 KiB |
| testcase19.txt |
AC |
1 ms |
3556 KiB |