上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页
摘要: 题目传送门 sol:dp[i]为前i头牛按题目要求分组后的最大技能水平和。然后dp方程式就显而易见了; 动态规划 #include "bits/stdc++.h" using namespace std; const int MAXN = 1e4 + 5; int arr[MAXN], dp[MAX 阅读全文
posted @ 2019-06-15 21:26 Jathon-cnblogs 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 A .淘宝商品价格大PK sol:枚举删除每一个数,然后求最大上升子序列。 枚举 #include "bits/stdc++.h" using namespace std; const int MAXN = 105; int arr[MAXN], n, ans; map<int, int 阅读全文
posted @ 2019-06-03 18:15 Jathon-cnblogs 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://ac.nowcoder.com/acm/contest/879#question 官方题解:https://ac.nowcoder.com/discuss/189446?type=101&order=0&pos=1&page=1 A .简单计数 sol:考虑两个数组a和b, 阅读全文
posted @ 2019-05-14 19:40 Jathon-cnblogs 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/1163 A .Eating Soup sol:在n / 2、n - m、m三个数中取最小值,结果受这三个值限制。但是m == 0的情况需要特判 思维 #include "bits/stdc++.h" using namespac 阅读全文
posted @ 2019-05-10 21:17 Jathon-cnblogs 阅读(444) 评论(0) 推荐(0) 编辑
摘要: E .Sequence in the Pocket sol:将数组copy一份,然后sort一下,找寻后面最多多少个元素在原数组中保持有序,用总个数减去已经有序的就是我们需要移动的次数。 思维题 #include "bits/stdc++.h" using namespace std; const 阅读全文
posted @ 2019-05-02 19:26 Jathon-cnblogs 阅读(1153) 评论(2) 推荐(1) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/webcontest/contest_show.php?cid=13137 A .Problem A(ZOJ1048普通签到题) sol:不解释 水题 #include "cstdio" using namespace std; int main 阅读全文
posted @ 2019-04-25 20:19 Jathon-cnblogs 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 昨天打的重现赛,感觉是我打的发挥的最好的一场比赛了,六题都一次AC。那么就来总结一下吧 题目链接:http://codeforces.com/contest/1133 A .Middle of the Contest sol:简单模拟,注意一下跨天的情况就好了。 模拟 #include "bits/ 阅读全文
posted @ 2019-04-24 10:00 Jathon-cnblogs 阅读(217) 评论(0) 推荐(0) 编辑
摘要: pro:给出n, k和长度为n的数组a, 两个人轮流取数1先取,设a[i]是当前数组中最大值,则取走a[i - k]到a[i + k]这段数,然后把a[i + k + 1]和后面的补到 a[i - k]的位置。(当然要考虑前后边界,i - k不能小于1,i + k不能大于n)输出一个字符串s[i]表 阅读全文
posted @ 2019-04-17 21:36 Jathon-cnblogs 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/contest/1153 A .Serval and Bus pro:给出n种公交车的首班车时间和两班车之间的时间间隔,找t时间以后的第一辆车是第几种车 sol:对于每种车,找到t时间以后的第一班车的时间,计算这个时间和t的差距,然后找离t最近的 阅读全文
posted @ 2019-04-16 11:20 Jathon-cnblogs 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 感觉这场小白赛给我难度正好,可能我就是个小白吧。今天总结一下。 题目链接:https://ac.nowcoder.com/acm/contest/549#question 官方题解:https://ac.nowcoder.com/discuss/177449 A .小A的签到题 sol:复制给出的代 阅读全文
posted @ 2019-04-14 15:08 Jathon-cnblogs 阅读(311) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 14 下一页