当前位置:网站首页>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
边栏推荐
- 神机百炼3.54-染色法判定二分图
- 复杂 json数据 js前台解析 详细步骤《案例:一》
- 如何使用MITMPROXy
- 500. Keyboard line
- Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
- Talking about MySQL database
- 数据回放伴侣Rviz+plotjuggler
- Redis key value database [seckill]
- I/o impressions from readers | prize collection winners list
- PHP inner class name is the same as the inner class method name
猜你喜欢

借力 Google Cloud 基础设施和着陆区,构建企业级云原生卓越运营能力

Unity Shader 学习笔记(3)URP渲染管线带阴影PBR-Shader模板(ASE优化版本)

穀歌出海創業加速器報名倒計時 3 天,創業人闖關指南提前收藏!

Little bear sect manual query and ADC in-depth study

MySQL transaction and isolation level

CNN visualization technology -- detailed explanation of cam & grad cam and concise implementation of pytorch

51 single chip microcomputer - ADC explanation (a/d conversion, d/a conversion)

深度学习分类网络--Network in Network

Unity shader learning notes (3) URP rendering pipeline shaded PBR shader template (ASE optimized version)

Flutter hybrid development: develop a simple quick start framework | developers say · dtalk
随机推荐
Lambda 表达式 和 方法引用
How vite is compatible with lower version browsers
DRM display framework as I understand it
深度学习分类网络--VGGNet
Linkage between esp8266 and stc8h8k single chip microcomputer - Weather Clock
JS determines whether the mobile terminal or the PC terminal
Regular expression summary
步骤详解 | 助您轻松提交 Google Play 数据安全表单
I/o impressions from readers | prize collection winners list
PHP read file (read JSON file, convert to array)
[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP
Fundamentals of software testing
keepalived安装使用与快速入门
php按照指定字符,获取字符串中的部分值,并重组剩余字符串为新的数组
php继承(extends)
uni-app开发中遇到的问题(持续更新)
Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
php内类名称与类内方法名相同
Stick to the big screen UI, finereport development diary
mock-用mockjs模拟后台返回数据