Submission #101194

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1011942019-03-17 11:01:55mayhoubsalehKonj (COCI19_konj)C++14
56 / 70
419 ms24764 KiB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int n,a[200005][4];
map<pair<int,int>,vector<int>>m;
map<pair<int,int>,bool>vis;
int l=1e3,r=-1,up=-1,down=1e3;
bool c[333][333];
void add(int id){
for(int i=a[id][0];i<=a[id][2];i++){
for(int j=a[id][1];j<=a[id][3];j++){
c[i][j]=1;
up=max(up,i);
down=min(down,i);
l=min(l,j);r=max(r,j);
}
}
}
void dfs(int x,int y){
if(vis[{x,y}])return;
vis[{x,y}]=1;
for(auto i:m[{x,y}]){
add(i);
dfs(a[i][0],a[i][1]);
dfs(a[i][2],a[i][3]);
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...