自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 The Suspects 并查集练习

题目地址:https://vjudge.net/problem/POJ-1611题目大意:最近SARS传播, 学校里为了隔离可能被感染的人, 让你找出个能被感染的人, 现规定, 在同一个社团中, 只要有一人有感染嫌疑, 则所有人都有感染嫌疑, 已知0号学生是感染嫌疑者,现在给你学校里有n个学生, m个社团,输入第一行是n 和 m, 之后的m行, 先给出这个社团的成员人数, 再给出成员的学号。

2017-07-27 15:25:07 200

原创 I NEED A OFFER!

题目地址思路:背包的入门题背包讲解#include #include #include #include #include #define ll long longusing namespace std;const int maxn = 1e4 + 5;int n, m, feiyong[maxn];double jilv[maxn], dp[maxn];int

2017-07-25 17:37:15 169

原创 Chloe and the sequence

题目地址题目大意:按照他的那个创造数组的方式,数第k个数是几。思路:看他给的数组例子,会发现奇数时都是1,当去处1时奇数又都是2了,以此类推。#include #include #include #include #define ll long longusing namespace std;int n;ll k, cnt = 0;int main(){

2017-07-25 17:27:38 242

原创 Ubiquitous Religions 并查集入门

题目地址题目描述:为了算每个学校内有多少个宗教,对学生进行询问,每两个学生有相同的宗教信仰,现在要计算学校里最多有多少不同的宗教。第一行输入学生人数n和询问次数m,接下来m行,每行表示这两个学生有着相同的信仰。00结束思路:并查集的入门题目,按着并查集的模板敲一遍就行。我一开始不会并查集,就直接模拟来着,然后超时。。。。#include #include #include

2017-07-25 17:15:33 224

原创 A Serial Killer

题目地址题目大意:杀手要杀人,最初的字符串是受害者名单,更新这些受害者名单,之后给出的每组两个字符串, 第一个字符串是要杀掉的, 第二个是更新进去的思路:水题,模拟一下就好#include #include #include #include #include #include #include #include #include #include

2017-07-25 17:06:06 264

原创 Snacktower 水题模拟

According to an old legeng, a long time ago Ankh-Morpork residents did something wrong to miss Fortune, and she cursed them. She said that at some timen snacks of distinct sizes will fall on the cit

2017-07-25 08:22:47 280

原创 Weird Rounding

Polycarp is crazy about round numbers. He especially likes the numbers divisible by10k.In the given number of n Polycarp wants to remove the least number of digits to get a number that is divisibl

2017-07-24 20:21:08 222

原创 Pupils Redistribution

题目描述:In Berland each high school student is characterized by academic performance — integer value between 1 and5.In high school 0xFF there are two groups of pupils: the groupA and th

2017-07-24 20:10:20 243

原创 Karen and Morning

Karen is getting ready for a new school day!It is currently hh:mm, given in a 24-hour format. As you know, Karen lovespalindromes, and she believes that it is good luck to wake up when the tim

2017-07-24 19:55:36 287

原创 Mister B and Book Reading

题目描述:Mister B once received a gift: it was a book about aliens, which he started read immediately. This book hadc pages.At first day Mister B read v0 pages, but after that he started to sp

2017-07-24 19:52:10 321 1

原创 I'm bored with life

题目描述:Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is located in a town Pavlopolis. It's well known that universities

2017-07-24 19:03:43 363

原创 acm Alyona and copybooks 新人水题

DescriptionLittle girl Alyona is in a shop to buy some copybooks forschool. She study four subjects so she wants to have equal numberof copybooks for each of the subjects. There are three types

2017-01-21 11:07:42 275

空空如也

空空如也

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

TA关注的人

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