【洛谷P1361】小猫爬山
【简单题,请神犇移步】
某知dealpool66告诉我可以用这道题练习模拟退火。
然后我一眼看过去不是贪心吗。。
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<iostream>
using namespace std;
#define N 28
int n,w,a[N];
int ans = 0;
bool vis[N],flag;
bool cmp(const int x,const