S 組估分

xrlong發表於2024-09-21

S 組估分

#include<bits/stdc++.h>
using namespace std;
using llt=long long;
using llf=long double;
using ull=unsigned long long;
#define endl '\n'
#define Il inline
#ifdef LOCAL
	FILE *InFile=freopen("in_out/in.in","r",stdin),*OutFile=freopen("in_out/out.out","w",stdout);
#else
	FILE *InFile=stdin,*OutFile=stdout;
#endif

const string Ans="AACBBBDABDACBCDABBBCAAABCCABACACAAAAAAABAA";
const double Src[]={2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1.5,1.5,1.5,3,4,1.5,1.5,2,3,3,3,1.5,1.5,1.5,3,3,4,3,3,3,3,3,3,3,3,3,3};

int main(){
	ios::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
	double s=0;
	for(int i=0;i<42;++i){char c; cin>>c; if(c==Ans[i]) s+=Src[i];}
	cout<<fixed<<setprecision(1)<<s<<endl;
}

相關文章