摘要: 阅读全文
posted @ 2012-07-10 18:24 lenohoo 阅读(151) 评论(0) 推荐(0) 编辑
摘要: http://acm.hrbeu.edu.cn/index.php?act=problem&id=1200题意:两种提问方式: P:输入:对于每一个数1,2……n他之前有几个数比他大 输出:输出n个数的排列方式 I:输入:输入n个数的排列方式 输出:对于每一个数1,2……n他之前有几个数比他大分析:模拟View Code #include <cstdio>#include <cstring>#include <iostream>#include <vector>using namespace std;#define re(i,n) for 阅读全文
posted @ 2012-07-10 12:51 lenohoo 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题意:类似 套汇,问货币轮流转移一圈会不会有盈利分析:有spfa算法,这里因为数据量比较小所以用了floydView Code #include <cstdio>#include <cstring>#include <iostream>using namespace std;#define re(i,n) for(int i=0;i<n;i++)#define re1(i,n) for(int i=1;i<=n;i++)#define clr(x,y) memset(x,y,sizeof(x))#define inf (1<<29)c 阅读全文
posted @ 2012-07-10 05:47 lenohoo 阅读(239) 评论(0) 推荐(0) 编辑