![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_Steps
文章平均质量分 73
UnICorN21
这个作者很懒,什么都没留下…
展开
-
CodeForce 279C
好不容易AC了这题(果然是菜鸟-_-|||),,先记录下来再说。 先来看题目: C. Ladder time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You've go原创 2013-03-11 23:35:13 · 762 阅读 · 0 评论 -
并查集
#define MAX 10000 int set[MAX]; int rank[MAX]; // Initialize void init(){for (int i = 0; i < MAX; ++i) set[i] = i;} // Find int findSet(int v){ if (set[v] != v) set[v] = findSet(set[v]); return se原创 2013-03-27 23:41:13 · 547 阅读 · 0 评论 -
HDOJ 1874
// 单源最短路径#include #define MAXN 205 using 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 · 608 阅读 · 0 评论 -
hdu 1009
Problem Description FatMouse 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 · 573 阅读 · 0 评论 -
乘积的末3位
题目描述:输入若干个整数(可以是正数,负数或者0),输出他们的乘积的末3位。这些整数中会混入一些由大写字母组成的字符串,你的程序应当忽略他们。提示:试试看,在执行scanf("%d")时输入一个字符串会怎样? 题解: 先来看看最可能想到的解法:显然直接写一个转化函数改string为int即可,然后每次转成int后只保留后3位 #include #include #include原创 2013-07-11 11:15:21 · 1003 阅读 · 0 评论