SDAU训练日志第55篇(2019年1月17日)

今天过生日,晚上和队友出去吃饭的时候重新商讨了一下队内规划,分工更明确了一点。继续加油!未来几天的比赛更加偏向图论一点。另外模板库还是不够完善,等年后把训练的模板全整理出来。最近的比赛,思路能想到,但是调试代码总是找不到错误的点,好不容易找出来了还是感觉不够细心,看来还是要多练。

今年变成20岁的小朋友啦~

  唔,今天悄无声息的过掉了自己的生日,没有声张,只和几个好朋友在一起吃了个饭就算是结束了。

   收到了好朋友们的生日礼物,一个无比可爱的盆栽,一个好基友送的小游戏(虽然看起来不错,但是完全不会玩啊),还有我妹妹的礼物还不知道是啥,据说因为年前快递忙给堵在路上了,哈哈哈。今天真的是超级开心,甚至学习的动力都高涨起来了。

   炫耀一下下~ 继续阅读今年变成20岁的小朋友啦~

SDAU寒假训练三 题解(2019/1/16)

  今天的比赛,怎么说呢,出了A E H三个,都是1A但是出的速度太慢了,第一题是区间DP的裸题,自己巴拉巴拉敲了一堆,结果不对,断点输出,变量监视全用上了,没毛病啊,结果发现最后输出结果那里忘了-1,emmm果然还是太笨了。E题题目读起来巨难理解,和旁边的郭大佬商量了老半天,想出了三个条件,凭着感觉暴力出来了(我还以为肯定不止三个条件呢,试试看就对了,到现在不知道自己思路是否正确,但是代码确实AC掉了)。H是树的直径啊,裸题。就那么弄上了,没啥技术含量。。。
补题代码:

【树状数组】Curious Robin Hood

传送门:LightOj 1112

Robin Hood likes to loot rich people since he helps the poor people with this money. Instead of keeping all the money together he does another trick. He keeps n sacks where he keeps this money. The sacks are numbered from 0 to n-1.

Now each time he can he can do one of the three tasks.

1)                  Give all the money of the ith sack to the poor, leaving the sack empty.

2)                  Add new amount (given in input) in the ith sack.

3)                  Find the total amount of money from ith sack to jth sack.

Since he is not a programmer, he seeks your help.

继续阅读【树状数组】Curious Robin Hood

【最短路】Destroying Roads

 

传送门:CF543B

In some country there are exactly n cities and m bidirectional roads connecting the cities. Cities are numbered with integers from 1 to n. If cities a and b are connected by a road, then in an hour you can go along this road either from city ato city b, or from city b to city a. The road network is such that from any city you can get to any other one by moving along the roads. 继续阅读【最短路】Destroying Roads

【思维+暴力】Block Towers

 

Students in a class are making towers of blocks. Each student makes a (non-zero) tower by stacking pieces lengthwise on top of each other. n of the students use pieces made of two blocks and m of the students use pieces made of three blocks.

The students don’t want to use too many blocks, but they also want to be unique, so no two students’ towers may contain the same number of blocks. Find the minimum height necessary for the tallest of the students’ towers. 继续阅读【思维+暴力】Block Towers