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 ...
随机推荐
- 搭建PHP建站环境
PHP是一种网站后端脚本语言,通常在web开发中使用apache+PHP+MYSQL这种黄金搭档来建立支持PHP的站点,PHP运行环境或者说任何技术的运行环境都不是简单的加法,即使是安装有apache ...
- GridView Tab/Enter键插入新行
此段代码是从DevExpress官方回复文件中得到的.可以用来优化GridView的操作体验. /// <summary> /// GridView添加新行 /// </summar ...
- java--调整JVM内存的大小
默认占用:64M的内存 修改内存的方式: 1.某一类,右键选择--Run Configurations 2.选择--Arguments 3.在VM argments中输入内容,如:-Xmx80m
- sublime 2中Package control安装和使用
安装: 安装时,如果想查看安装进度,可打开console(View->Show Console) 安装Package control有两中方法: 方法1:通过代码安装 import urllib ...
- leetcode medium
419. Battleships in a Board --No iven an 2D board, count how many different battleships are in it. T ...
- Django命令行相关命令 以及创建一个空白网页的步骤
django相关命令行命令: django.admin.py是Django的一个用于管理任务的命令行工具,manage.py是对django-admin.py的简单包装,每个Django Projec ...
- feature2d相关
1.Harris角点检测 是基于灰度图像的角点检测. 灰度变化率函数如下: 其中的w(x,y)为加权函数,可为常数或为高斯函数.之后对E(u,v)进行泰勒级数的展开与化简,最终得到 ,,Ix,Iy是图 ...
- 解决后端动态生成css时无法调用
在PHP 设置头 header("Content-type: text/css");
- CodeForces 340E Iahub and Permutations
容斥原理,组合数. 找出有$cnt$个数字还有没放,那么总方案数就是$cnt!$. 总方案数里面包含了正确的和非正确的,我们需要将非正确的删去. 先删去$1$个数字$a[i]=i$的情况,发现会多删, ...
- CodeForces 710A King Moves
简单题. #pragma comment(linker, "/STACK:1024000000,1024000000") #include<cstdio> #inclu ...