标签:clu pac long cout name dma its out space
#include<bits/stdc++.h>
using namespace std;
long long n,p,ans=0,total=0,apple=0;
int main()
{
string a[100000];
cin>>n>>p;
p=p>>1;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
for(int i=n;i>=1;i--)
{
total=total*2;
if(a[i]=="halfplus")
total++;
apple+=total;
}
cout<<apple*p;
return 0;
}
CF632A Grandma Laura and Apples
标签:clu pac long cout name dma its out space
原文地址:https://www.cnblogs.com/dwj030917/p/10427151.html