当前位置:网站首页>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
边栏推荐
- Redis Key-Value数据库【初级】
- Problems encountered in uni app development (continuous update)
- 借力 Google Cloud 基础设施和着陆区,构建企业级云原生卓越运营能力
- JS determines whether the mobile terminal or the PC terminal
- Mathematical statistics and machine learning
- From design delivery to development, easy and efficient!
- Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
- Comment utiliser mitmproxy
- [paper translation] gcnet: non local networks meet squeeze exception networks and beyond
- 外部中断无法进入,删代码再还原就好......记录这个想不到的bug
猜你喜欢

Replace Django database with MySQL (attributeerror: 'STR' object has no attribute 'decode')

经典文献阅读之--SuMa++

神机百炼3.54-染色法判定二分图
![[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP](/img/25/73f11ab2711ed2cc9f20bc7f9116b6.png)
[whether PHP has soap extensions installed] a common problem for PHP to implement soap proxy: how to handle class' SoapClient 'not found in PHP

51单片机——ADC讲解(A/D转换、D/A转换)

【C语言】简单实现扫雷游戏

Google play academy team PK competition, official start!

500. Keyboard line

How to use mitmproxy

MySQL transaction and isolation level
随机推荐
Test case
Unity Shader 学习笔记(3)URP渲染管线带阴影PBR-Shader模板(ASE优化版本)
php内的addChild()、addAttribute()函数
MySQL transaction and isolation level
经典文献阅读之--Deformable DETR
神机百炼3.53-Kruskal
Nacos 启动报错 Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL
Database learning summary 5
Compte à rebours de 3 jours pour l'inscription à l'accélérateur de démarrage Google Sea, Guide de démarrage collecté à l'avance!
让每一位开发者皆可使用机器学习技术
外部中断无法进入,删代码再还原就好......记录这个想不到的bug
ROS2----LifecycleNode生命周期节点总结
PHP gets CPU usage, hard disk usage, and memory usage
Keepalived installation, use and quick start
Fundamentals of software testing
官方零基础入门 Jetpack Compose 的中文课程来啦!
PHP development and testing WebService (soap) -win
495.提莫攻击
php读文件(读取json文件,转换为数组)
Spark overview