上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 50 下一页
摘要: problem给出一个n*n的矩阵,每一格有一个非负整数A[i][j],(Aij #include#include#includeusing namespace std;const int N = 5050, M = 200010;//AddEdgeint tot=1... 阅读全文
posted @ 2018-06-02 13:30 gwj1139177410 阅读(160) 评论(0) 推荐(0)
摘要: problem(= =、可读版本)最近,佳佳迷上了一款好玩的小游戏:antbuster。 游戏规则非常简单:在一张地图上,左上角是蚂蚁窝,右下角是蛋糕,蚂蚁会源源不断地从窝里爬出来,试图把蛋糕搬回蚂蚁窝。而你的任务,就是用原始资金以及杀蚂蚁获得的奖金造防御塔,杀掉这些... 阅读全文
posted @ 2018-06-02 12:27 gwj1139177410 阅读(192) 评论(0) 推荐(0)
摘要: problemsolutioncodes//Floyd-wallshall模板#includeusing namespace std;int n, e[110][110];int main(){ ios::sync_with_stdio(false); c... 阅读全文
posted @ 2018-06-01 21:48 gwj1139177410 阅读(99) 评论(0) 推荐(0)
摘要: problemsolutioncodes//标程Dijkstra#include#include#includeusing namespace std;//Tint n = 60, m, vis[1010];//Graphstruct Edge{ int v, ... 阅读全文
posted @ 2018-06-01 21:32 gwj1139177410 阅读(112) 评论(0) 推荐(0)
摘要: problemsolutioncodes//动态维护大根堆,贪心减少入队元素个数#include#include#includeusing namespace std;const int maxn = 100010;int n, a[maxn], b[maxn];//... 阅读全文
posted @ 2018-06-01 21:30 gwj1139177410 阅读(195) 评论(0) 推荐(0)
摘要: problemsolutioncodes//MST-Kruskal-排序贪心+并查集//题中N=M,(M小于N^2的)稀疏图用邻接表。#include#includeusing namespace std;typedef long long LL;const int ... 阅读全文
posted @ 2018-06-01 21:27 gwj1139177410 阅读(150) 评论(0) 推荐(0)
摘要: problemsolutioncodes//MST-Prim-贪心-堆优化#include#include#includeusing namespace std;const int maxn = 110;//Graphint e[maxn][maxn],ans;//P... 阅读全文
posted @ 2018-06-01 21:23 gwj1139177410 阅读(144) 评论(0) 推荐(0)
摘要: problemsolutioncodes#includeusing namespace std;int main(){ int n, k=1; cin>>n; //1.第n个数在第k条斜线上(前k条斜线的数的个数为等差数列) while((1+k)... 阅读全文
posted @ 2018-06-01 21:20 gwj1139177410 阅读(198) 评论(0) 推荐(0)
摘要: problemsolutioncodes#includeusing namespace std;int n, a[1010], t;int main(){ cin>>n; for(int i = 1; i >x; if(!a[x]){ a[x... 阅读全文
posted @ 2018-06-01 21:18 gwj1139177410 阅读(182) 评论(0) 推荐(0)
摘要: problemsolutioncodes#includeusing namespace std;const int maxn = 1010;int f[maxn];int main(){ int n; cin>>n; for(int i = 1; i <... 阅读全文
posted @ 2018-06-01 21:16 gwj1139177410 阅读(149) 评论(0) 推荐(0)
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 50 下一页
选择