0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-03 18:56:26 +00:00

#3945. 「春季测试 2023」涂色游戏

https://loj.ac/s/1719479
This commit is contained in:
Baoshuo Ren 2023-03-10 06:47:28 +08:00
parent d81262baae
commit e5e1f30e37
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
41 changed files with 177 additions and 0 deletions

57
LibreOJ/3945/3945.cpp Normal file
View File

@ -0,0 +1,57 @@
#include <iostream>
#include <fstream>
#include <utility>
#include <vector>
// using std::cin;
// using std::cout;
std::ifstream cin("paint.in");
std::ofstream cout("paint.out");
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
LibreOJ/3945/data/paint1.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint10.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint11.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint12.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint13.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint14.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint15.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint16.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint17.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint17.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint18.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint18.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint19.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint19.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint2.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint20.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint20.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint3.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint4.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint5.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint6.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint7.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint8.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint9.ans (Stored with Git LFS) Normal file

Binary file not shown.

BIN
LibreOJ/3945/data/paint9.in (Stored with Git LFS) Normal file

Binary file not shown.