ACM_Steps
文章平均质量分 73
UnICorN21
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CodeForce 279C
好不容易AC了这题(果然是菜鸟-_-|||),,先记录下来再说。先来看题目:C. Laddertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've go原创 2013-03-11 23:35:13 · 887 阅读 · 0 评论 -
并查集
#define MAX 10000int set[MAX];int rank[MAX];// Initializevoid init(){for (int i = 0; i < MAX; ++i) set[i] = i;}// Findint findSet(int v){ if (set[v] != v) set[v] = findSet(set[v]); return se原创 2013-03-27 23:41:13 · 621 阅读 · 0 评论 -
HDOJ 1874
// 单源最短路径#include #define MAXN 205using namespace std;long map[MAXN][MAXN], dis[MAXN], pre[MAXN], vis[MAXN];void dijkstra(const int &s, const int &n){ memset(dis, 0x3f, sizeof(dis)); for (int i原创 2013-04-09 00:04:05 · 709 阅读 · 0 评论 -
hdu 1009
Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room con原创 2013-05-07 23:45:08 · 675 阅读 · 0 评论 -
乘积的末3位
题目描述:输入若干个整数(可以是正数,负数或者0),输出他们的乘积的末3位。这些整数中会混入一些由大写字母组成的字符串,你的程序应当忽略他们。提示:试试看,在执行scanf("%d")时输入一个字符串会怎样?题解:先来看看最可能想到的解法:显然直接写一个转化函数改string为int即可,然后每次转成int后只保留后3位#include #include #include原创 2013-07-11 11:15:21 · 1122 阅读 · 0 评论
分享