摘要: 1.sort函数-----2.cmpile error-----3.C++输出指定位数的小数4.runtime error:我的代码用了SPFA算法,不过runtime error了,可能是数组越界,死循环。但是我不知道怎么错的#include "iostream"#include "queue"#include "string.h"#include "algorithm"#include "cmath"#include using namespace std;struct{ int x,y;} 阅读全文
posted @ 2013-08-11 22:31 龙城星 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1.等级那里要用枚举,没有考虑到1(3)2(2)3(4)4(5)按照我的第一种做法的话,那么4号物品会被去掉,但是如果有一条线从3——2——1呢,3跟2不可以交易的2.用了chang[],一开始枚举等级的时候,没有考虑到一种情况枚举后,他会改变chang数组自己的代码(没有通过)#include "iostream"#include "queue"#include "string.h"using namespace std;#define INF 0x7fffffffstruct { int p,l,x;}thing[120];str 阅读全文
posted @ 2013-08-11 19:56 龙城星 阅读(181) 评论(0) 推荐(0) 编辑