Submission
Status:
Compilation Error
Subtask/Task Score:
Score: 0
User: sulinx
Problemset: ช่องบนไม้
Language: cpp
Time: 0.000 second
Submitted On: 2025-09-25 17:43:11
#include <bits/stdc++.h>
using namespace std;
int main(){
int N,W,L,tmpn,tmp;
cin >> N >> W >> L;
int hole[W+L+L] = {0};
for(int i = 0;i<N;i++){
cin >> tmpn;
for(int j = 0;j<tmpn;j++){
cin >> tmp;
tmp = tmp + L;
hole[tmp]++;
for (int k = -L; k <= L; k++) {
if (k != 0 && tmp + k >= 0 && tmp+k < W+L+L) {
hole[tmp + k]++;
}
}
}
for(int i = 0;i<W+L+L;i++){
if(hole[i]>=N){
cout << 1;
return 0;
}
}
cout << 0;
}