无故RE求助

P5587 打字练习

@[C2020陈铭浩](/user/307603) AC了!!! ```cpp #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<string> #include<cstdlib> using namespace std; string now,f; char s[100010][10010],ss[100010][10010]; int cnt,ans,x,cnt2; int main(){ while(getline(cin,now)){ if(now=="EOF") break; cnt++; int cl=0; for(int i=0;i<now.length();i++){ if(now[i]=='<'){ cl--; if(cl<0) cl=0; continue; } s[cnt][cl]=now[i]; cl++; } } while(getline(cin,f)){ if(f=="EOF") break; cnt2++; int cl=0; for(int i=0;i<f.length();i++){ if(f[i]=='<'){ cl--; if(cl<0) cl=0; continue; } ss[cnt2][cl]=f[i]; cl++; } for(int j=0;j<cl;j++) if(ss[cnt2][j]==s[cnt2][j]) ans++; } cin>>x; cout<<(int)((ans*1.0)/(x*1.0)*60+0.5); return 0; } ```
by Interstice @ 2020-07-15 19:35:13


https://www.luogu.com.cn/record/35193969
by Interstice @ 2020-07-15 19:35:43


@[李东齐01](/user/342371) 谢谢!!
by _cmh @ 2020-07-15 20:23:19


上一页 |