自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 关于尝试spinner中遇到的小问题

在strings.xml.文件中想要声明多个选项,但是一直报错:我本来是这样写的:

2014-08-26 22:07:58 441

原创 线性布局--简单计算器的布局

如果是安卓4

2014-08-14 13:12:27 1589 1

原创 安卓开发中遇到的问题

1.在创建新ADT时,点了OK却没反应:原因:

2014-08-07 15:59:17 493

原创 UVA 118 Mutant Flatworld Explorers

简单的模拟题,但是还是写了很久,写了快一个小时了!不过,一次就AC!还是很值得深夜来写代码的!读题读细了就差不多ok,剩下的工作也就是把代码敲出来了,没有什么难以理解的算法!注意点:如果矩形网格边界某点,有Robot曾经在这个点LOST,之后的Robot如果也在这个点想要LOST,则忽略这个F操作,但是后面的操作还是继续模拟的!题目只是要求不能在同一个位置有两个Robot掉下去!所以可

2014-02-08 00:12:09 523

原创 UVA114 Simulation Wizardry

//题目就不附加了,很累!//努力AC!每天AC!#include#include#include#includeusing namespace std;int x_bound,y_bound;int grid[60][60];int wall_cost;int bumpers_num;int bumpers_value[100][100],bumpers_cost[10

2014-02-04 23:11:48 718

原创 UVA133 The Dole Queue

BackgroundIn a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants will be plac

2014-02-03 23:55:34 522

原创 UVA120 Stacks of Flapjacks

BackgroundStacks and Queues are often considered the bread and butter of datastructures and find use in architecture, parsing, operating systems, anddiscrete event simulation. Stacks are also impo

2014-02-03 21:54:03 619

原创 [dp专题]一维子序列max sum

题目:Time Limit:1000MS    Memory Limit:32768KBDescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7),

2014-02-01 18:33:12 420

原创 积木问题

#include#include#include#includeusing namespace std;struct command{ int number;//command number int op1; int op2;};int blocks[30][30];void move_onto(struct command cmd,int blocksnumber);v

2014-01-25 09:48:45 708

原创 sicily 1027. MJ, Nowhere to Hide

#include#include#includeusing namespace std;struct bbs{ string bbs_id; string id_add; string Majia; int index;};void selectsort(struct bbs test[100],int num);bool issmaller(stri

2014-01-24 11:22:44 645

原创 sicily1007. To and Fro

sicily1007.To and Fro就是将输入的字符串进行解码。译码方式为:原字符串为:toioynnkpheleaigshareconhtomesnlewx译成:toioyhpknneleairahsgeconhsemotnlewx(是竖着看的,x是补上去的!)所以问题就看成了把字符串按照一定的格式转换成二维矩阵!

2014-01-23 20:22:24 806

原创 几个普通的排序算法

1.插入排序:原理援引百度百科:百度百科_插入排序算法代码:void insert_sort(int *data,int length){coutdata(data,length); int sort_index=1; int temp; for(;sort_index<length;sort_index++) { if(data[sort_index]<data[so

2014-01-10 08:58:21 603

原创 sicily 1509. Rails

注意输出格式就好!水题!经典的模拟栈,出栈,入栈!#include #include using namespace std;int main(){ int num; int coach[1000]; while(cin >> num && num != 0) { while(cin >> coach[0] && coach[0] != 0) { stack train

2014-01-01 19:00:50 469

原创 sicily 1093. Air Express

水题,被格式坑了两次!#includeusing namespace std;int main(){ int w1,rate1,w2,rate2,w3,rate3,rate4; int cost; int best2,best3,best4; int i=1; while(cin >> w1) { int w; cin >> rate1;

2014-01-01 18:37:42 529

原创 sicily 1134

#include #include #include using namespace std;struct child{ int hand; int need; bool operator<(const child & one)const { if(need < one.need) return true;

2013-12-29 20:10:05 414

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除