首页 > 代码库 > poj 2656 Unhappy Jinjin

poj 2656 Unhappy Jinjin

#include <stdio.h>

int main()
{
    while(1)
    {
        int i, n;
        int maxday, maxvalue = http://www.mamicode.com/-1;
        scanf("%d", &n);
        if (n == 0) break;
        for (i = 1; i <= n; i++)
        {
            int a, b;
            scanf("%d%d", &a, &b);
            if (a + b > maxvalue)
            {
                maxvalue = http://www.mamicode.com/a + b;"hljs-keyword">if (maxvalue <= 8) printf("0\n");
        else printf("%d\n", maxday);
    }
    return 0;

}
<script type="text/javascript"> $(function () { $(‘pre.prettyprint code‘).each(function () { var lines = $(this).text().split(‘\n‘).length; var $numbering = $(‘
    ‘).addClass(‘pre-numbering‘).hide(); $(this).addClass(‘has-numbering‘).parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($(‘
  • ‘).text(i)); }; $numbering.fadeIn(1700); }); }); </script>

poj 2656 Unhappy Jinjin