自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

liluoyu_1016的博客

Act like a lady, think like a man.

  • 博客(18)
  • 收藏
  • 关注

原创 CodeForces - 698A Vacations 贪心 dp

Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a contest was

2017-07-27 20:36:16 299

原创 hdu 1213 How Many Tables 并查集

Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, a

2017-07-26 21:15:42 240

原创 poj 3264 Balanced Lineup 线段树

For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things

2017-07-26 10:18:31 203

原创 51 nod 1267 4个数和为0

给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。 Input 第1行,1个数N,N为数组的长度(4 第2 - N + 1行:Ai(-10^9 iOutput 如果可以选出4个数,使得他们的和为0,则输出"Yes",否则输出"No"。 Sample Input 5 -1 1 -5 2 4 Sample Output Yes

2017-07-25 19:18:27 202

原创 hdu 2098

#include #include using namespace std; const int M=10090; int a[M]; int main() { memset(a,0,sizeof(a)); a[1]=1; for(int i=2;i<M;i++) { for(int j=2*i;j<M;j+=i) a[j]=1;

2017-07-24 21:33:58 190

原创 hdu 2099

Problem Description 一个整数,只知道前几位,不知道末二位,被另一个整数除尽了,那么该数的末二位该是什么呢?   Input 输入数据有若干组,每组数据包含二个整数a,b(0   Output 对应每组数据,将满足条件的所有尾数在一行内输出,格式见样本输出。同组数据的输出,其每个尾数之间空一格,行末没有空格。   Sample Input 20

2017-07-24 20:59:57 282

原创 HDU - 1698 Just a Hook 线段树 成段更新

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.

2017-07-24 19:55:15 252

原创 poj 3468 A Simple Problem with Integers 线段树 成段更新

A Simple Problem with Integers Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 112353   Accepted: 34930 Case Time Limit: 2000MS Description You have N

2017-07-22 16:14:33 221

原创 hdu 1754 I Hate It 线段树

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0 学生ID编号分别从1编到N。 第二

2017-07-22 10:06:36 187

原创 hdu 1166 敌兵布阵 线段树

C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。 中央情报局要研究敌人究竟演习什么战术

2017-07-22 08:39:42 249

原创 poj 2891 中国剩余定理 线性同余方程

Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following: Choose k different positive integers a1, a2, …, ak.

2017-07-21 17:45:22 349

原创 hdu 2030 汉字统计

汉字统计 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 46945    Accepted Submission(s): 25520 Problem Description 统计给定文本文件中汉字的个数。   I

2017-07-19 17:53:27 180

原创 poj 3258 River Hopscotch (二分与贪心)

Every year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a ro

2017-07-18 20:16:07 297

原创 Bit String Reordering

A题 点击打开链接 题意  输入给出n,m 输入n个数(数为0或1),输入m个数 m的数值是在这一段区间中数字相同的个数 ‘#include #include #include #include using namespace std; int a[15],b[15]; int main() { int n,m; int f,z; int c1,c2

2017-07-17 15:32:53 230

原创 zoj 2724 Windows Message Queue

Windows Message Queue Time Limit: 2 Seconds      Memory Limit: 65536 KB Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If so

2017-07-15 20:11:15 259

原创 poj 3320 尺取

题目链接 http://poj.org/problem?id=3320 题意 输入n个数,求最短的连续子序列(子序列包含所有的元素)的长度 题解      #include #include #include using namespace std; const int M=1000008; int a[M]; int t; void solve() { setcmp;

2017-07-15 17:02:15 218

原创 hdu 2021 发工资咯:)贪心

发工资咯:) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 62693    Accepted Submission(s): 33861 Problem Description 作为杭电的老师,最盼望的日子就是每月的8号

2017-07-15 11:15:35 321

原创 poj 3061 Subsequence 尺取

#include using namespace std; int min(int a,int b) { return a<b?a:b; } int a[100008]; int main() { int t; int sum,c,mins,f; scanf("%d",&t); while(t--) { int n,m;

2017-07-15 10:10:52 169

空空如也

空空如也

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

TA关注的人

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