| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1146584 | tatas07 | Pizza (COCI21_pizza) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
int a[100005];
int n;
bool binsearch(int x){
int l=0;
int r=n-1;
while (l<=r)
{
int mid=(l+r)/2;
if(a[mid]<x){
l=mid+1;
}else if(a[mid]>x){
r=mid-1;
}else{
return false;
}
}
return true;
}
int main(){
cin>>n;
for (int i = 0; i < n; i++)
{
cin>>a[i];
}
int m;
cin>>m;
vector<int> bingkisan[m];
int counter=0;
sort(a,a+n);
for (int j = 1; j <= m; j++)
{
int k;
cin>>k;
bool c=true;
for (int i = 1; i <= k; i++)
{
int p;
cin>>p;
c=c and (binsearch(p));
}
if(c){
counter++;
}
}
cout<<counter;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
