自定义博客皮肤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的博客

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

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

原创 PAT (Advanced Level) 1001 A+B Format

1001 A+B Format (20 分)Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Speci...

2018-11-04 21:26:15 255

原创 不知道为什么的为什么

我最想的是什么仔细想了想,静悄悄的从这个世界无声无息的消失,不想有任何牵连,任何羁绊

2018-11-02 19:16:26 272

原创 ACM-ICPC 2018 徐州赛区网络预赛 Characters with Hash

Characters with Hash 问答 问题反馈 只看题面 26.98% 1000ms 262144K Mur loves hash algorithm, and he sometimes encrypt another one’s name, and call him with that encrypted value. For instance, he calls Kimu...

2018-09-11 21:47:58 293

原创 lca问题总结_第一版

到了大三本该是算法学完只剩缝缝补补的过程,但是到了最后回顾自己的大2和暑假,为了蝇头小利,去做自媒体,去卖东西,怎么讲是体验了社会,人心险恶,有关钱的事都不是好事,如果是朋友,我宁愿用这钱交个朋友,可是真的不缺这点钱,用心心搞奖学金,都有一万呢,沉下心,在9月底前吧,学完所有算法,准备省赛,最后一年拿出水平.lca 解决最近公共祖先问题怎么解决的呢, 这是个暴力dfs 记忆化,并且用利用 ...

2018-08-27 23:58:25 636

原创 codeforce 469 B C -模拟 -构造

标题 ## B. Chat Online Little X and Little Z are good friends. They always chat online. But both of them have schedules.Little Z has fixed schedule. He always online at any moment o...

2018-08-12 14:43:31 447

原创 2018-8-5-新的开始-(安排)

