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 ...
随机推荐
- Java 实现下载
效果就是点击就可以下载到本机. 前台代码示例 后台代码示例 前台代码示例 <a target='_self' href='../downTask/downloadFileToLocal?file ...
- 还在为小三角形切图?使用纯CSS写一个简单的三角形
同学们,当美工给的设计图是这样: 或者这样: 我的内心其实是拒绝的-_-:但工作还得干,大部分同学会写 <style> .icon{width:20px;height:20px;displ ...
- c#-委托,匿名方法,lambda表达的关系
什么是委托: 包含单个方法的委托和函数指针是相似的,不同的是,委托是面向帝乡的并且是类型安全的 声明委托类型: delegate void mydel(int x); 声明委托和声明方法差不多,两个不 ...
- iOS之崩溃处理:This application is modifying the autolayout engine from a background thread
一.错误提示 今天在开发的时候遇到一个崩溃问题,"This application is modifying the autolayout engine from a background ...
- 构建jenkins
一.Jenkins简介: jenkins,之前叫做Hudson,是基于Java开发的一种持续集成工具,用户监控秩序重复的工作,包括: 1>持续的软件版本发布测试项目. 2>监控外部调 ...
- cocoaPods第三方库使用详解
终端上安装了cocoapods后,打开终端输入下面命令: cd /Users/Sivek_lin/Desktop/AFNTest/AFNTest touch podfile pod search af ...
- Python反射函数
python里面跟getattr相关的有hasattr,setattr,delattr ,那么我们通过下面的例子,来详细的说说他们的用法. class Xiaorui: def __init__(s ...
- python3 流程控制
表达式if ... else >>> if 3 > 4: ... print('False') ... else: ... print('True') ... True 表达式 ...
- Objective-C Runtime 运行时之六:拾遗(转载)
前面几篇基本介绍了runtime中的大部分功能,包括对类与对象.成员变量与属性.方法与消息.分类与协议的处理.runtime大部分的功能都是围绕这几点来实现的. 本章的内容并不算重点,主要针对前文中对 ...
- LINQ 之Union All/Union/Intersect操作
闪存 首页 新随笔 管理 订阅 Union All/Union/Intersect操作 适用场景:对两个集合的处理,例如追加.合并.取相同项.相交项等等. Concat(连接) 说明:连接不同 ...