제출 #431856

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
4318562021-06-17 16:12:17Bench0310자리 배치 (IOI18_seats)C++17
25 / 100
2963 ms149736 KiB
#include <bits/stdc++.h>
#include "seats.h"
using namespace std;
typedef long long ll;
int n,h,w;
vector<array<int,2>> v;
vector<int> ar,br,ac,bc;
int res=0;
const int N=1000;
set<int> row[N];
vector<int> rowmn(N,N*N);
set<int> col[N];
vector<int> colmn(N,N*N);
int ok(int i){return ((br[i]-ar[i]+1)*(bc[i]-ac[i]+1)==i+1);}
void give_initial_chart(int nh,int nw,vector<int> r,vector<int> c)
{
h=nh;
w=nw;
n=h*w;
v.assign(n,{0,0});
for(int i=0;i<n;i++) v[i]={r[i],c[i]};
ar.assign(n,v[0][0]);
br.assign(n,v[0][0]);
ac.assign(n,v[0][1]);
bc.assign(n,v[0][1]);
res=ok(0);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...