自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Baiyi_destroyer的博客

蒟蒻,大佬请指教

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

原创 Ubiquitous Religions

Description当今世界有很多不同的宗教,很难通晓他们。你有兴趣找出在你的大学里有多少种不同的宗教信仰。你知道在你的大学里有n个学生(0 < n <= 50000) 。你无法询问每个学生的宗教信仰。此外,许多学生不想说出他们的信仰。避免这些问题的一个方法是问m(0 <= m <= n(n - 1)/ 2)对学生, 问他们是否信仰相同的宗教( 例如他们可能知道他们两...

2018-05-28 19:56:00 142

原创 The Suspects

DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strat...

2018-05-28 19:53:11 150

原创 How Many Tables

DescriptionToday 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 ea...

2018-05-28 19:15:53 142

原创 矩阵快速幂求斐波那契(模板)

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int MOD=10000;struct mat{ ll a[2][2];};mat mat_mul(mat x,mat y){ mat res; memset(res.a,0,sizeof(res.a))...

2018-05-26 18:43:21 1310

原创 A Bug's Life

DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opp...

2018-05-24 21:31:33 283

原创 畅通工程

Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( &lt; 1000 )和道路数目M;随...

2018-05-21 21:48:00 1577

转载 并查集详解

并查集是我暑假从高手那里学到的一招,觉得真是太精妙的设计了。以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定。不分享出来真是对不起party了。(party:我靠,关我嘛事啊?我跟你很熟么?)来看一个实例,杭电1232畅通工程首先在地图上给你若干个城镇,这些城镇都可以看作点,然后告诉你哪些对城镇之间是有道路直接相连的。最后要解决的是整幅图的连通性问题。比如随意给你两个点,让你判断它...

2018-05-18 20:47:41 116

原创 Graph Theory

Description Little Q loves playing with different kinds of graphs very much. One day he thought about an interesting category of graphs called ``Cool Graph'', which are generated in the following way...

2018-05-14 22:25:50 462

原创 2018年山东省第九届浪潮杯赛后总结

    emmmmm,告别多日,最近忙于备战省赛,没有怎么更新博客(虽然很low),等我放松放松还会回来的^_^。下面讲讲省赛的经历吧。   从清明开始就一直打比赛,每天都用大量时间去积累,白天打完比赛,晚上继续去办公室补题,顺便水一下博客,emmmmm,真的很不容易,为了省赛拿个好一点的名次,除了师哥们教的,比赛中遇到的,课外又扩展了好多好多,图论,数论,费马小定理,逆元,扩展欧几里得........

2018-05-08 23:32:59 258 1

原创 有假币

Description居然有假币!!! 事情是这样的,现在猪肉涨了,但是农民的工资却不见涨啊,没钱怎么买猪肉啊。渊子这就去买猪肉,结果找来的零钱中有假币!!!可惜渊子一不小心把它混进了一堆真币里面去了。现在知道假币的重量比真币的质量要轻。给你一个天平,请用最快的时间把那个可恶的假币找出来。Input1≤n≤230,输入0结束程序。Output最少要称几次一定能把那个假币找出来。Sample Inp...

2018-05-04 19:06:58 316

转载 猴子分桃

Description老猴子辛苦了一辈子,给那群小猴子们留下了一笔巨大的财富——一大堆桃子。老猴子决定把这些桃子分给小猴子。第一个猴子来了,它把桃子分成五堆,五堆一样多,但还多出一个。它把剩下的一个留给老猴子,自己拿走其中的一堆。第二个猴子来了,它把桃子分成五堆,五堆一样多,但又多出一个。它把多出的一个留给老猴子,自己拿走其中的一堆。 后来的小猴子都如此照办。最后剩下的桃子全部留给老猴子。 这里有...

2018-05-03 21:03:37 298

转载 Tic-Tac-Toe

DescriptionKim likes to play Tic-Tac-Toe.Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next 2 moves if both player are clever enough.Here...

2018-05-02 20:43:01 298

原创 Game

DescriptionAlice and Bob is playing a game.Each of them has a number. Alice’s number is A, and Bob’s number is B.Each turn, one player can do one of the following actions on his own number:1. Flip: Fl...

2018-05-02 20:32:10 178

原创 Comparison of Android versions

DescriptionAs an Android developer, itˇs really not easy to figure out a newer version of two kernels, because Android is updated so frequently and has many branches. Fortunately, Google identifies in...

2018-05-02 20:24:22 125

原创 Linearization of the kernel functions in SVM

DescriptionSVM(Support Vector Machine)is an important classification tool, which has a wide range of applications in cluster analysis, community division and so on. SVM The kernel functions used in SV...

2018-05-02 20:15:28 131

原创 Game with Pearls (贪心)

DescriptionTom and Jerry are playing a game with tubes and pearls. The rule of the game is: 1) Tom and Jerry come up together with a number K. 2) Tom provides N tubes. Within each tube, there are seve...

2018-05-02 20:12:18 188

原创 Easy Summation

DescriptionYou are encountered with a traditional problem concerning the sums of powers. Given two integers nn and kk. Let f(i)=ikf(i)=ik, please evaluate the sum f(1)+f(2)+...+f(n)f(1)+f(2)+...+f(n)....

2018-05-02 19:57:44 89

转载 Coprime Sequence (前缀后缀GCD问题)

DescriptionDo you know what is called ``Coprime Sequence''? That is a sequence consists of nn positive integers, and the GCD (Greatest Common Divisor) of them is equal to 1. ``Coprime Sequence'' is ...

2018-05-02 19:52:23 269

原创 Automatic Judge

Description Welcome to HDU to take part in the second CCPC girls’ competition! A new automatic judge system is used for this competition. During the five-hour contest time, you can submit your co...

2018-05-02 19:36:36 159

空空如也

空空如也

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

TA关注的人

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