acm
GilgameshG
00000
展开
-
杭电acm-1002题-大数加法
# include <stdio.h> # include <string.h> # include <stdlib.h> void calculate(int num,int last) { char a[1000] = {'0'}; char b[1000]={'\0'}; char sum[1000]={0}; char* max_array = NULL;原创 2017-03-06 22:10:37 · 418 阅读 · 0 评论 -
杭电OJ-1285(队伍排名)
题目链接 因为输出格式不对错了几次,用到了拓扑排序的思路,不过写本题目的时候最耗时间的是研究自定义优先队列排序的方法。#include<iostream> #include<queue> #include<functional> using namespace std; typedef struct Node { queue<int> list;//记录后继结点 int degre原创 2017-10-17 21:44:55 · 545 阅读 · 0 评论 -
hdu2544-最短路径spaf
spaf算法解题#include<iostream> #include<queue> using namespace std; int g[101][101]={0}; bool is[101] ; int dis[101]; void spaf(int n,int w) { queue<int> queue; queue.push(w); memset(is,false,s原创 2017-11-10 19:53:05 · 428 阅读 · 0 评论 -
hdu-1233最小生成树并查集求解
# include <iostream> # include <algorithm> using namespace std;int root[110] = {0}; typedef struct Node { int a; int b; int c;}Node; Node bian[5100]; bool comp(Node a,Node b) { return a原创 2017-11-12 19:41:11 · 242 阅读 · 0 评论 -
[蓝桥杯] 剪邮票问题
从网上看到的别人的代码,稍微修改了一下,先看一下原博主怎么写的吧 **原博主问题描述与代码** 下面的代码 我只是加了一些注释,少于了两个把邮票块数值转换为行列坐标的数组,因为水平不够,那两个数组的使用让我理解起来很困难,所以我就去掉了# include <iostream> # include <cstring> using namespace std; int result = 0; int原创 2018-03-10 10:19:00 · 516 阅读 · 0 评论