自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(124)
  • 收藏
  • 关注

原创 HDU1829(带权并查)

#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>using namespace std;const int maxn=2010;int fa[maxn];int sex[maxn];int n,m;int flag;void init()...

2018-09-12 22:58:13 363

原创 HDU1215(水)

#include<cstdio>#include<iostream>using namespace std;const int maxn=1e5+10;int main(){ int t; int n; scanf("%d",&t); while(t--) { scanf("%d",&n); int ans=0; for(i...

2018-08-30 22:58:25 265

原创 hdu1108(水GCD)

#include<cstdio>#include<iostream>using namespace std;int gcd(int a,int b){ return b==0?a:gcd(b,a%b);}int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int g=gcd...

2018-08-28 22:58:47 244

原创 hdu1084(水 结构体排序)

#include<cstdio>#include<iostream>#include<string.h>#include<algorithm> using namespace std;const int maxn=10010;struct node{ int num; int time; int score; int id; ...

2018-08-28 22:41:42 722

原创 HDU1236结构体排序(水)

#include<cstdio>#include<iostream>#include<algorithm>#include<string.h>using namespace std;struct node{ char num[100]; int s;}stu[1010];int score[110];int cnt;bool ...

2018-08-21 22:48:21 288

原创 HDU1597二分查找(水)

#include<cstdio>#include<iostream>#include<string.h>using namespace std;typedef long long ll;int k;ll n;ll s[100000];int result;void search(int l,int r){ int mid=(l+r)/2...

2018-08-18 22:32:27 223

原创 HDU2504(水)GCD

#include<cstdio>#include<iostream>using namespace std;int gcd(int a,int b){ return b==0?a:gcd(b,a%b);}int main(){ int c; int n; int a,b; scanf("%d",&n); while(n--) { s...

2018-08-14 22:31:11 224

原创 kuangbin N - Find a way (水bfs)

Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s home is at the co...

2018-08-02 22:55:37 223

原创 C. Reorder the Array(cf 水STL)

