处女座的期末考试(贪心)

链接:https://ac.nowcoder.com/acm/contest/327/J

每次都选最先准备的科目复习就行。

#include
#include
#include
#include
using namespace std;
typedef long long ll;

struct node{
	ll a,b;
}; 

bool cmp(node a,node b){
	return a.b>n;
	for(int i = 0;i>aa[i].a;
	for(int i = 0;i>aa[i].b;
	sort(aa,aa+n,cmp);
	int ok = 1;
	sum = 0;
	for(int i = 0;i aa[i].b){
			ok = 0;
			break;
		}
		sum += 2;
	}
	if(ok == 1)
	cout<<"YES\n";
	else
	cout<<"NO\n";
	return 0;
}

 

你可能感兴趣的:(ACM,贪心)