赏关(求调)

P1597 语句解析

```cpp #include<bits/stdc++.h> //#define //不加";" using namespace std; int b[3],i; int main() { string s; getline(cin,s); for(i=0;i<s.size();){ if(s[i]=='a') { if(s[i+3]=='a') b[1]=b[1]; else if(s[i+3]=='b') b[1]=b[2]; else if(s[i+3]=='c') b[1]=b[3]; else b[1]=s[i+3]-'0'; } if(s[i]=='b') { if(s[i+3]=='b') b[2]=b[2]; else if(s[i+3]=='a') b[2]=b[1]; else if(s[i+3]=='c') b[2]=b[3]; else b[2]=s[i+3]-'0'; } if(s[i]=='c') { if(s[i+3]=='c') b[3]=b[3]; else if(s[i+3]=='a') b[3]=b[1]; else if(s[i+3]=='b') b[3]=b[2]; else b[3]=s[i+3]-'0'; } i+=5; } cout<<b[1]<<" "<<b[2]<<" "<<b[3]; return 0; } ```
by 奈芙蓮 @ 2024-08-24 22:53:41


已关
by zyx_dzpd @ 2024-08-24 22:54:59


@[zyx_dzpd](/user/1351767) i+=5,i++,那i不就多加了1吗,要么把i+=5->i+=4,要么把i++删除,包A AC **(虽然我知道你已经AC了,但还是求关,我已经关你了)** QwQQwQ
by wangmuze @ 2024-08-31 11:12:46


@[wangmuze](/user/1204677) 好吧,关注了
by zyx_dzpd @ 2024-08-31 20:31:25


@[zyx_dzpd](/user/1351767) ^_^^_^^_^^_^^_^^_^
by wangmuze @ 2024-09-07 16:43:26


|