0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

#1982. 【春季测试 2023】涂色游戏

https://sjzezoj.com/submission/73273
This commit is contained in:
Baoshuo Ren 2023-03-14 06:40:22 +08:00
parent 53ab5698c1
commit 44bb4f9b65
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
46 changed files with 189 additions and 0 deletions

54
S2OJ/1982/1982.cpp Normal file
View File

@ -0,0 +1,54 @@
#include <iostream>
#include <utility>
#include <vector>
using std::cin;
using std::cout;
const char endl = '\n';
void solve() {
int n, m, q;
cin >> n >> m >> q;
std::vector<std::pair<int, int>> g(n + 1), h(m + 1);
for (int i = 1, op, x, c; i <= q; i++) {
cin >> op >> x >> c;
if (op == 0) {
g[x] = std::make_pair(c, i);
} else { // op == 1
h[x] = std::make_pair(c, i);
}
}
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
if (g[i].second > h[j].second) {
cout << g[i].first;
} else {
cout << h[j].first;
}
if (j < m) {
cout << ' ';
} else { // j == m
cout << endl;
}
}
}
}
int main() {
std::ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while (t--) solve();
return 0;
}

BIN
S2OJ/1982/data/ex_paint1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/ex_paint1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/ex_paint2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/ex_paint2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint10.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint11.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint12.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint13.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint14.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint15.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint16.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint17.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint17.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint18.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint18.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint19.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint19.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint20.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint20.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint3.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint4.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint5.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint6.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint7.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint8.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint9.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/paint9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
S2OJ/1982/data/problem.conf (Stored with Git LFS) Normal file

Binary file not shown.