Codeforces Round #334 (Div. 2) A. Uncowed Forces

题意:求最终选手得分
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
const int maxm=10;
int a[maxm];
int b[maxm];
int m,n;
int main()
{
    int sum=0;
    for(int i=0;i<5;i++)
    {
        scanf("%d",&a[i]);
    }
    for(int i=0;i<5;i++)
    {
        scanf("%d",&b[i]);
    }
    scanf("%d%d",&m,&n);
    for(int i=0;i<5;i++)
    {
        int x,y;
       if(i==0)
       {
           x=150;
           y=500-2*a[i]-50*b[i];
       }
       else if(i==1)
       {
           x=300;
           y=1000-4*a[i]-50*b[i];
       }
       else if(i==2)
       {
           x=450;
           y=1500-6*a[i]-50*b[i];
       }
       else if(i==3)
       {
           x=600;
           y=2000-8*a[i]-50*b[i];
       }
       else
       {
           x=800;
           y=2500-10*a[i]-50*b[i];
       }
       sum+=max(x,y);
    }
    sum+=(100*m-50*n);
    printf("%d\n",sum);
    return 0;
}

你可能感兴趣的:(Codeforces Round #334 (Div. 2) A. Uncowed Forces)