ACM日常写题记录
温暖会追上来的.
这个作者很懒,什么都没留下…
展开
-
HDU 6024 女生专场)Building Shops
HDU’s nn classrooms are on a line ,which can be considered as a number line. Each classroom has a coordinate. Now Little Q wants to build several candy shops in these nn classrooms. The total cost con...原创 2018-05-17 22:53:08 · 231 阅读 · 0 评论 -
八皇后的另类写法 HDU - 2553 — 自己的想法很独特
八皇后有很多种写法:1 回溯法:#include<cstdio>#include<cstdlib>#include<cstring>#include<cmath>#include<iostream>#include<algorithm>#include<string>#include&原创 2018-07-19 23:00:40 · 224 阅读 · 0 评论 -
CodeForces - 791B ——D - Bear and Friendship Condition
Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other and share funny pictures).There are n members, numbered ...原创 2018-07-19 23:19:32 · 251 阅读 · 0 评论 -
HDU - 4786 ——Fibonacci Tree
Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pang decides to solve the following problem: Consider a bidirectional graph ...原创 2018-07-19 23:38:51 · 132 阅读 · 0 评论 -
hdu4046 —— 树状数组(本人比较菜,还不会线段树)
When I wrote down this letter, you may have been on the airplane to U.S. We have known for 15 years, which has exceeded one-fifth of my whole life. I still remember the first time we went to the movi...原创 2018-07-20 16:15:07 · 363 阅读 · 3 评论 -
HDU - 4041 ----Eliminate Witches!
Kaname Madoka is a Magical Girl(Mahou Shoujo/Puella Magi). The duty of a Magical Girl is to eliminate Witches(Majo). Though sounds horrific, it is not a hard job for her as a powerful magical girl. O...原创 2018-07-21 10:19:52 · 211 阅读 · 0 评论 -
HDU - 4771—————Stealing Harry Potter's Precious
Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry Potter has to go back to uncle Vernon's home. But he can't bring his pr...原创 2018-07-21 10:55:35 · 175 阅读 · 0 评论 -
codeforces721C ---- Journey 我真是因为INF气死了;
Recently Irina arrived to one of the most famous cities of Berland — the Berlatov city. There are n showplaces in the city, numbered from 1 to n, and some of them are connected by one-directional road...原创 2018-07-26 21:44:12 · 391 阅读 · 0 评论 -
CodeForces - 919D ___Substring
You are given a graph with n nodes and m directed edges. One lowercase letter is assigned to each node. We define a path's value as the number of the most frequently occurring letter. For example, if ...原创 2018-07-21 23:24:16 · 390 阅读 · 0 评论 -
Fountains ___codeforces——799/C
Arkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There are n available fountains, for each fountain its beauty and cost are known. There are two types of money in the game:...原创 2018-07-19 22:42:26 · 267 阅读 · 0 评论 -
CodeForces - 831D ---Office Keys
There are n people and k keys on a straight line. Every person wants to get to the office which is located on the line as well. To do that, he needs to reach some point with a key, take the key and th...原创 2018-07-24 22:13:02 · 355 阅读 · 0 评论 -
2017-2018 ACM-ICPC Nordic ——Problem G 。Galactic Collegiate Programming Contest
Time limit: 6 secondsPicture by GuillaumePreat on Pixabay, cc0One hundred years from now, in 2117, the InternationalCollegiate Programming Contest(of which the NCPC is a part) has expandedsignifican...原创 2018-05-17 23:29:09 · 419 阅读 · 0 评论 -
HDU - 5710—— Digit-Sum
Sample Input32 14 13 4Sample Output 1055899 需要注意,当 a>2×b以及 5×a<b时,不可构造,输出 #include <bits/stdc++.h> typedef long long LL; using namespace std; int GC...原创 2018-05-19 22:00:32 · 228 阅读 · 0 评论 -
树的直径典型 Cow Marathon _______poj.1985
DescriptionAfter hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marathon for his cows to run. The marathon ...原创 2018-07-17 20:19:36 · 174 阅读 · 0 评论 -
确定比赛名次 ——典型的拓扑排序 优先队列;
有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input输入有若干组,每组中的第一行为二个数N(1<=N<=500),M;其中N表...原创 2018-07-17 20:29:50 · 270 阅读 · 0 评论 -
Military Problem ——codeforces.1006/E
In this problem you will have to help Berland army with organizing their command delivery system.There are nn officers in Berland army. The first officer is the commander of the army, and he does no...原创 2018-07-17 20:43:21 · 289 阅读 · 2 评论 -
Ilya And The Tree——codeforces——842/C
Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex 1. There is an integer number written on each vertex of the tree; ...原创 2018-07-17 20:53:16 · 225 阅读 · 0 评论 -
Codeforces-831C ——Jury Marks (set) or (map)
Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points were subtracted). Initially the participant had som...原创 2018-07-24 16:44:51 · 181 阅读 · 0 评论 -
矩阵快速幂的板子——注释翻译了一遍板子
日常存一下板子:#include <cstdio>#include <cmath>#include <algorithm>#include <iostream>#include <cstring>#include <queue>using namespace std;const int maxn = 5...原创 2018-07-26 10:39:39 · 236 阅读 · 0 评论