摘要:
题目传送门 A .淘宝商品价格大PK sol:枚举删除每一个数,然后求最大上升子序列。 枚举 #include "bits/stdc++.h" using namespace std; const int MAXN = 105; int arr[MAXN], n, ans; map<int, int 阅读全文
摘要:
E .Sequence in the Pocket sol:将数组copy一份,然后sort一下,找寻后面最多多少个元素在原数组中保持有序,用总个数减去已经有序的就是我们需要移动的次数。 思维题 #include "bits/stdc++.h" using namespace std; const 阅读全文
摘要:
题目链接:http://acm.hdu.edu.cn/webcontest/contest_show.php?cid=13137 A .Problem A(ZOJ1048普通签到题) sol:不解释 水题 #include "cstdio" using namespace std; int main 阅读全文
摘要:
昨天打的重现赛,感觉是我打的发挥的最好的一场比赛了,六题都一次AC。那么就来总结一下吧 题目链接:http://codeforces.com/contest/1133 A .Middle of the Contest sol:简单模拟,注意一下跨天的情况就好了。 模拟 #include "bits/ 阅读全文
摘要:
题目链接:http://codeforces.com/contest/1153 A .Serval and Bus pro:给出n种公交车的首班车时间和两班车之间的时间间隔,找t时间以后的第一辆车是第几种车 sol:对于每种车,找到t时间以后的第一班车的时间,计算这个时间和t的差距,然后找离t最近的 阅读全文