摘要: 看来没有选好数据类型,毕竟这道题目的数值要求挺高的我的代码没有通过,超时了说说中间遇到什么问题吧tem.list[tem.count]='0'+i; strcpy(ans.list,tem.list);这个代码花了我好几个小时的时间,一开始是直接ans.list[tem.count]='0'+i忽略了ans中tem.count之前的字符虽说超时了,但应该是对的(因为看了人家的代码)#include "iostream"#include "queue"#include "algorithm"#includ 阅读全文
posted @ 2013-09-29 21:00 龙城星 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 因为是三维,所以在变量上老是出问题,最后还是用了xyz来辨别,总算思维清晰了很多,一次性ACCEPT#include "iostream"#include "queue"#include "algorithm"#include "string.h"#define N 35using namespace std;struct Point{ int x,y,z;};int dir[6][3]={0,0,1, 0,0,-1, 0,1,0, 0,-1,0, 1,0,0, -1,0,0};int min(int a,int 阅读全文
posted @ 2013-09-29 14:00 龙城星 阅读(168) 评论(0) 推荐(0) 编辑