酱油拌面

What if it rained? We didn't care

冒泡排序

冒泡排序,设输入n个数,存储在数组中,是把相邻两个元素进行大小比较,若按从小到大排序,即为每一轮排序把小的放前面,大的放后面,总共要进行n-1轮。下面是代码:#include <iostream> const int maxn = 1000+10; int arr[maxn];usin...

2016-03-31 23:55:31

阅读数 124

评论数 0

把一个无符号整数对应的十六进制的前八位和末八位交换,中间的十六位也同理互换

例如0xfabcde12,变换后为:12debcfa用位运算实现,再控制输出;代码如下:#include <stdio.h>using namespace std;int main() { unsigned int n; while(scanf("%d&quo...

2016-03-29 19:47:42

阅读数 770

评论数 0

CodeForces 546B

Soldier and BadgesTime Limit:3000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uColonel has n badges. He wants to give one badge t...

2016-03-27 01:07:15

阅读数 207

评论数 0

CodeForces 611B

New Year and Old PropertyTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uThe year 2015 is almost over. Limak is a l...

2016-03-27 00:37:05

阅读数 278

评论数 0

CodeForces 487A(水题)

Codeforces Round #278 (Div. 1)–AFight the MonsterA monster is attacking the Cyberland!Master Yang, a braver, is going to beat the monster. Yang and t...

2016-03-19 22:46:57

阅读数 325

评论数 0

Codeforces Round #320 (Div. 2) 579B(水)

题目意思如下: There is a programing contest named SnakeUp, 2n people want to compete for it. In order to attend this contest, people need to form teams of...

2016-03-19 14:03:02

阅读数 392

评论数 0

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