class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 求出最终获胜帮派的名称 * @param s string字符串 * @return string字符串 */ string predictVictory(string s) { // write code here int cnt = 0; for(auto c:s){ if(c == 'R')cnt++; } if(cnt != s.size() - cnt){ if(cnt > s.size() - cnt)return "Red"; else return "Dark"; }else{ if(s[0] == 'R')cout << "Red"; else return "Dark"; } return ""; } };