| 记录编号 | 278103 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1061.[NOIP 2004]不高兴的津津 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.002 s | ||
| 提交时间 | 2016-07-07 09:40:56 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
freopen("unhappy.in","r",stdin);
freopen("unhappy.out","w",stdout);
int a[20],b=0,max=8,n=0,d;
for(int i=1;i<=14;i++)
cin>>a[i];
for(int j=1;j<=13;j+=2)
{
n++;
a[n]=a[j]+a[j+1];
if(a[n]>8)
b++;
if(a[n]>max)
{
max=a[n];
d=n;
}
}
if(b==0)
cout<<0;
else
cout<<d;
return 0;
}