1.必须知道自己每天都干了什么.2.一个小时后,必须要自己休息10分钟,放松身体,要养成习惯.3.每天11:40 一定要躺在床上,那么安排下来{ 早上7:00 起床 吃早饭洗刷 30分钟 7:30-8:00 看30分钟英文书 8:00-8:30 剪视频 9:00-11:00 cf: 12:00-5:00 有比赛比赛 ...

2018-08-05 20:09:30 3709

原创 codeforce_845c_Two TVs

Two TVsPolycarp is a great fan of television.He wrote down all the TV programs he is interested in for today. His list contains n shows, i-th of them starts at moment li and ends at moment ri.Po...

2018-04-03 01:58:13 402

原创 codeforce_845D_暴力模拟

Driving TestPolycarp has just attempted to pass the driving test. He ran over the straight road with the signs of four types.speed limit: this sign comes with a positive integer number — maximal s...

2018-04-03 01:52:53 368

原创 codeforce_844A

Diversity Time Limit: 1000msMemory Limit: 262144KB This problem will be judged on CodeForces. Original ID: 844A 64-bit integer IO format: %I64d Java class name: (Any) Prev Submit Status Statis...

2018-04-03 01:46:45 418

原创 codeforces 844B Rectangles (概率)

RectanglesYou are given n × m table. Each cell of the table is colored white or black. Find the number of non-empty sets of cells such that:All cells in a set have the same color. Every two cells...

2018-04-03 01:44:51 411

原创 ZSQ_(原创题)_DJ的大脑风暴 i_(SZY_4_3_01_20_AC)

DJ最近生病了,人一生病脑子就会想太多,突然DJ脑洞大开。DJ最近困惑于POJ那题经典的食物链,脑海中一直萦绕着N个物种。每个物种存在两个独立的价值A, B,如果一个物种X两类价值中的一类比另一种物种Y高,则物种X能吃掉物种Y;Input 对于每组数据,第一行输入一个整数N(1<=N<=100000)接着N行,每行输入两个整数Ai, Bi(1<=A,B<=...

2018-04-03 01:36:31 377

原创 sprintf实例

#include<bits/stdc++.h>using namespace std;long long t[10009];int main(){ char a[10]; int ans=0; for(long long i=1;;i++) { int sum=0; sprintf...

2018-03-25 16:54:42 347

原创 2018——广东工业大学校赛题解

链接:https://www.nowcoder.com/acm/contest/90/A 来源:牛客网 A 小明在坐景驰科技研发的无人车到达了目的地。 景驰科技(JingChi.ai)是一家由人工智能技术驱动、以无人驾驶技术为核心的智能出行公司。它将打造面向中国市场的全无人驾驶。 从无人车下来以后,小明看到了一个长长的楼梯。 有一个n级台阶的楼梯,小明一次可以向上跳1步,两步,甚至是n...

2018-03-25 09:49:01 1241

原创 c 字符读入%s_gets_%[^\n]

一、快速了解1.scanf( )函数和gets( )函数都可用于输入字符串,但在功能上有区别。若想从键盘上输入字符串”hi hello”,则应该使用gets函数。2.gets可以接收空格,回车结束,gets(s)是输入一行;而scanf(%s)遇到空格、回车和Tab键都会认为输入结束,所有它不能接收空格。char string[15]; gets(string); /遇到回车认为输...

2018-03-25 09:31:12 801

原创 poj—简单dfs输入坑

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides th...

2018-03-07 22:07:25 325

原创 hdu_1253_三维bfs

Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个A*B*C的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计算出Igna

2018-03-01 18:46:44 202

原创 hdu_1240_3维bfs,注意搜索坐标

IntroductionYou're in space.You want to get home.There are asteroids.You don't want to hit them.InputInput to this problem will consist of a (non-empty) series of up to 100 data sets. Each data set

2018-03-01 13:25:42 304

原创 hdu_1242_bfs_或者记忆化dfs

Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel’s

2018-02-28 12:45:30 237

原创 HDU_4474_数位bfs——经典搜索

Yet Another Multiple ProblemThere are tons of problems about integer multiples. Despite the fact that the topic is not original, the content is highly challenging. That’s why we call it “Yet Another

2018-02-02 19:08:44 230

原创 HDU_1520_树形DP(递推形式_不能标记)

Anniversary partyProblem Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means th

2018-01-26 10:28:23 211

原创 poj_1679_判断最小生成树是否唯一

The Unique MSTDefinition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, say T = (V’, E’), with the following properties: 1. V’ = V. 2

2017-12-17 10:13:53 242

原创 poj_1751_The Unique MST_prime输出部分路径

The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numbe

2017-12-15 21:19:42 187

原创 PTA_7-1 Pop Sequence(25 分)_给指定的序列压栈,可以随时出栈,问你出栈顺序是否正确

7-1 Pop Sequence(25 分)Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a poss

2017-12-07 10:18:04 1830

原创 nitoj_113_强制类型转换略坑

老袁创业 Time Limit: 1000msMemory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Next 来自嘉兴的袁老板,开始只是个农民,啥都不懂,看到隔壁老王创业成功,于是想自己试试,不过老袁没钱啊,于是他便向自己的好朋

2017-12-04 22:37:32 376

原创 hdu_1908_map知识补全_银行排队问题

The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern information technologie...

2017-12-04 20:25:53 489

原创 NO.1.0

小事是最能试出人品的,别问为什么

2017-12-04 18:53:54 164

原创 codeforce_894C_给你原序列所有连续子序列的GCD从小到大,求原序列_构造

In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then disappeared with the wind of time.When he woke up, he only remembered that the key was

2017-12-03 22:39:16 475

原创 codeforce_894B_数学脑洞题

Ralph has a magic field which is divided into n × m blocks. That is to say, there are n rows and m columns on the field. Ralph can put an integer in each block. However, the magic field doesn’t always

2017-12-03 16:01:19 297

原创 codeforce_894A_字符串水_找出子串所有QAQ可以不连续

“QAQ” is a word to denote an expression of crying. Imagine “Q” as eyes with tears and “A” as a mouth.Now Diamond has given Bort a string consisting of only uppercase English letters of length n. There

2017-12-03 14:01:38 768

原创 6-7 另类循环队列(20 分)

6-7 另类循环队列(20 分) 如果用一个循环数组表示队列,并且只设队列头指针Front,不设尾指针Rear,而是另设Count记录队列中元素个数。请编写算法实现队列的入队和出队操作。 函数接口定义:bool AddQ( Queue Q, ElementType X ); ElementType DeleteQ( Queue Q ); 其中Queue结构定义如下: typedef int

2017-12-03 03:03:43 7997

原创 PTA_6-6 Deque(25 分)手动实现双端队列

6-6 Deque(25 分) A “deque” is a data structure consisting of a list of items, on which the following operations are possible: Push(X,D): Insert item X on the front end of deque D. Pop(D): Remove the

2017-12-03 02:01:31 2726 1

原创 zoj_3827_英语6级

mean给你t组数据 接下来一行给你n和字符串s 不同的字符串对应公式中不同的b带入公式求解#include<bits/stdc++.h>using namespace std;int main(){ int t,i,j; while(cin>>t) { while(t--) { int n;

2017-12-03 01:36:08 167

原创 zoj_3819_水

Average Score Time Limit: 2000msMemory Limit: 65536KB This problem will be judged on ZJU. Original ID: 3819 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics N

2017-12-03 00:44:30 169

原创 zoj_3822_概率dp入门

Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What’s more, he bought a large decorative chessboard with N rows and M columns.Ever

2017-12-03 00:40:48 231

原创 hdu_1102_prime

Constructing RoadsProblem Description There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A

2017-11-30 20:17:41 165

原创 hdu_2682_prime

TreeThere are N (2<=N<=600) cities,each has a value of happiness,we consider two cities A and B whose value of happiness are VA and VB,if VA is a prime number,or VB is a prime number or (VA+VB) is a pr

2017-11-30 19:40:11 247

原创 zoj_3166_floyd_好久没打还翻车一次_丢人

Lazy Tourist Fat Murphy is really a lazy guy. When he goes out for sightseeing, only he cared about is to get back to the hotel which he stayed in as soon as possible. Taday is the Valentine’s day, Fa

2017-11-29 22:35:31 184

原创 poj_2031_已连接部分点的最小生成树_prime

Building a Space Station Time Limit: 1000msMemory Limit: 30000KB This problem will be judged on PKU. Original ID: 2031 64-bit integer IO format: %lld Java class name: Main Prev Submit Status St

2017-11-28 21:48:34 305

原创 nitoj_怎么又是签到题

怎么又是签到题 Time Limit: 500msMemory Limit: 65536KB 64-bit integer IO format: %lld Java class name: Main Prev Submit Status Statistics Next Type: NoneTag it! 万年过去,一切都归于尘土。女神觉得世界太单调,于是创造了balakala

2017-11-28 21:10:28 901

原创 6-5 链栈的基本操作(10 分)PTA无法评测但是感觉写的符合要求

6-5 链栈的基本操作(10 分) S是一个顺序栈,函数Push_L(LinkStack &S, SElemType e)是在链栈中插入一个元素e,函数Pop_L(LinkStack &S, SElemType &e)是删除链栈的栈顶元素(进行此操作是保证栈里有元素),函数StackEmpty_L(LinkStack &S)是判断栈是否为空,函数StackLength_L(LinkStack &S

2017-11-27 16:30:13 1114

空空如也

空空如也

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

TA关注的人

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