답안 #98052

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
98052 2019-02-20T04:53:30 Z dndhk Worst Reporter 2 (JOI16_worst_reporter2) C++14
컴파일 오류
0 ms 0 KB
#include <bits/c++.h>

using namespace std;

#define INF 2000000000

typedef pair<int, int> pii;

const int MAX_N = 50;

int N;
vector<pii> v1, v2;
int ans = INF;
int idx[MAX_N+1];
int chk[MAX_N+1];

int sum = 0;

void dfs(int x){
	if(x==N){
		ans = min(ans,sum); return;
	}
	for(int i=0; i<N; i++){
		if(chk[i]==0 && v1[x].second<=v2[i].second){
			chk[i]=1;
			if(v1[x].first!=v2[i].first){
				sum++;
			}
			dfs(x+1);
			chk[i] = 0;
			if(v1[x].first!=v2[i].first){
				sum--;
			}
		}else if(v1[x].second>v2[i].second){
			return;
		}
	}
}

int main(){
	scanf("%d", &N);
	for(int i=0; i<N; i++){
		int a, b; scanf("%d%d", &a, &b);
		v1.push_back({a, b});
	}
	for(int i=0; i<N; i++){
		int a, b; scanf("%d%d", &a, &b);
		s.push_back({a, b});
	}
	dfs(0);
	printf("%d", ans);
	return 0;
}

Compilation message

worst_reporter2.cpp:1:10: fatal error: bits/c++.h: No such file or directory
 #include <bits/c++.h>
          ^~~~~~~~~~~~
compilation terminated.