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