03 2013 档案
摘要:数据传递类指令 以累加器为目的操作数的指令 MOV A,Rn MOV A,direct MOV A,@Ri MOV A,#data 第一条指令中,Rn代表的是R0-R7。第二条指令中,direct就是指的直接地址,而第三条指令中,就是我们刚才讲过的。第四条指令是将立即数data送到A中。下面我们通过一些例子加以说明: MOV A,R1 ;将工作寄存器R1中的值送入A,R1中的值保持不变。 MOV A,30H ;将内存30H单元中的值送入A,30H单元中的值保持不变。 MOV A,@R1 ;先看R1中是什么值,把这个值...
阅读全文
摘要:Problem C: WERTYUA common typing error is to place the hands on the keyboard one row to the right of the correct position. So "Q" is typed as "W" and "J" is typed as "K" and so on. You are to decode a message typed in this manner.Input consists of several line
阅读全文
摘要:Problem Description读入N名学生的成绩,将获得某一给定分数的学生人数输出。Input测试输入包含若干测试用例,每个测试用例的格式为第1行:N第2行:N名学生的成绩,相邻两数字用一个空格间隔。第3行:给定分数当读到N=0时输入结束。其中N不超过1000,成绩分数为(包含)0到100之间的一个整数。Output对每个测试用例,将获得给定分数的学生人数输出。Sample Input3 80 60 9060 2 85 66 05 60 75 90 55 7575 0Sample Output102 题意:略!分析:运用数组,将给定的分数与数组中存储的数据相比较即可。AC源代码(C语言
阅读全文
摘要:Problem Description读入两个小于10000的正整数A和B,计算A+B。需要注意的是:如果A和B的末尾K(不超过8)位数字相同,请直接输出-1。Input测试输入包含若干测试用例,每个测试用例占一行,格式为"A B K",相邻两数字有一个空格间隔。当A和B同时为0时输入结束,相应的结果不要输出。Output对每个测试用例输出1行,即A+B的值或者是-1。Sample Input1 2 1 11 21 1 108 8 2 36 64 3 0 0 1Sample Output3 -1-1 100题意:略!分析:a和b对10^k求模,然后判断这两个数是否相等,如果
阅读全文
摘要:Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and find the result.This year, they decide to l
阅读全文