zoukankan      html  css  js  c++  java
  • 2017湘潭大学邀请赛G题(贪心+优先队列)

    参考博客:http://www.cnblogs.com/chendl111/p/6891770.html

    题目链接:https://www.icpc.camp/contests/4mYguiUR8k0GKE

                                                     Parentheses

    Input

    The input contains zero or more test cases and is terminated by end-of-file. For each test case: The first line contains an integer n. The i-th of the following n lines contains li , ci , di .

    • 1 ≤ n ≤ 105 • 1 ≤ l1 + l2 + · · · + ln ≤ 109

    • l1 + l2 + · · · + ln is even.

    • 1 ≤ di ≤ 109

    • The sum of n does not exceed 106 .

  • 相关阅读:
    代码4
    readline,readlines,read函数
    代码3
    find函数
    字典的循环和if语句
    代码2
    代码1
    python除法
    字符串
    print函数
  • 原文地址:https://www.cnblogs.com/carcar/p/9026149.html
Copyright © 2011-2022 走看看