# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
624639 | MilosMilutinovic | Furniture (JOI20_furniture) | C++14 | 565 ms | 28040 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
/**
* author: wxhtzdy
* created: 03.08.2022 13:12:41
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<vector<int>> a(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> a[i][j];
}
}
vector<vector<bool>> dp(n, vector<bool>(m));
dp[n - 1][m - 1] = true;
auto Update = [&](int i, int j) {
if (a[i][j] == 1) {
dp[i][j] = false;
return;
}
dp[i][j] = false;
if (i == n - 1 && j == m - 1) {
dp[i][j] = true;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |