Submission #1053757

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10537572024-08-11 17:00:51SzymonKrzywdaFurniture (JOI20_furniture)C++17
100 / 100
1177 ms10832 KiB
#include <bits/stdc++.h>
using namespace std;
int przekatne[2010];
int tablica[2010][2010];
void rozlej(int a, int b){
stack<pair<int,int>> kolejka;
kolejka.push({a,b});
while (!kolejka.empty()){
int y = kolejka.top().first;
int x = kolejka.top().second;
kolejka.pop();
if (tablica[y+1][x-1]==1){
if (tablica[y][x-1]==0){
przekatne[y+x-1]--;
tablica[y][x-1]=1;
kolejka.push({y,x-1});
}
if (tablica[y+1][x]==0){
przekatne[y+1+x]--;
tablica[y+1][x]=1;
kolejka.push({y+1,x});
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...