toj
DeathWH
这个作者很懒,什么都没留下…
展开
-
【TOJ 3282】 Rain's Array
题意: 每次选择相邻的两个数,原创 2014-08-21 20:29:24 · 370 阅读 · 0 评论 -
[TOJ 1029] Robbery
Inspector Robstop is very angry. Last night, a bank has been robbed and the robber has not been caught. And this happened already for the third time this year, even though he did everything in his pow原创 2015-08-18 19:50:16 · 330 阅读 · 0 评论 -
[TOJ 3541] Counting Sequences
For a set of sequences of integers {a1, a2, a3, ..., an}, we define a sequence {ai1, ai2, ai3, ..., aik} in which 1 ≤ i1 i2 i3 ik ≤ n, as the sub-sequence of {a1, a2, a3, ..., an}. It is quite原创 2015-08-18 19:42:06 · 372 阅读 · 0 评论 -
[TOJ 2663] Concert Hall Scheduling
You are appointed director of a famous concert hall, to save it from bankruptcy. The hall is very popular, and receives many requests to use its two fine rooms, but unfortunately the previous director原创 2015-08-18 19:46:52 · 374 阅读 · 0 评论 -
[TOJ 3655] Bomb
The counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence inc原创 2015-08-18 19:38:03 · 296 阅读 · 0 评论 -
[TOJ 3978] Probability II
3978. Probability II Before read this problem, you should read the problem "Probability I" to get some background information. In fact, Bob is far more intelligent than we have imagined. He原创 2015-07-20 13:10:06 · 323 阅读 · 0 评论 -
[TOJ 4108] Hearthstone
比赛时拿到了一血,但这个确实是一道很水的题。 通缉怪兽卡和魔法卡可以达到的伤害用来以最少的消耗破坏对方的怪兽,再特判一下是否可以直接用魔法卡获胜。 #include #include using namespace std; int dp[1000000]; int cost[1000000]; int aa[1000000]; int main() { int n,m,a,b;原创 2015-07-15 11:02:29 · 278 阅读 · 0 评论 -
[TOJ 4124] Function
当时现场比赛时被这道题坑惨了,几乎全部的时间都浪费在这道题上面,而且最后还没做出来。 最后顺着某屌的想法才做出来。 同余的时候一定要选择质数。 #include #include #include #include using namespace std; const long long mod=1000000007;//必须是个质数 long long n; int main() {原创 2015-07-15 10:54:31 · 291 阅读 · 0 评论 -
[TOJ 1636] Going Home
只需要在每个m和H之间进行连边,边权为曼哈顿距离。 然和可以采用二分图最大权匹配或者是费用流。#include #include #include #include #include #include using namespace std; const int MAX=310; const int INF=1010101010; struct mcmf { struct Edge原创 2015-07-15 10:03:45 · 375 阅读 · 0 评论 -
【TOJ 1981】Tire Dimensions
题意:题目一堆废话,所有的字母都没有用转载 2014-08-21 20:25:39 · 353 阅读 · 0 评论 -
[TOJ 1732] Darts
题意: 就是一个打靶的游戏,原创 2014-08-21 20:18:58 · 435 阅读 · 0 评论 -
[TOJ 1965] Gnome Tetravex
Hart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at the beginning, the player is given n*n squares. Each square is divided into four triangles marked four numbe原创 2015-08-18 19:52:52 · 260 阅读 · 0 评论