50分求调

P1200 [USACO1.1] 你的飞碟在这儿 Your Ride Is Here

第17行,“strlen(a)”
by Intrz @ 2022-10-19 09:11:32


```cpp #include<iostream> #include<cstring> #include<string> using namespace std; string s1,s; int main() { #ifndef ONLINE_JUDGE freopen("ride.in","r",stdin); freopen("ride.out","w",stdout); #endif //freopen("ride.in","r",stdin); //freopen("ride.out","w",stdout); cin>>s1>>s; int l1=s1.size(); int l2=s.size(); int a1=1,a2=1; for(int i=0; i<l1; i++) { a1*=s1[i]-'@';//operation } for(int j=0; j<l2; j++) { a2*=s[j]-'@';//too } a1%=47;//mod a2%=47;//mod too if(a1==a2)cout<<"GO"; else cout<<"STAY"; return 0; } ```
by int_stl @ 2022-11-02 14:55:55


|