自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

酱油拌面

What if it rained? We didn't care

  • 博客(6)
  • 问答 (1)
  • 收藏
  • 关注

原创 冒泡排序

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

2016-03-31 23:55:31 214

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

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

2016-03-29 19:47:42 1671

原创 CodeForces 546B

Soldier and BadgesTime Limit:3000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uColonel has n badges. He wants to give one badge to every of his n soldiers. Each badge has a coolness fac

2016-03-27 01:07:15 764

原创 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 little polar bear. He has recently learnt about the binar

2016-03-27 00:37:05 457

原创 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 the monster each have 3 attributes: hitpoints (HP), o

2016-03-19 22:46:57 553

原创 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 exactly two people. You are given the strength of e

2016-03-19 14:03:02 584

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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