
c++算法
Awiny_ImageProcess
没有当Engineer的实力,也要有AdEngineer的追求。
展开
-
scanf("%d%d",&x,&y);与scanf("%d,%d",&x,&y);的区别 c语言输入注意
输入的时候要用scanf("%d%d",&x,&y);;原创 2014-04-14 01:39:37 · 7087 阅读 · 0 评论 -
sicily 1093
1093. Air Express Total:6285Accepted:1903Rating:2.5/5.0(13 votes)012345原创 2014-02-28 22:12:18 · 1191 阅读 · 0 评论 -
1000 日期计算问题
Description试用 C++的类来表示日期,给定 2 个日期 yyyy.mm.dd 求两个日期间相差的天数。Input 第 1 行为一个正整数T,表示测试数。对于每个测试点,第 1 行与第 2 行分别有两个日期 yyyy.mm.dd。Output 对于每个测试点,输出一行数字,表示相差的天数。Sample Input Copy sa原创 2014-02-28 22:28:21 · 928 阅读 · 0 评论 -
SICILY 1129. ISBN
1129. ISBNTotal:4941Accepted:1697Rating:2.0/5.0(15 votes)012345 Time Limit: 10sec Memory Limit:原创 2014-03-01 00:47:18 · 1098 阅读 · 0 评论 -
sicily1145. 校门外的树
1145. 校门外的树ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription某校大门外长度为L的马路上有一排树,每两棵相邻的树之间的间隔都是1米。我们可以把马路看成一个数轴,马路的一端在数轴0的位置,另一端在L的位置;数轴上的每个整数点,即0,1,2,……,L,都种有一棵树。由于马路上有一些区域要用来建地铁原创 2014-03-01 01:32:49 · 846 阅读 · 0 评论 -
1000. 用指针方法处理数的排序
Description输入3个整数,按从大到小的书序输出。Input12 8 23Output23 12 8Sample Input Copy sample input to clipboard10 8 9Sample Output10 9 8Problem Source: 指针#includeusing原创 2014-03-01 12:45:00 · 788 阅读 · 0 评论 -
sicily 1001. 整数调换位置
Description有N个整数,前面各数顺序后移M个位置,后面M个数变成前M个数,用函数和指针实现,输入这N个整数和输出调整后的整数。Input1 2 3 4 5 6 7Output6 7 1 2 3 4 5Sample Input Copy sample input to clipboard1 2 3 4 5 6 7Sam原创 2014-03-01 19:45:36 · 731 阅读 · 0 评论 -
sicily 1003. 统计各种字符的数量
Description输入一行文字,找出大写字母,小写字母,空格,数字以及其他字符的数量InputSYSU hello 123 ???Outputuppercase:4lowercase:5number:3blank:3others:3 Sample Input Copy sample input to clipboard原创 2014-03-01 23:25:16 · 907 阅读 · 0 评论 -
sicily 1004. 密码问题
Description有一行电文,按下列规律译成密码:A->Z a->zB->Y b->yC->X c->x.....即第一个字母变成第26个字母,第i个字母变成第(26-i+1)个字母。非字母字符不变。要求编程将密码翻译回原文,并输出原文InputR ORPV ZYXOutputI LIKE ABC Sample原创 2014-03-02 14:19:03 · 972 阅读 · 0 评论 -
约瑟夫问题 循环链表实现和数字处理实现
#include#include //指针初始化都是 NULL using namespace std;typedef struct person{int data;person *next;}person;person * create( int n ) //构建循环链表 {person *temp =NULL; //建一个指针 if原创 2014-04-11 00:43:26 · 847 阅读 · 0 评论 -
指针交换三个数 排序输出
#include//void swap(int *p1,int *p2) {int p; p=*p1; *p1=*p2; *p2=p; }main(){ int n1,n2,n3; int *p1,*p2,*p3; p1=&n1; p2=&n2; p3=&n3; printf("input three inte原创 2014-04-14 01:20:33 · 1125 阅读 · 0 评论 -
sicily 1001. To and Fro
Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra原创 2014-02-28 22:19:22 · 825 阅读 · 0 评论