翻译
题目描述 Recently, there have been $n$ annoying things, and each thing has a positive integer pain - inflicting value (since the person has extremely poor psychological endurance). God of Love and Sorrow wants to know what the minimum sum of the pain - inflicting values of $m$ consecutive things is. However, due to his busy schedule, God of Love and Sorrow has to ask you to write a program to tell him. 输入格式 The first line contains two integers separated by a space, representing $n$ and $m$ respectively. From the second line to the $(n + 1)$ - th line, there is an integer in each line. The integer $a_i$ in the $(i + 1)$ - th line represents the pain - inflicting value $a_i$ of the $i$ - th thing. 输出格式 Output a single integer on one line, representing the minimum sum of the pain - inflicting values of $m$ consecutive things. 输入输出样例 输入 #1 复制 ``` 8 3 1 4 7 3 1 2 4 3 ``` 输出 #1 复制 ``` 6 ``` 说明/提示 数据规模与约定 - For 30% of the data, it is guaranteed that $n\leq20$. - For 60% of the data, it is guaranteed that $n\leq100$. - For 90% of the data, it is guaranteed that $n\leq10^3$. - For 100% of the data, it is guaranteed that $0\leq m\leq n\leq3\times10^3$ and $1\leq a_i\leq100$. [2025-11-24 19:53:30 | AI问答 | 386点数解答]
- [阿里通义] 写出单词hare的发音和翻译,要求输出格式如:发音[],翻译[]。(10点数解答 | 2024-03-25 16:18:25)198
- [阿里通义] 写出单词hall的发音和翻译,要求输出格式如:发音[],翻译[]。(12点数解答 | 2024-03-25 16:18:45)191
- [阿里通义] 单词hall的发音和翻译,要求输出格式如:发音[],翻译[]。(13点数解答 | 2024-03-25 16:19:07)202
- [阿里通义] Redefine the content/information of Modbus address 0x304C 翻译(98点数解答 | 2025-08-25 09:30:08)66
- [字节豆包] #include<bits/stdc++.h> using namespace std; int main(){ string s; int ans=0; while(cin>>s) ans+=s.length(); cout<<ans<<endl; return 0; } 翻译 (270点数解答 | 2025-11-18 19:23:53)16
- [字节豆包] #include<iostream>//标准输入输出头 using namespace std; int main() { int n,x,k;//定义一下 cin>>n; for(int i=1;i<=100;i++) /*循环,因为要找x最大 的情况所以从1开始往后找*/ { for(int j=200;j>=1;j--) /*要找k最小的情况,所以 从200开始往前面找*/ { if(i*7+j*21==n/52) //判断一下是否能正好攒够钱 { x=i;//把i的值给x k=j;//把j的值给k /*由于后一组x和k的值会覆盖上一组, 所以最后输出的一定是 x最大,k最小的情况*/ } } } cout<<x<<endl;//输出 cout<<k<<endl; return 0;//好习惯别忘了 } 翻译(298点数解答 | 2025-11-23 20:46:20)15
- [字节豆包] #include<bits/stdc++.h> using namespace std; long long n,m,a[10]; int main(){ cin>>n>>m; for(long long i=n;i<=m;i++) { long long t=i; while(t!=0) { a[t%10]++; t/=10; } } for(int i=0;i<10;i++) { cout<<a[i]<<" "; } return 0; } 翻译(446点数解答 | 2025-11-24 19:02:09)19
- [字节豆包] 翻译(386点数解答 | 2025-11-24 19:53:30)7