- 博客(3)
- 收藏
- 关注
原创 USACO 灌水 (最小生成树)
http://www.luogu.org/problem/show?pid=1550# 最小生成树,加一个与所有点相连的点,边权是w[i],然后随便打个kruskal就A了。。。#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct edge{
2016-02-29 23:10:50 334
原创 USACO 回家 (最短路)
http://www.luogu.org/problem/show?pid=1529# 最短路裸题,一开始想都没想就打了个SPFA,还因为没看清是无向图卡了半天,结果发现Floyd就行orz。。。 SPFA(蠢)#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<cstring> #de
2016-02-27 11:34:51 462
原创 洛谷 开学赛
刷一波水比赛找回点感觉。。。 http://www.luogu.org/contest/show?tid=414 赛题 #1:不要把球传给我 找规律水题#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n,s; int main() { scanf("%d",&n);
2016-02-27 10:08:30 246
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人