题目描述
blablabla
样例
#include <iostream>
using namespace std;
int main()
{
double a,b,c,d;
cin>>a>>b>>c>>d;
double X=a*0.2+b*0.3+c*0.4+d*0.1;
printf("Media: %.1lf\n",X);
if(X<5.0)
cout<<"Aluno reprovado.\n";
else if(X>7.0)
cout<<"Aluno aprovado.\n";
else {
cout<<"Aluno em exame.\n";
double Y;
cin>>Y;
printf("Nota do exame: %.1lf\n",Y);
double Z=(X+Y)/2;
if(Z>=5.0)
cout<<"Aluno aprovado.\n";
else
{cout<<"Aluno reprovado.\n";}
printf("Media final: %.1lf\n",Z);
}
return 0;
}
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla