摘要:
对于一个区间,要么一次全部删除,要么先删除左边,再删除右边 #include<bits/stdc++.h> using namespace std; const int N=110; int n,f[N][N]; int main() { scanf("%d",&n); for(int i=1;i< 阅读全文
摘要:
http://noip.ybtoj.com.cn/contest/19/problem/3 这道题仍然可以用例题逃离噩梦的思路来解决。 #include<bits/stdc++.h> #define x first #define y second using namespace std; type 阅读全文
摘要:
这道题的难点在于如何判断在某个时刻巨龙能否打中猎物,如果每一次巨龙走完都要check一次效率太低,而注意到猎物是不动的,我们可以初始化出能打中猎物的点,只要巨龙移动到这些位置,就完成搜索。 #include<bits/stdc++.h> #define x first #define y secon 阅读全文
摘要:
这道题的数据是不是有点水?还是题目描述有问题? #include<bits/stdc++.h> #define x first #define y second using namespace std; const int N=1005; typedef pair<int,int> PII; int 阅读全文
摘要:
这道题书上写错了,Dijkstra算法在这道题的情景当中的正确性是无法保证的。 #include<bits/stdc++.h> using namespace std; const int N=100010,M=2000005; int n,m; int dmin[N],dmax[N]; int h 阅读全文