小小粉丝度度熊 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1343 Accepted Submission(s): 435 Problem Description 度度熊喜欢着喵哈哈村的大明星——星星小姐.为什么度度熊会喜欢星星小姐呢?首先星星小姐笑起来非常动人,其次星星小姐唱歌也非常好听.但这都不是最重要的,最重要的是,星星…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6119 题意:中文题面. 解法:先处理可能交叉的区间,然后容易发现满足双指针的特性. //HDU 6119 #include <bits/stdc++.h> using namespace std; typedef long long LL; const int mod = 1e9+7; const int maxn = 1e5+10; pair<LL,LL>p[maxn]; LL n,…
题面 题意:在一大段时间里,告诉你,你签到了哪些区间,现在再给你m张补签卡,问你最多能实现连续签到多少天 题解:那些时间区间是有重叠的,所以我们先排序离散,并得到哪些区间是可以补签的,这样问题就变成,签过的天是0,没签过的是1,然后问区间和<=m的最大长度是多少,就转换为Poj-3061差不多一样的问题了(长度最长与最短). #include<bits/stdc++.h> #define N 100010 using namespace std; struct rec { int l,…
任意门:http://codeforces.com/contest/1073/problem/C C. Vasya and Robot time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has got a robot which is situated on an infinite Cartesian plane, i…
题目链接 Problem Description Alice are given an array A[1..N] with N numbers. Now Alice want to build an array B by a parameter K as following rules: Initially, the array B is empty. Consider each interval in array A. If the length of this interval is le…
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal length of the subsequence of consecutive elements o…
Bob’s Race Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Bob wants to hold a race to encourage people to do sports. He has got trouble in choosing the route. There are N houses and N - 1 roads…
Bob’s Race Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3905 Accepted Submission(s): 1245 Problem Description Bob wants to hold a race to encourage people to do sports. He has got trouble…