二分
linmory
头疼....太难了
展开
-
codeforces-551C GukiZ hates Boxes
GukiZ hates BoxesProfessor GukiZ is concerned about making his way to school, because massive piles of boxes are blocking his way.In total there are n piles of boxes, arranged in a line, from left to ...原创 2017-12-03 14:11:16 · 239 阅读 · 0 评论 -
二分
二分法 D - 又是一道签到题Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 2019Description 有n(n<=100)个整数,已经按照从小到大顺序排列好,现在另外给一个整数x,请将该数插入到序列中,并使原创 2016-11-25 21:45:58 · 283 阅读 · 0 评论 -
Kattis - speed
Need for SpeedSheila is a student and she drives a typical student car: it is old, slow, rusty, and falling apart. Recently, the needle on the speedometer fell off. She glued it back on, but she might...原创 2018-04-15 21:34:53 · 317 阅读 · 0 评论 -
排序问题
给出N个整数,对着N个整数进行排序Input第1行:整数的数量N(1 <= N <= 50000)第2 - N + 1行:待排序的整数(-10^9 <= A[i] <= 10^9)Output共n行,按照递增序输出排序好的数据。Input示例554321Output示例12345排序方法有很多,冒泡排序,选择排序,归并排序,快速排序。冒泡排序和选择排序都...原创 2018-07-12 18:36:37 · 144 阅读 · 0 评论 -
逆序数
1019 逆序数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。Input第1行:N,N为序列的长度(n &l...原创 2018-07-12 18:39:41 · 276 阅读 · 0 评论 -
hdu6406----Taotao Picks Apples(模拟)
Taotao Picks Apples Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1904 Accepted Submission(s): 597 Problem Description...原创 2018-08-18 11:15:42 · 192 阅读 · 0 评论 -
CodeForces - 825D
You are given two strings s and t consisting of small Latin letters, string s can also contain '?' characters.Suitability of string s is calculated by following metric:Any two letters can be swapp...原创 2018-10-17 15:30:17 · 185 阅读 · 0 评论 -
E - Plants vs. Zombies ZOJ - 4062
BaoBao and DreamGrid are playing the game Plants vs. Zombies. In the game, DreamGrid grows plants to defend his garden against BaoBao's zombies. Plants vs. Zombies(?)(Image from pixiv. ID: 21790160...原创 2018-12-12 14:02:51 · 277 阅读 · 0 评论