无奈橘子

文章
5
资源
1
加入时间
3年0月28天

Educational Codeforces Round 42 (Rated for Div. 2) E. Byteland, Berland and Disputed Cities(贪心)

题目链接:http://codeforces.com/contest/962/problem/E我可能是个弱智直接贪心,B和R的连发比较固定,考虑每个P,他有两种选择,一种是连接到上一个P上然后删掉B和R的最大值,一种是直接连到上一个B和R上,直接模拟就行了代码: ll ans=0; int n; int pa=INF,pb=INF,pc=INF,pra=0,prb=0; scanf("%d...