# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1103547 | duckindog | Mosaic (IOI24_mosaic) | C++17 | 1211 ms | 1618964 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.
#include <bits/stdc++.h>
#ifndef LOCAL
#include "mosaic.h"
#endif
using namespace std;
int cal(int x, int y) { return (x | y) ^ 1; };
vector<long long> mosaic(vector<int> X, vector<int> Y,
vector<int> T, vector<int> B,
vector<int> L, vector<int> R) {
int n = X.size();
int q = (int)T.size();
vector<long long> C(q, 0);
vector<vector<int>> a(n, vector<int>(n)), d = a;
for (int i = 0; i < n; ++i) {
a[0][i] = X[i];
a[i][0] = Y[i];
}
for (int i = 1; i < n; ++i) {
for (int j = 1; j < n; ++j) a[i][j] = cal(a[i - 1][j], a[i][j - 1]);
}
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
d[i][j] = a[i][j];
if (i) d[i][j] += d[i - 1][j];
if (j) d[i][j] += d[i][j - 1];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |