2016年4月25日

[2016-04-25][codeforces][665B - Shopping]

摘要: 时间:2016-04-25 20:52:11 星期一 题目编号:[2016-04-25][codeforces][665B - Shopping] 题目大意:已知n个货物的位置,已知每个客人需要的货物,问总共需要走多少次. 分析:直接模拟 #include#includeusing namespace std;deque q;deque::iterator itq;int main(){ ... 阅读全文

posted @ 2016-04-25 20:55 红洋 阅读(146) 评论(0) 推荐(0)

[2016-04-25][codeforces][669][A]Little Artem and Presents]

摘要: 时间:2016-04-25 19:50:32 星期一 题目编号:[2016-04-25][codeforces][669][A]Little Artem and Presents] 题目大意:有n个礼物送给某人,每次送的礼物的数目不能和上次一样,问最多能送多少次 分析: 贪心,1,2,1,2交替送,剩下的不管是1个还是2个,最多只能送一次 答案:ans = n / 3 * 2 + (n % 3... 阅读全文

posted @ 2016-04-25 19:53 红洋 阅读(173) 评论(0) 推荐(0)

导航