传送门
回想起了自己赛场上乱搜的20分。
好吧现在也就是写了一个随机化贪心就水过去了,不得不说随机化贪心大法好。
代码:
#include<bits/stdc++.h>
using namespace std;
inline int read(){
int ans=0;
char ch=getchar();
while(!isdigit(ch))ch=getchar();
while(isdigit(ch))ans=(ans<<3)+(ans<<1)+(ch^48),ch=getchar();
return ans;
}
int up,cost[20][20],n,