摘要:
题目链接。分析:用dfs枚举每一波攻击的三个国家。很暴力,但没想到0ms。#include #include #include using namespace std;const int maxn = 20;int p[maxn], nervous[maxn], n, m, k, max_cnt;int att[110][3];void dfs(int cn) { //界限 if(max_cnt >= k) return ; if(cn >= k) { max_cnt = k; return ; } int a[3], bak[3]; for(... 阅读全文