C. Reorder the Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array of integers. Vasya can permute (chang...

2018-07-25 23:17:45 277

原创 cfC. Cut 'em all!(深搜)

C. Cut 'em all!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given a tree with nn vertices.Your task is to determine the maximum possible ...

2018-05-26 16:10:42 326

原创 cf 300 C(水)

C. Tourist's Notestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tourist hiked along the mountain range. The hike lasted for n days, during eac...

2018-05-17 22:36:59 192

原创 cfMahmoud and Ehab and the message(水map)

B. Mahmoud and Ehab and the messagetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud wants to send a message to his friend Ehab. Their langu...

2018-04-16 22:36:27 220

原创 算法训练 单词接龙(dfs)

  算法训练 单词接龙  时间限制:1.0s   内存限制:256.0MB      问题描述   单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如 beast和astonish,如果接成一条龙则变为beastonish,另外相邻的两部分...

2018-03-12 22:31:56 455

原创 cfB. Our Tanya is Crying Out Loud

B. Our Tanya is Crying Out Loudtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRight now she actually isn't. But she will be, if you don't solve th...

2018-02-27 15:52:18 450

原创 算法训练 According to Bartjens (暴力水)

 算法训练 According to Bartjens  时间限制:1.0s   内存限制:512.0MB    问题描述  计算器和计算机的大量普及也有其弊端。即便是受过专业技术训练的学生们也很可能缺乏计算能力。由于电脑的大量使用,很多人无法心算出7*8这样的算式,甚至是用纸和笔也算不出13*17。不过谁在意呢?  Bartjens教授十分在意——因为他比较传统。他决定给学生布置一些计算作业,并...

2018-02-22 15:19:43 1130

原创 基础练习 矩形面积交 (水)

  基础练习 矩形面积交  时间限制:1.0s   内存限制:512.0MB      问题描述  平面上有两个矩形,它们的边平行于直角坐标系的X轴或Y轴。对于每个矩形,我们给出它的一对相对顶点的坐标,请你编程算出两个矩形的交的面积。输入格式  输入仅包含两行,每行描述一个矩形。  在每行中,给出矩形的一对相对顶点的坐标,每个点的坐标都用两个绝对值不超过10^7的实数表示。输出格式  输出仅包含一...

2018-02-20 23:13:31 284

原创 基础练习 完美的代价

  基础练习 完美的代价  时间限制:1.0s   内存限制:512.0MB      问题描述  回文串,是一种特殊的字符串,它从左往右读和从右往左读是一样的。小龙龙认为回文串才是完美的。现在给你一个串,它不一定是回文的,请你计算最少的交换次数使得该串变成一个完美的回文串。  交换的定义是:交换两个相邻的字符  例如mamad  第一次交换 ad : mamda  第二次交换 md : madm...

2018-02-19 23:23:39 199

原创 蓝桥杯 数的读法(分类模拟)

  基础练习 数的读法  时间限制:1.0s   内存限制:512.0MB      问题描述  Tom教授正在给研究生讲授一门关于基因的课程,有一件事情让他颇为头疼:一条染色体上有成千上万个碱基对,它们从0开始编号,到几百万,几千万,甚至上亿。  比如说,在对学生讲解第1234567009号位置上的碱基时,光看着数字是很难准确的念出来的。  所以,他迫切地需要一个系统,然后当他输入12 3456...

2018-02-18 23:26:52 453

原创 蓝桥杯 基础练习 芯片测试

问题描述  有n(2≤n≤20)块芯片,有好有坏,已知好芯片比坏芯片多。  每个芯片都能用来测试其他芯片。用好芯片测试其他芯片时,能正确给出被测试芯片是好还是坏。而用坏芯片测试其他芯片时,会随机给出好或是坏的测试结果(即此结果与被测试芯片实际的好坏无关)。  给出所有芯片的测试结果,问哪些芯片是好芯片。输入格式  输入数据第一行为一个整数n,表示芯片个数。  第二行到第n+1行为n*n的一张表,每...

2018-02-12 22:56:44 186

原创 cfB. XK Segments(二分)

B. XK Segmentstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhile Vasya finished eating his piece of pizz

2017-12-10 16:03:08 293

原创 cfA. Pizza Separation(前缀和)

A. Pizza Separationtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputStudents Vasya and Petya are studying at

2017-12-09 20:25:47 342

原创 牛客网练习赛7-购物

时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述在遥远的东方,有一家糖果专卖店。这家糖果店将会在每天出售一些糖果,它每天都会生产出m个糖果,第i天的第j个糖果价格为C[i][j]元。现在的你想要在接下来的n天去糖果店进行选购,你每天可以买多个糖果,也可以

2017-12-03 14:46:09 402

原创 hiho- 漏写的数字(水)

题目1 : 漏写的数字时间限制:10000ms单点时限:1000ms内存限制:256MB描述小A今年刚上幼儿园,正在学习写100以内的数字。幼儿园的老师留了一项作业,要求小A从某个100以内的数X开始一直写到另一个100以内的数Y(Y - X > 1)。  不过粗心的小A在作业中漏写了一个整数(好在小A漏写的不是X,并且至少写下了2个

2017-12-03 14:14:40 640

原创 牛客练习赛7-骰子的游戏(水)

题目描述    在Alice和Bob面前的是两个骰子,上面分别写了六个数字。    Alice和Bob轮流丢掷骰子,Alice选择第一个骰子,而Bob选择第二个,如果谁投掷出的数更大,谁就可以获胜。    现在给定这两个骰子上的6个数字,你需要回答是Alice获胜几率更大,还是Bob获胜几率更大。(请注意获胜几率相同的情况)输入描述:第一行一

2017-12-03 11:46:02 478

原创 cf-Chtholly's request(水)

B. Chtholly's requesttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output— Thanks a lot for today.— I expe

2017-12-03 11:42:20 255

原创 HDU1712(背包化为01背包)

ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7742    Accepted Submission(s): 4271Problem DescriptionACbo

2017-11-30 20:22:36 240

原创 hdu1305(字典树)

Immediate DecodabilityTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3770    Accepted Submission(s): 1977Problem DescriptionAn encoding of

2017-11-29 22:54:18 362

原创 读文件(蓝桥杯)

标题: 购物单小明刚刚找到工作,老板人很好,只是老板夫人很爱购物。老板忙的时候经常让小明帮忙到商场代为购物。小明很厌烦,但又不好推辞。这不,XX大促销又来了!老板夫人开出了长长的购物单,都是有打折优惠的。小明也有个怪癖,不到万不得已,从不刷卡,直接现金搞定。现在小明很心烦,请你帮他计算一下,需要从取款机上取多少现金,才能搞定这次购物。取款机只能提供100元面额的纸币。小明想尽可能少

2017-11-28 19:56:40 639

原创 cfA. Chess For Three

A. Chess For Threetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlex, Bob and Carl will soon participate

2017-11-24 18:01:21 338

原创 cfB. Beautiful Divisors

B. Beautiful Divisorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Luba learned about a special

2017-11-24 17:59:28 247

原创 CF C. Rumor

C. Rumortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova promised himself that he would never play com

2017-11-24 16:45:18 318

原创 cfCubes for Masha

B. Cubes for Mashatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAbsent-minded Masha got set of n cubes fo

2017-11-22 14:21:38 268

原创 Codeforces Round #447 A. QAQ

A. QAQtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output"QAQ" is a word to denote an expression of crying. Im

2017-11-19 22:28:58 368

原创 cfC. Pride

C. Pridetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have an array a with length n, you can perfo

2017-11-18 19:44:33 274

原创 Codeforces Round #446 (Div. 2) B.Wrath

B. Wrathtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHands that shed innocent blood!There are n gui

2017-11-18 13:58:09 300

原创 hdu1671trie

Phone ListTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22061    Accepted Submission(s): 7486Problem DescriptionGiven a list o

2017-11-16 21:18:38 204

原创 hdu2553(预处理的八皇后)

N皇后问题Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27013    Accepted Submission(s): 12023Problem Description在N*N的方格棋盘放置了N个皇后,使

2017-11-15 19:46:17 322

原创 hdu2614(dfs)

BeatTime Limit: 6000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1869    Accepted Submission(s): 1116Problem DescriptionZty is a man that alw

2017-11-15 19:09:46 229

原创 HDU1983bfs+dfs

Kaitou Kid - The Phantom Thief (2)Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1482    Accepted Submission(s): 562Problem Descri

2017-11-14 19:14:43 343

原创 【XMUT】贪心专题A - 雷霆战机

A - 雷霆战机Time Limit: 2000/1000MS (Java/Others)    Memory Limit: 65536/32768KB (Java/Others)Submit StatusProblem Description风风最近迷上了一个打飞机游戏——《雷霆战机》,战机分为白二星、绿三星、蓝四星、紫五星,四种品质。当然,最厉害的是紫色五星的战

2017-11-06 20:39:07 268

空空如也

空空如也

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

TA关注的人

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