- 博客(3)
- 收藏
- 关注
原创 uva 11729 Commando War
贪心算法排序,最后加上长度 #include #include #include using namespace std; struct T{ int b,j; friend bool operator<(const T& p, const T& q){ return p.j > q.j; } }arr[1010]; int main(int argc, char
2014-06-08 23:02:51 501
原创 uva Children's Game
非常巧妙的题目,巧用cmp,注意cmp的重载 #include #include using namespace std; string a[55]; bool cmp(string a, string b){ return a+b > b+a; } int main(int argc, char const *argv[]) { int n; while(cin >
2014-06-08 23:01:08 659
原创 poj Agri-Net
prim算法 #include using namespace std; int m[101][101]; int prim(int k){ int ans = 0, dist[101]; bool vis[101]; for(int i = 1; i < k; i++){ dist[i] = m[0][i]; vis[i] = 0;
2014-06-01 22:22:54 571
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人