POJ 2656 Unhappy Jinjin
#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的更多相关文章
- POJ 2656
#include<iostream> #include<stdio.h> using namespace std; int main() { //freopen("a ...
- 【转】POJ百道水题列表
以下是poj百道水题,新手可以考虑从这里刷起 搜索1002 Fire Net1004 Anagrams by Stack1005 Jugs1008 Gnome Tetravex1091 Knight ...
- POJ解题经验交流
感谢范意凯.陈申奥.庞可.杭业晟.王飞飏.周俊豪.沈逸轩等同学的收集整理. 题号:1003 Hangover求1/2+1/3+...1/n的和,问需多少项的和能超过给定的值 类似于Zerojudg ...
- 算法之路 level 01 problem set
2992.357000 1000 A+B Problem1214.840000 1002 487-32791070.603000 1004 Financial Management880.192000 ...
- POJ 2195 Going Home 最小费用最大流 尼玛,心累
D - Going Home Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Subm ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
随机推荐
- python3.4 data type
#coding=utf-8 #Python 3.4 https://docs.python.org/3.4/library/ #IDE:Eclipse +PyDev Window10 import a ...
- 办理康卡迪亚大学(本科)学历认证『微信171922772』Concordia学位证成绩单使馆认证Concordia University
办理康卡迪亚大学(本科)学历认证『微信171922772』Concordia学位证成绩单使馆认证Concordia University Q.微信:171922772办理教育部国外学历学位认证海外大学 ...
- MIPS指令集
MIPS 指令集(共31条) 助记符 指令格式 示例 示例含义 操作及其解释 Bit # 31..26 25..21 20..16 15..11 10..6 5..0 R-type op rs rt ...
- Spark Wordcount
1.Wordcount.scala(本地模式) package com.Mars.spark import org.apache.spark.{SparkConf, SparkContext} /** ...
- Vue.js教程
https://aotu.io/notes/2016/10/13/vue2/?o2src=juejin&o2layout=compat
- eclipse 中的maven操作
首先,maven中常用的几个命令: clean 清空target目录 compile 编译 package 打包到target目录 install 打包到本地仓库 -------------- ...
- CodeForces 670E Correct Bracket Sequence Editor
链表,模拟. 写一个双向链表模拟一下过程. #pragma comment(linker, "/STACK:1024000000,1024000000") #include< ...
- KMP 算法 学习 整理
我自己整理的KMP算法的PDF文件:http://pan.baidu.com/s/1o8yKIi2提取密码:8291 别的就不多说啥了,感谢来自海子 博客园的 资料--
- 利用Runtime给UITextView添加占位符(新方法)
以前一直使用自定义UITextView通过通知中心来自定义placeHolder,最近看到这个方法,感觉更好 UITextView *textView = [[UITextView alloc]in ...
- CentOS 6.5静态IP的设置(NAT和桥接都适用)
CentOS 6.5静态IP的设置(NAT和桥接都适用) 为了方便,用Xshell来.并将IP设置为静态的.因为,在CentOS里,若不对其IP进行静态设置的话,则每次开机,其IP都是动态变化的,这样 ...