自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

NITjianbagengmu的博客

我只是用算法活跃我生锈的大脑

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

原创 Codeforces Round #441 D. Sorting the Coins

B. Sorting the Coins time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Recently, Dima met with Sasha in a philatelic store, and since then th

2017-10-29 20:33:21 258

原创 hdu_1698_线段树区间更新

注意, 1 ,区间查询写错,ll,rr和m的比较 2 ,lazy 标记算的长度在右区间不用加1更新分析,如果把线段树的每个点都更新,线段树就不再有logn的优势,所以有用一个标记表示在这个区间内有需要更新的,等你查询要用时再重新更新,#include<iostream>#include<cstdio>using namespace std;#define L l,m,u<<1#defin

2017-10-29 14:27:34 395

原创 Gym 100112H Horror List—深搜—bfs

It was time for the 7th Nordic Cinema Popcorn Convention, andthis year the manager Ian had a brilliant idea. In addition to thetraditional film program, there would be a surprise room where asmall g

2017-10-26 22:26:40 380

原创 Gym 100112D Doorman 模拟—水

The doorman Bruno at the popular night club Heaven is having a hard time fulfilling his duties. He was told by the owner that when the club is full, the number of women and men let into the club sho

2017-10-26 22:19:14 330

原创 Gym 100112C Cookie Selection ,不停插入输出中位数

As chief programmer at a cookie production plant you havemany responsibilities, one of them being that the cookies producedand packaged at the plant adhere to the very demandingquality standards of

2017-10-26 22:15:11 325

原创 Gym 100112A Aaah!

Jon Marius shouted too much at the recent Justin Bieber concert, and now needs to go to the doctor because of his sore throat. The doctor’s instructions are to say “aaah”. Unfortunately, the doctors

2017-10-26 22:09:25 451

原创 nitoj_202_二分——将区间分为三个部分

Sequence Time Limit: 500msMemory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Next 袁学长又来啦,这次他有一个长度为n的数列a1 a2 … an,他想知道能否在这个数列中找到三个数使它们的和为零,

2017-10-22 21:28:37 558

原创 hdu 1754_单点更新,区间查询,查询注意if(rr>m) if (ll <= m)

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

2017-10-22 10:00:31 230

原创 I - Por Costel and the Pairs Gym - 100923I _思维啊——可惜我现在还没

We don’t know how Por Costel the pig arrived at FMI’s dance party. All we know is that he did.The dance floor is hot because Por Costel broke the air conditioner. On the dance floor, the boys and girls

2017-10-21 22:24:16 544

原创 L - Por Costel and the Semipalindromes Gym - 100923L

Por Costel the pig, our programmer in-training, has recently returned from the Petrozaporksk training camp. There, he learned a lot of things: how to boil a cob, how to scratch his belly using his keyb

2017-10-21 20:07:17 591

原创 A - Por Costel and Azerah Gym - 100923A

Por Costel the Pig has received a royal invitation to the palace of the Egg-Emperor of Programming, Azerah. Azerah had heard of the renowned pig and wanted to see him with his own eyes. Por Costel, hav

2017-10-21 20:00:31 423

原创 hdu_1166_线段树_单点更新_区间求和

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

2017-10-21 10:56:53 182

原创 codeforce_876A_水

Winnie-the-Pooh likes honey very much! That is why he decided to visit his friends. Winnie has got three best friends: Rabbit, Owl and Eeyore, each of them lives in his own house. There are winding pat

2017-10-20 21:06:32 799

原创 codeforce_876B_ B - Divisiblity of Differences

You are given a multiset of n integers. You should select exactly k of them in a such way that the difference between any two of them is divisible by m, or tell that it is impossible.Numbers can be rep

2017-10-20 21:01:42 241

原创 codeforce_876C_Classroom Watch

C. Classroom Watch Eighth-grader Vova is on duty today in the class. After classes, he went into the office to wash the board, and found on it the number n. He asked what is this number and the teache

2017-10-19 19:22:04 295

原创 hdu_2609_循环字符串的最小字典序

Problem Description Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can equal by rotating ,we say th

2017-10-18 22:31:09 645

原创 c_/c++小函数笔记_持续更新

include&amp;amp;lt;cmath&amp;amp;gt;log 相关; 1 ,log10() 2 ,ln() 3 ,log(m)/log(n)=log(n,m);相上下取整 ceil(),floor()#include&amp;amp;lt;cstring&amp;amp;gt;1 ,strncmp() int strncmp ( const char * str1, const char * str2, size...

2017-10-18 18:49:56 219

原创 6-5 链表逆置(20 分)——头插或者重开新链表头插

