四道题。一道水题,一道思维+前缀和,一道单调栈,一道贪心。 给一个初始,以及一串操作,就,就,就,就,问最后能否走到,输出或者 Input: 4 2 SDDSDD Output: 0 #include <bits/stdc++.h> using namespace std; int main() { int x, y; string s; cin >> x >> y >> s; for (char c : s) { if (c == 'W') ++y; if (c == 'S') --y; ...