Submission #1136107

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11361072025-01-14 22:18:30naneosmicMosaic (IOI24_mosaic)C++20
100 / 100
966 ms86564 KiB
#include "mosaic.h"
#include <bits/stdc++.h>
#define int long long
using namespace std;
vector<int> mosaic(vector<signed> X, vector<signed> Y,vector<signed> T, vector<signed> B,vector<signed> L, vector<signed> R) {
int Q = (int)T.size();
vector<int> C(Q);
int n=X.size();
vector<vector<int>>v(max(3LL,n),vector<int>(3,0));
if(n>=3){
for(int i=0;i<3;i++)v[i].resize(n,0);
}
for(int i=0;i<n;i++)v[0][i]=X[i];
for(int i=0;i<n;i++)v[i][0]=Y[i];
for(int i=1;i<n;i++){
if(v[0][i]==1LL||v[1][i-1]==1LL){
v[1][i]=0;
}else v[1][i]=1;
if(v[1][i]==1LL||v[2][i-1]==1LL){
v[2][i]=0;
}else v[2][i]=1;
}
for(int i=1;i<n;i++){
if(v[i][0]==1LL||v[i-1][1]==1LL){
v[i][1]=0;
}else v[i][1]=1;
if(v[i][1]==1LL||v[i-1][2]==1LL){
v[i][2]=0;
}else v[i][2]=1;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...