摘要:
暴力搜索。注意题目说每个字母对应的数字不同,这句话表明最多只有10个字母,所以暴力DFS绝对不会TLE。#include#include#include#includeusing namespace std;char s[1000],t[1000];char cun[1000];int C[1000... 阅读全文
摘要:
水题,感觉和田忌赛马差不多#include#include#include#includeusing namespace std;struct P1{ int Num; int Hua;} Play1[30];struct P2{ int Num; int Hua;} Pla... 阅读全文
摘要:
枚举起点和公司,每次用DFS跑一遍图,预处理出所有的答案。询问的时候很快就能得到答案。#include#include#include#include#includeusing namespace std;int jz[300][300][30];int ans[300][300][30];int ... 阅读全文
摘要:
二分答案+验证(这题精度卡的比较死)#include#include#define eps 1e-7const int ff = 11111;double a[ff];double pi = acos(-1.0);int main(){ int sb; scanf("%d", &sb);... 阅读全文