当前位置:网站首页>Contest3147 - game 38 of 2021 Freshmen's personal training match_ E: Listen to songs and know music
Contest3147 - game 38 of 2021 Freshmen's personal training match_ E: Listen to songs and know music
2022-07-02 06:06:00 【This question AC sleep again】



//
#include<bits/stdc++.h>
using namespace std;
// 1e5*1e3=1e8 < int
const int N=1e5+6;
const int A=1111;
int a[N];
int main()
{
int n,t,i,temp;
while( ~scanf("%d%d",&n,&t) )
{
temp=0;
memset( a,0,sizeof( a ) );
for( i=1;i<=n;i++ ) scanf("%d",&a[i]);
for( i=1;i<=n;i++ )
{
if( temp+a[i]<t ) temp+=a[i]; // Anticipation < No =
else break;
}
printf("%d\n",i);
}
return 0;
}//
find:
01 Predict not to take, etc
eg.
3 5
5 5 5
边栏推荐
- PHP parent
- Mathematical statistics and machine learning
- Use some common functions of hbuilderx
- Flutter hybrid development: develop a simple quick start framework | developers say · dtalk
- 来自读者们的 I/O 观后感|有奖征集获奖名单
- JWT工具类
- Web page user step-by-step operation guide plug-in driver js
- On Web server
- Memcached installation
- 使用sha256文件验证下载的文件
猜你喜欢
随机推荐
深度学习分类网络--VGGNet
Brain and cognitive neuroscience matlab psychoolbox cognitive science experimental design - experimental design 4
The official zero foundation introduction jetpack compose Chinese course is coming!
图片裁剪插件cropper.js
Fundamentals of software testing
经典文献阅读之--SuMa++
[C language] screening method for prime numbers
PHP development and testing WebService (soap) -win
步骤详解 | 助您轻松提交 Google Play 数据安全表单
[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP
让每一位开发者皆可使用机器学习技术
Spark概述
Ti millimeter wave radar learning (I)
495. Timo attack
Use some common functions of hbuilderx
Shenji Bailian 3.54-dichotomy of dyeing judgment
Flutter 混合开发: 开发一个简单的快速启动框架 | 开发者说·DTalk
ESP8266与STC8H8K单片机联动——天气时钟
Common websites for Postgraduates in data mining
从设计交付到开发,轻松畅快高效率!








