# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174164 | lopkus | Furniture (JOI20_furniture) | C++20 | 5089 ms | 1360 KiB |
#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
void solve() {
int n, m;
std::cin >> n >> m;
std::vector<std::vector<int>> a(n + 1, std::vector<int>(m + 1));
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++) {
std::cin >> a[i][j];
}
}
std::vector<std::vector<int>> was(n + 1, std::vector<int>(m + 1));
int q;
std::cin >> q;
while(q--) {
int x, y;
std::cin >> x >> y;
assert(!was[x][y]);
was[x][y] = 1;
std::vector<std::vector<int>> b(n + 1, std::vector<int>(m + 1));
std::vector<std::vector<int>> dp(n + 1, std::vector<int>(m + 1));
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++) {
b[i][j] = a[i][j];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |