- 博客(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
空空如也
数据表记录删除问题(假删除?)
2021-06-29
TA创建的收藏夹 TA关注的收藏夹
TA关注的人