A-DFS搜索 思路: 遍历字符S, 按顺序分别寻找 "DFS" , "dfs"。 以下是代码部分 #include<bits/stdc++.h> using namespace std; string s; int main() { int t, n; ios::sync_with_stdio(false); cin >> t; while(t --) { cin >> n >> s; for(auto tem : {"DFS", "dfs"}) { int kk = 0; for(int i = 0; i < n; i ++) if...