随笔分类 - 图论
摘要:->戳我进原题 走廊泼水节 测试点数 10 总时限 10 s 总内存 256 MiB 通过率 41/55 描述 【简化版题意】给定一棵 \(N\) 个节点的树,要求增加若干条边,把这棵树扩充为完全图,并满足图的唯一最小生成树仍然是这棵树。求增加的边的权值总和最小是多少。 我们一共有 \(N\) 个O
阅读全文
摘要:->戳我进原题 Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 65211 Accepted: 24284 Description While exploring his many farms, Farmer
阅读全文
摘要:->戳我进原题 西瓜种植 时间限制:1000ms 空间限制:131072KiB 题目背景 笨笨:小西瓜,小西瓜~ 路人甲:不会呀,这西瓜明明就大着啊…… 笨笨:那……大西瓜,大西瓜~ 路人甲:这么快就改口了…… 笨笨:西瓜西瓜可爱的西瓜 题目描述 笨笨种了一块西瓜地,但这块西瓜地的种植范围是一条直线
阅读全文
摘要:->戳我进原题 Intervals Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 30393 Accepted: 11768 Description You are given n closed, integer interva
阅读全文
摘要:->戳我进原题 Elevator Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 1572 Accepted: 424 Case Time Limit: 2000MS Description Edward works as an
阅读全文
摘要:->戳我进原题 [Usaco2015 dec]Max Flow Time Limit: 10 Sec Memory Limit: 128 MB Submit: 576 Solved: 386 ### Description Farmer John has installed a new system
阅读全文
摘要:->点我进原题 [USACO10DEC]苹果交货Apple Delivery 时空限制 1000ms / 128MB 贝西有两个又香又脆的红苹果要送给她的两个朋友。当然她可以走的$C$($1现在,贝西要从牧场$PB$开始给$PA_1$和$PA_2$牧场各送一个苹果($PA_1$和$PA_2$顺序可以
阅读全文
摘要:->点我进原题 [Usaco2011 Jan]道路和航线 Time Limit: 10 Sec Memory Limit: 259 MB Submit: 1116 Solved: 410 ### Description Farmer John正在一个新的销售区域对他的牛奶销售方案进行调查。他想把牛奶
阅读全文
摘要:->戳我进原题 [网络流24题] 魔术球问题 时空限制:1000ms / 128MB 问题描述 假设有n根柱子,现要按下述规则在这n根柱子中依次放入编号为1,2,3,...的球。 (1)每次只能在某根柱子的最上面放球。 (2)在同一根柱子中,任何2个相邻球的编号之和为完全平方数。 试设计一个算法,计
阅读全文
摘要:跑两遍dfs include include include include include include using namespace std; const int N =100010; const int inf =1e9+7; struct edge{ int to,nxt,w; }e[N
阅读全文
摘要:``` #include #include #include using namespace std; void beford(string in,string after){ if(in.size()){ char ch=after[after.size()-1]; cout>inord>>aftord; beford(inord,aftord); return 0; } ```
阅读全文
摘要:``` include include include include include include define rg register using namespace std; inline int read(){ rg int f=0,x=0; rg char ch=getchar(); w
阅读全文
摘要:``` include include include include include include using namespace std; const int N = 110,M = 110; struct edge{ int to,nxt; }e[M]; //边的集合 int vis[N];
阅读全文
摘要:``` include include include include include include using namespace std; int n,m,e[1010][1010]; inline int read(){ int f=0,x=0; char ch=getchar(); whi
阅读全文
摘要:``` include include include include include include include include include include define N 400010 using namespace std; struct edge{ int u,v,w; } e[N
阅读全文
摘要:``` include include include include include include include include include define MaxNode 100001 define inf 1e9+7 using namespace std; int n,m,tot=1,
阅读全文
摘要:``` include include include include include include define N 500010 define inf 2147483647 using namespace std; int n,m,s,dis[N],head[N],tot; bool vis[
阅读全文
摘要:``` include include include include include define N 100010 define rint register int define inf 2147483647 using namespace std; struct edge{ int num,v
阅读全文

浙公网安备 33010602011771号