解题思路:
注意事项:
参考代码:
#include<iostream> #include<sstream> #include<string> using namespace std; int a[100000]; int main(){ int n=0; string s; getline(cin, s); istringstream iss(s); while(iss>>a[++n]); n-=1; int result=0; for(int i=1; i<=n-1; ++i){ for(int j=i+1; j<=n; ++j){ result = max(result, (j-i)*min(a[i],a[j])); } } printf("%d\n",result); return 0; }
0.0分
1 人评分
C语言训练-计算1977!* (C语言代码)浏览:890 |
弟弟的作业 (C++代码)浏览:1295 |
A+B for Input-Output Practice (VI) (C++代码)浏览:413 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:530 |
printf基础练习2 (C语言代码)浏览:740 |
C语言程序设计教程(第三版)课后习题6.6 (C语言代码)浏览:624 |
C语言程序设计教程(第三版)课后习题8.7 (C语言代码)浏览:594 |
简单的a+b (C语言代码)浏览:572 |
Tom数 (C语言代码)浏览:724 |
C二级辅导-等差数列 (C语言代码)浏览:694 |