
uva
永远热血沸腾
这个作者很懒,什么都没留下…
展开
-
uva11297 Census 【二维线段树】
#include<cstdio>#include<algorithm>#include<cstring>using namespace std;const int inf=1<<30;const int maxn=2000+10;struct IntervalTree2D{ int mx[maxn][maxn],mi[maxn][maxn],n,m; int xo,xle原创 2016-04-16 14:17:49 · 438 阅读 · 0 评论 -
uva 12169 Disgruntled Judge
暴力或扩展欧几里德算法原创 2015-05-27 21:27:26 · 726 阅读 · 0 评论 -
uva 10375 Choose and divide
唯一分解定理原创 2015-06-02 21:48:24 · 628 阅读 · 0 评论 -
uva 10791 Minimum Sum LCM
唯一分解定理原创 2015-06-02 22:48:35 · 556 阅读 · 0 评论 -
uva 679 Dropping Balls
。。。原创 2015-04-15 20:36:01 · 416 阅读 · 0 评论 -
uva 572 Oil Deposits
。。。原创 2015-04-13 21:18:35 · 386 阅读 · 0 评论 -
uva 10720 Graph Construction
。。。原创 2015-02-15 20:01:12 · 423 阅读 · 0 评论 -
uva 10716 Evil Straw Warts Live
。。。原创 2015-02-15 13:48:48 · 426 阅读 · 0 评论 -
uva 10070 Camel trading
。。。原创 2015-02-13 14:42:28 · 575 阅读 · 0 评论 -
uva 10020 Minimal coverage
一直在想如何打植物大战僵尸,题目题意都没有好好理解。晚上静下心来才明白白天都想错了。实际上下午用了修改器发现pvz好无聊。这是算法竞赛入门经典p233页中的区域覆盖问题,书本上讲的看了好久才懂,主要是我以为就只能用一条,实际上题意是用最少的条数组合起来。写法就是排序和扫描,排序按左端点从小到大排。输入时先将右端点小于0的数据去掉,根本不可能用到。再进行一次预处理,找出第一段,要求左端点值小原创 2015-02-12 22:36:44 · 343 阅读 · 0 评论 -
uva 10954 Add All
。。。原创 2015-02-11 20:31:58 · 382 阅读 · 0 评论 -
uva 10487 Closest Sums
。。。原创 2015-02-11 20:07:06 · 433 阅读 · 0 评论 -
uva 12034 Race
递推原创 2015-06-03 22:07:38 · 764 阅读 · 0 评论 -
uva 580 Critical Mass(递推)
递推原创 2015-06-04 17:55:27 · 847 阅读 · 0 评论 -
UVALive 6959 Judging Troubles map应用
。。。原创 2015-08-26 12:29:40 · 684 阅读 · 0 评论 -
uva 167 The Sultan's Successors 搜索
入门经典原创 2015-02-01 11:01:24 · 404 阅读 · 0 评论 -
uva 315 Network 割点
//uva 315//割点条件根节点有两个或两个以上节点//或者其他节点u有一个子女w,low[w]>=dfn[u];#include<bits/stdc++.h>using namespace std;const int MAXN=1000+5;struct Edge{ int from,to;};vector<Edge>edges;vector<int>G[MAXN*MA原创 2015-11-10 13:45:49 · 514 阅读 · 0 评论 -
uva 796 Critical Links 割边的数量
#include <stdio.h>#include <string.h>#include <iostream>#include <algorithm>#include <vector>#include <queue>#include <stack>#include <set>#include <map>#include <string>#include <math.h>#in原创 2015-11-09 14:55:21 · 489 阅读 · 0 评论 -
uva 10480 Sabotage 最小割最大流定理
#include<stdio.h>#include<string.h>#include<queue>#include<vector>using namespace std;const int N=1024;const int inf=1<<24;int cap[N][N];int flow[N][N];int n,m,s,t;int vis[N];int d[N];int cu原创 2015-11-06 16:16:26 · 473 阅读 · 0 评论 -
uva 10054 The Necklace 欧拉回路
...原创 2015-09-16 14:28:48 · 228 阅读 · 0 评论 -
uva 10881 Piotr's Ants 规律
。。。原创 2015-09-15 21:31:31 · 296 阅读 · 0 评论 -
uva 11300 Spreading the Wealth 中位数应用
。。。原创 2015-09-14 18:48:31 · 246 阅读 · 0 评论 -
uva 11988 Broken Keyboard (a.k.a. Beiju Text) 链表
。。。原创 2015-04-08 12:06:15 · 398 阅读 · 0 评论 -
uva 1658 Admiral 最小费最大流
。。。原创 2015-08-18 22:28:25 · 676 阅读 · 0 评论 -
uvalive 6957 Hyacinth 题目难理解
。。。原创 2015-08-27 10:30:47 · 680 阅读 · 1 评论 -
uvalive 6955 Finding Lines rand()应用
。。。原创 2015-08-27 13:26:19 · 508 阅读 · 0 评论 -
uva 10066 The Twin Towers
。。。原创 2015-02-24 10:51:04 · 827 阅读 · 0 评论 -
uva 10192 Vacation
。。。原创 2015-02-24 11:09:02 · 371 阅读 · 0 评论 -
uva 531 Compromise
。。。原创 2015-02-23 16:17:23 · 476 阅读 · 0 评论 -
uva 10404 Bachet's Game
。。。原创 2015-02-18 23:45:42 · 422 阅读 · 0 评论 -
uva 147 Dollars
。。。原创 2015-02-18 10:21:33 · 362 阅读 · 0 评论 -
uva 10763 Foreign Exchange
。。。原创 2015-02-09 12:21:16 · 382 阅读 · 0 评论 -
uva 10340 All in All
。。。原创 2015-02-09 11:59:04 · 367 阅读 · 0 评论 -
uva 10160 Servicing stations
参考uva 10160 Servicing Stations(DFS+剪枝)#include "stdio.h"#include "string.h"#include "algorithm"using namespace std;//map保存联通关系,vis保存是否有服务,son记录每个点与他联通点的个数int map[40][40],vis[40],son[40],n,m原创 2015-02-03 15:58:15 · 918 阅读 · 0 评论 -
uva 10905 Children's Game
。。。原创 2015-02-04 19:38:17 · 353 阅读 · 0 评论 -
uva 11205 The broken pedometer
。。。原创 2015-02-03 20:33:50 · 527 阅读 · 0 评论 -
uva 208 Firetruck
数据很强大原创 2015-02-01 16:34:46 · 367 阅读 · 0 评论 -
uva 539 The Settlers of Catan
dfs入门题原创 2015-01-30 11:37:44 · 453 阅读 · 0 评论 -
uva 146 ID Codes
水原创 2015-01-31 14:44:03 · 460 阅读 · 0 评论 -
uva 216 Getting in Line
一开始看错了原创 2015-01-31 16:28:31 · 435 阅读 · 0 评论