标签:统计 style argc scanf == can 字符 基本 建议
4
????
4.1250
1 #include <cstdio> 2 3 const int N(233333); 4 double ans,comb; 5 char s[N]; 6 7 int Presist() 8 { 9 int n; scanf("%d",&n); 10 scanf("%s",s); 11 for(int i=0; i<n; ++i) 12 { 13 if(s[i]==‘x‘) comb=0; 14 else if(s[i]==‘o‘) 15 ++comb,ans+=comb+comb-1; 16 else ans+=comb+0.5,comb=(comb+1)/2; 17 } 18 printf("%.4lf",ans); 19 return 0; 20 } 21 22 int Aptal=Presist(); 23 int main(int argc,char**argv){;}
标签:统计 style argc scanf == can 字符 基本 建议
原文地址:http://www.cnblogs.com/Shy-key/p/7853631.html