답안 #976395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
976395 2024-05-06T14:03:24 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define pll pair<ll,ll>

const ll MOD=1e9+7;

#define ll int
//#define ll int
//KALAU TAKUT RTE

bool cmp (pair<ll,ll> x, pair<ll,ll>y){
	return x.second < y.second;
}

signed main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	ll n; cin>>n;
	set<ll>a;
	for (int i=0; i<n;i++){
		ll x; cin>>x;
		a.insert(x);
	}
	
	ll m ; cin>>m;
	ll cnt=0;
	while(m--){
		ll k; cin>>k;
		bool suka = true;
		for (int i=0; i<k;i++){
			ll x; cin>>x;
			if (a.count(x)) suka=false;
		}
		if (suka) cnt++;
	}
	cout<<cnt<<endl;
}

Compilation message

Main.cpp:10: warning: "ll" redefined
   10 | #define ll int
      | 
Main.cpp:4: note: this is the location of the previous definition
    4 | #define ll long long
      |
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct