Submission #1115089

#TimeUsernameProblemLanguageResultExecution timeMemory
1115089rqiMosaic (IOI24_mosaic)C++17
12 / 100
1198 ms1652124 KiB
#include "mosaic.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using vi = vector<int>; #define sz(x) int((x).size()) vl mosaic(vi X, vi Y, vi T, vi B, vi L, vi R) { int Q = sz(T); vl C(Q, 0); vector<vi> vals(sz(X), vi(sz(Y), 0)); for(int i = 0; i < sz(X); i++){ vals[0][i] = X[i]; } for(int j = 0; j < sz(Y); j++){ vals[j][0] = Y[j]; } for(int i = 1; i < sz(X); i++){ for(int j = 1; j < sz(Y); j++){ vals[i][j] = (1^(vals[i-1][j]|vals[i][j-1])); } } for(int q = 0; q < sz(T); q++){ for(int i = T[q]; i <= B[q]; i++){ for(int j = L[q]; j <= R[q]; j++){ C[q] += vals[i][j]; } } } return C; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...