上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 35 下一页
摘要: Problem DescriptionThe three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this ... 阅读全文
posted @ 2014-04-25 22:51 beautifulzzzz 阅读(516) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 仪表盘 3 */ 4 void DrawArcScale(void) 5 { 6 int x0 = 160; 7 int y0 = 180; 8 int i; 9 char ac[4];10 GUI_SetBkColor(GUI_WHITE);... 阅读全文
posted @ 2014-04-22 22:37 beautifulzzzz 阅读(958) 评论(1) 推荐(0) 编辑
摘要: 1 /* 2 颜色条 3 */ 4 void ShowColorBar(void) 5 { 6 int x0 = 60, y0 = 40, yStep = 15, i; 7 int NumColors = LCD_GetDevCap(LCD_DEVCAP_NUMCOLORS); 8... 阅读全文
posted @ 2014-04-22 22:34 beautifulzzzz 阅读(829) 评论(0) 推荐(0) 编辑
摘要: Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径... 阅读全文
posted @ 2014-04-18 22:13 beautifulzzzz 阅读(706) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGiven 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)... 阅读全文
posted @ 2014-04-18 21:23 beautifulzzzz 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 #define maxn 50 5 int n;//维数 6 double a[maxn][maxn];//系数矩阵 7 double b[maxn];//b向量 8 double kc=0.000001... 阅读全文
posted @ 2014-04-17 14:13 beautifulzzzz 阅读(2333) 评论(0) 推荐(0) 编辑
摘要: >______<:稀疏矩阵Ø 在MATLAB中,可以用满矩阵存储方式和稀疏矩阵存储方式来存储矩阵。Ø 若一个矩阵只有少数的元素非零,称为稀疏矩阵。稀疏矩阵非零元素及其对应的下标来表示。Ø 用户可以创建双精度、复数和逻辑等类型的稀疏矩阵。1、稀疏矩阵的创建 Ø在MATLAB中,用函数sparse()... 阅读全文
posted @ 2014-04-16 10:56 beautifulzzzz 阅读(3447) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 二分法实验 3 1、设a[0:n-1]是一个已排好序的数组. 4 请改写二分搜索算法,使得当搜索元素x不在数组中时, 5 返回小于x的最大元素的位置I和大于x的最大元素位置j. 6 当搜索元素在数组中时,I和j相同,均为x在数组中的位置. 7 2、设有n个不同的整数排好序后存放于t[... 阅读全文
posted @ 2014-04-14 20:59 beautifulzzzz 阅读(2826) 评论(0) 推荐(0) 编辑
摘要: 1 ;程序设计的要求:通过键盘给一个四位的16进制数,程序把它转换成10进制数,并显示出来。 2 ;把输入的4位16进制数以10十进制的值存放到变量num中,注意num可能会有5位数。所以下面 3 ;就通过÷,%(10000,1000,100,10)来得到每一位数,即十进制数. 4 ;... 阅读全文
posted @ 2014-04-14 19:42 beautifulzzzz 阅读(5610) 评论(1) 推荐(1) 编辑
摘要: VirusWe have a log file, which is a sequence of recorded events. Naturally, the timestamps are strictly increasing.However, it is infected by a virus... 阅读全文
posted @ 2014-04-07 22:13 beautifulzzzz 阅读(752) 评论(0) 推荐(0) 编辑
摘要: Updating a DictionaryIn this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative i... 阅读全文
posted @ 2014-04-07 21:47 beautifulzzzz 阅读(554) 评论(0) 推荐(0) 编辑
摘要: Robot InstructionsYou have a robot standing on the origin of x axis. The robot will be given some instructions. Your task is to predict its position ... 阅读全文
posted @ 2014-04-07 21:41 beautifulzzzz 阅读(1088) 评论(0) 推荐(0) 编辑
摘要: Three FamiliesThree families share a garden. They usually clean the garden together at the end of each week, but last week, family C was on holiday, ... 阅读全文
posted @ 2014-04-07 21:35 beautifulzzzz 阅读(700) 评论(0) 推荐(0) 编辑
摘要: >_>8; 51 n=y; 52 Write_Cmd(0x00,x); 53 Write_Data(m,n); 54 55 } 56 57 /*---------------------------------------------------------------- 58 写16位数据 59 ----------------------------------------------------------------*/ 60 void Write_Data_U16(unsigned int y) 61 { 62 unsigned char... 阅读全文
posted @ 2014-04-06 21:40 beautifulzzzz 阅读(1885) 评论(0) 推荐(0) 编辑
摘要: >__<:则模仿上一个博客里彩屏模版里的的GB1616的代码有: 1 #include "GB3232.h" //32*32汉字字模 2 3 void PutGB3232(unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor){ 4 unsigned int i,j,k; 5 6 LCD_SetPos(x, x+32-1,y, y+32-1); 7 8 for (k=0;k<5;k++) { //5标示... 阅读全文
posted @ 2014-04-04 21:16 beautifulzzzz 阅读(1756) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 35 下一页