自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 关于除法取模的学习笔记

Problem DescriptionThe problem is simple:Give you two integers n and k, your task is to calculate the result of "(n1+n2+n3+...+nk ) % 1000000007".InputThere are multiple cases.Each case cont...

2018-11-08 21:09:54 362

原创 CF1037D Valid BFS? 题解

设立一个order队列 记录题给的顺序 然后进行BFS 若能完成BFS操作则输出yes 否则输出no#include<bitset>#include<map>#include<vector>#include<cstdio>#include<iostream>#include<cstring>#include&...

2018-09-06 15:35:51 252

原创 排序 HDU - 1106

输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。 你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。  Input输入包含多组测试用例,每组输入数据只有一行数字(数字之间没有空格),这行数字的长度不大于1000。  ...

2018-08-16 21:17:30 286

原创 HDU1032:The 3n + 1 problem(水)

Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of ...

2018-05-13 22:56:54 179

原创 HDU 1412(水)

给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素.Input每组输入数据分为三行,第一行有两个数字n,m(0<n,m<=10000),分别表示集合A和集合B的元素个数.后两行分别表示集合A和集合B.每个元素为不超出int范围的整数,每个元素之间有一个空格隔开.Output针对每组数据输出一行数据,表示合并后的集合,要求从小到大输出,每个元素之间有一个空格隔开...

2018-05-09 16:45:56 103

原创 HDU1005 规律题

#include<iostream>#include<cstdlib>#include<stdio.h>#include<algorithm>#include<cmath>#include<queue>#include<string>#include<string.h>#

2018-02-20 11:46:49 133

原创 HDU 1004 模拟

#include<iostream>#include<cstdlib>#include<stdio.h>#include<algorithm>#include<cmath>#include<queue>#include<string>#include<string.h>#

2018-02-20 11:45:59 154

转载 Exams CodeForces - 479C

#include <iostream>#include <cstdio>#include <algorithm>using namespace std;#define M 5009typedef struct{ int x,y;}node;node a[M];bool cmp(node a,node b){ if(a.x !=...

2018-01-27 11:32:25 181

转载 Sort the Array CodeForces - 451B

#include<bits/stdc++.h>using namespace std;#define LEN 100005typedef struct point{ int a, p; bool operator < (const point& p) const{ return a < p.a; }}point;po...

2018-01-27 11:30:41 136

原创 Lineland Mail CodeForces - 567A

题意:求a1.....an与其他数的最大差值和最小差值因为是严格递增的  注意左右端点的最大最小值就够了。#include<iostream>#include<stdio.h>#include<algorithm>#include<string.h>#include<math.h>using namespace std;boo...

2018-01-18 11:48:47 204

原创 Fedor and New Game CodeForces - 467B

题目大意:给定n,m,k,n种士兵,m个部队,兵种不同数量小于等于k的为友军。然后给出m+1行,前m行表示需要判定的部队,第m+1行Fedor的部队。(按照二进制形式给定)#include<iostream>#include<stdio.h>#include<algorithm>#include<string.h>#include<ma...

2018-01-18 10:10:34 219

原创 Codeforces-489C 题解

贪心算法题意:找到m位数且各位的数字相加为s;找最大值时,尽可能让9在高位后面尽可能补零;找最小值时,尽可能让9在个位,最高位为1;值得注意的是 m*9<s和m>=2&&s==0时要输出-1 -1  (被坑了QAQ)#include<iostream>#include<stdio.h>#include<algorithm>#in...

2018-01-17 20:57:33 1391

空空如也

空空如也

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

TA关注的人

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