6-5 链表逆置(20 分) 本题要求实现一个函数,将给定单向链表逆置,即表头置为表尾,表尾置为表头。链表结点定义如下:struct ListNode { int data; struct ListNode *next; }; 函数接口定义:struct ListNode *reverse( struct ListNode *head ); 其中head是用户传入的链表的

2017-10-14 20:38:54 7473 2

原创 6-4 建立学生信息链表(20 分)——尾插建链表_题程序访问是越界——真是醉了,你自己跑下是会抛出异常的

**6-4 建立学生信息链表(20 分)本题要求实现一个将输入的学生成绩组织成单向链表的简单函数。函数接口定义:void input();该函数利用scanf从输入中获取学生的信息,并将其组织成单向链表。链表节点结构定义如下:struct stud_node { int num; /*学号*/ char name[20]

2017-10-14 13:26:44 6729

原创 6-3 逆序数据建立链表(20 分)_头插法建链表

6-3 逆序数据建立链表(20 分) 本题要求实现一个函数,按输入数据的逆序建立一个链表。函数接口定义:struct ListNode *createlist(); 函数createlist利用scanf从输入中获取一系列正整数,当读到−1时表示输入结束。按输入数据的逆序建立一个链表,并返回链表头指针。链表节点结构定义如下:struct ListNode { int data;

2017-10-14 13:15:22 16750 4

原创 6-2 单链表结点删除(20 分)_单链表的删除节点的两种方式——还是双指针和链表覆盖好用

6-2 单链表结点删除(20 分) 本题要求实现两个函数,分别将读入的数据存储为单链表、将链表中所有存储了某给定值的结点删除。链表结点定义如下:struct ListNode { int data; ListNode *next; }; 函数接口定义:struct ListNode *readlist(); struct ListNode *deletem( struct

2017-10-14 12:56:24 9056

原创 pta_链表_递增的整数序列链表的插入_(插入创建操作)

6-1 递增的整数序列链表的插入(15 分) 本题要求实现一个函数,在递增的整数序列链表(带头结点)中插入一个新整数,并保持该序列的有序性。 函数接口定义:List Insert( List L, ElementType X ); 其中List结构定义如下: typedef struct Node *PtrToNode; struct Node { ElementType Dat

2017-10-14 09:55:43 2138

原创 链表笔记一

链表搞了两个星期,说实话让我不用模板我还真写不来创建链表结构体typedef struct library List;typedef struct library Position;struct library{ int offical_number; char book_name[100]; int book_num; List *next;};链表

2017-10-13 21:27:12 260

原创 hdu_4847_kmp_水

Wow! Such Doge! Time Limit: 1000msMemory Limit: 32768KB This problem will be judged on HDU. Original ID: 4847 64-bit integer IO format: %I64d Java class name: Main Prev Submit Status Statistics

2017-10-06 21:57:31 370

原创 codeforce_868B_模拟水

B. Race Against TimeHave you ever tried to explain to the coordinator, why it is eight hours to the contest and not a single problem has been prepared yet? Misha had. And this time he has a really stro

2017-10-06 11:01:06 228

原创 codeforce_868A_水_模拟

A. Bark to Unlock time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output As technologies develop, manufacturers are making the process of unlocki

2017-10-06 10:52:02 509

原创 codeforce_157A_水

A. Game Outcome time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Sherlock Holmes and Dr. Watson played some game on a checkered board n × n

2017-10-06 10:42:42 707

原创 codeforce_157B_水

B. TraceOne day, as Sherlock Holmes was tracking down one very important criminal, he found a wonderful painting on the wall. This wall could be represented as a plane. The painting had several concent

2017-10-06 10:40:43 268

原创 codeforce_157c_找两串字符串相同部分

MessageDr. Moriarty is about to send a message to Sherlock Holmes. He has a string s.String p is called a substring of string s if you can read it starting from some position in the string s. For exam

2017-10-06 10:38:44 363

原创 hdu_4430_策略二分经典

Today is Yukari’s n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it’s a big challenge for them to place n candles on the top of the

2017-10-03 09:53:38 384

原创 hdu_4422_题意很重要

roblem Description It’s yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags with her and used different bags to collect mushro

2017-10-03 09:45:45 301

原创 NIT_145_UVA_7324

A+B?很简单把,没错,这题就要这么做。Input 详细见输入案例。0 ≤ A , B ≤ 231-1。Output 输出详见案例。Hint Sample Input….x.xxxxx.xxxxx.x…x.xxxxx.xxxxx.xxxxx…….xxxxx.xxxxx.xxxxx ….x…..x…..x.x…x.x…..x………x…x…x…x.x…x.x…x ….x…..x…..x.x…x

2017-10-02 13:34:54 286

空空如也

空空如也

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

TA关注的人

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