摘要: 题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=33描述 在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为: 10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4 输入 直接输入方陈的维数,即n的值。(n #include static void setArr(int **arr,... 阅读全文
posted @ 2016-01-19 09:41 sharpfeng 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=31描述 设计一个从5个整数中取最小数和最大数的程序 输入 输入只有一组测试数据,为五个不大于1万的正整数 输出 输出两个数,第一个为这五个数中的最小值,第二个为这五个数中的最大值,两个数字以空格格开。 样例输入 1 2 3 4 5 样例输出 1 5#include #define... 阅读全文
posted @ 2016-01-19 09:40 sharpfeng 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://blog.csdn.net/sevenmit/article/details/8231994描述Mr. B is a famous music composer. One of his most famous work was his set of preludes. The... 阅读全文
posted @ 2016-01-19 09:39 sharpfeng 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=24描述 现在给出你一些数,要求你写出一个程序,输出这些整数相邻最近的素数,并输出其相距长度。如果左右有等距离长度素数,则输出左侧的值及相应距离。 如果输入的整数本身就是素数,则输出该素数本身,距... 阅读全文
posted @ 2016-01-19 09:38 sharpfeng 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=22描述 现在给你N个数(0 #define true 1 #define false 0 static int isPrimeNumber(int number); int main() { ... 阅读全文
posted @ 2016-01-19 09:37 sharpfeng 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=13描述 无穷数列1,1,2,3,5,8,13,21,34,55...称为Fibonacci数列,它可以递归地定义为 F(n)=1 ...........(n=1或n=2) F(n)=F(n-1)... 阅读全文
posted @ 2016-01-19 09:36 sharpfeng 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=11描述 有一个整型偶数n(2 int main() { int readLen = 0; scanf("%d",&readLen); getchar(); while(readLe... 阅读全文
posted @ 2016-01-19 09:35 sharpfeng 阅读(608) 评论(0) 推荐(0) 编辑
摘要: 题目地址: http://acm.nyist.net/JudgeOnline/problem.php?pid=4描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符。输入 第一行输入一个数N,表示有N组测试数据。后面的N行输入多组数据,每组输入数据都是占一行,有三个字... 阅读全文
posted @ 2016-01-19 09:34 sharpfeng 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目地址: http://acm.nyist.net/JudgeOnline/problem.php?pid=1描述 此题为练手用题,请大家计算一下a+b的值输入 输入两个数,a,b 输出 输出a+b的值 样例输入 2 3 样例输出 5C语言版: #include int main() { int ... 阅读全文
posted @ 2016-01-19 09:32 sharpfeng 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 每天一ACM题目,如果问题较为复杂,改为2-3天。训练地址:南阳理工ACMhttp://acm.nyist.net/JudgeOnline/problemset.php南京邮电大学ACMhttp://acm.njupt.edu.cn/acmhome/problemList.do?method=sho... 阅读全文
posted @ 2016-01-19 09:23 sharpfeng 阅读(160) 评论(0) 推荐(0) 编辑