求消耗最小的问题,一般都是bfs
#define ll int
#define inf 0x3ffffff
#define MAX 205
#define vec vector<ll>
ll N, A, B, K[MAX], res = inf, vis[MAX], step[MAX];
int main() {
cin >> N >> A >> B;
memset(vis, 0, sizeof(vis));
memset(step, 0, sizeof(vis));
for (int i = 1...