#include <stdio.h>
int main()
{
while()
{
int i, n;
int maxday, maxvalue = -;
scanf("%d", &n);
if (n == ) break;
for (i = ; i <= n; i++)
{
int a, b;
scanf("%d%d", &a, &b);
if (a + b > maxvalue)
{
maxvalue = a + b;
maxday = i;
}
}
if (maxvalue <= ) printf("0\n");
else printf("%d\n", maxday);
}
return ;
}

POJ 2656 Unhappy Jinjin的更多相关文章

  1. POJ 2656

    #include<iostream> #include<stdio.h> using namespace std; int main() { //freopen("a ...

  2. 【转】POJ百道水题列表

    以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...

  3. POJ解题经验交流

    感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理.   题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...

  4. 算法之路 level 01 problem set

    2992.357000 1000 A+B Problem1214.840000 1002 487-32791070.603000 1004 Financial Management880.192000 ...

  5. POJ 2195 Going Home 最小费用最大流 尼玛,心累

    D - Going Home Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Subm ...

  6. POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理

    Halloween treats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 7644   Accepted: 2798 ...

  7. POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7192   Accepted: 3138   ...

  8. POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治

    The Pilots Brothers' refrigerator Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 22286 ...

  9. POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法

    Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 37427   Accepted: 16288 Descr ...

随机推荐

  1. jdk 安装配置

    在windows上配置JDK 1.下载windows版JDK 网址:http://www.oracle.com/technetwork/java/javase/archive-139210.html ...

  2. iOS开发-OC语言 (一)oc数据类型

    分享一套以前学习iOS开发时学习整理的资料,后面整套持续更新: oc数据类型 数据类型:基本数据类型.指针数据类型 基本数据类型:数值型.字符型(char).布尔型.空类型(void) 指针数据类型: ...

  3. ADO.NET初学习

    ①System.Data  → DataTable,DataSet,DataRow,DataColumn,DataRelation,Constraint,DataColumnMapping,DataT ...

  4. Jmeter之录制脚本

    目前,思路:先录制→再压测. [一]录制的准备: 第一种:直接的模板(¬_¬) [1]File→Templates [2]看见Select Template→Recording→create [3]好 ...

  5. find指令参数

    1.name ~ 根目录 . 当前和子目录 name之后跟的是文件名 find . -name "[a-z]*[4-9].log" -print 2.perm perm后面跟的是权 ...

  6. Time.timeScale、游戏暂停

    原文链接 项目里面一直在用Time.timeScale来做游戏的 1倍 2倍整体加速,今天我仔细看了一下Time.timeScale才发现之前我理解错了一些东西. Time.timeScale可以控制 ...

  7. sphinx cmd command

    D:\iso\gaoqiao\app\sphinx\bin\indexer.exe -c D:\iso\gaoqiao\app\sphinx\bin\sphinx.conf --all --rotat ...

  8. ORACLE 使用sqluldr2和sqlldr进行导入导出

    oracle数据导出工具sqluldr2可以将数据以csv.txt等格式导出,适用于大批量数据的导出,导出速度非常快.导出后可以使用oracle loader工具将数据导入. 简介: Sqluldr2 ...

  9. PhpMyAdmin隐藏数据库设置同前缀失效的问题

    用PhpMyAdmin默认会把所有数据库都显示出来,一些如 MySQL,information_schema之类的也会显示,这样既不安全看着也不爽,隐藏掉最好. 修改 config.inc.php 或 ...

  10. c# 强制退出程序

    引用:http://blog.csdn.net/tanhua103292/article/details/4283203 1.强制退出WinForm程序之Application.Exit和Enviro ...