自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 CodeForces - 248C (几何)

几何问题,一晚上没看懂什么意思。。。需要用到点到直线的计算公式,d=|(Ax0+By0+C)/sqrt(A*A+B*B)| 直线Ax+By+C=0 点P (x0,y0)不是很会用那个画图工具,TUT然后截屏了。。。。。。TUTTUT代码 : #includeusing namespace std;int main(){ double a,b,c,x,y

2017-11-30 09:41:24 331

原创 CodeForces - 847B Preparing for Merge Sort

我就很好奇,为什么会有二分这种操作。。非常好奇,鬼能看出来他最后那个数字是递减的啊= =;然后迷之超时。然后看了一下lower_bound()的用法,这个序列是递减的,而一般lower_bound()查找的都是从小到大排序好的序列,所以只需要在最后面加一个greater()就可以了。像这样:lower_bound(a,a+n,greater())-a;  头文件#include

2017-11-27 19:13:37 200

原创 PAT 1099. Build A Binary Search Tree (30)建立二叉排序树

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key.The right subt

2017-11-23 16:25:49 130

原创 PAT1049. Counting Ones (30)数1问题

The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1's i

2017-11-19 20:22:52 160

原创 PAT 1107. Social Clusters (30)

When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A "social cluster" is a set of people who have some of th

2017-11-19 15:26:23 136

原创 1097. Deduplication on a Linked List (25)

给定一个带整数键值的单链表L,本题要求你编写程序,删除那些键值的绝对值有重复的结点。即对任意键值K,只有键值或其绝对值等于K的第一个结点可以被保留。同时,所有被删除的结点必须被保存在另外一个链表中。例如:另L为21→-15→-15→-7→15,则你必须输出去重后的链表21→-15→-7、以及被删除的链表-15→15。输入格式:输入第一行包含链表第一个结点的地址、以及结点个数N(5 

2017-11-15 21:04:32 134

原创 PAT 甲级 1041 Linked List Sorting (25)

时间限制 1000 ms内存限制 65536 KB代码长度限制 100 KB判断程序 Standard(来自小小)题目描述A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure

2017-11-15 19:38:46 388

原创 PAT 1056. Mice and Rice (25)

题目描述Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as mu

2017-11-13 20:04:12 122

空空如也

空空如也

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

TA关注的人

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