Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <list>#include <algorithm>#include <vector>#include <set>#include <map>#include <string>using namespace std;int main() {// input x y zvector<int> xyz(3);for (int i = 0; i < 3; i++) {cin >> xyz[i];}sort(xyz.begin(), xyz.end());// input sequencestring seq;cin >> seq;// ******* solve ********// imitationint r = 0, b = 0, y = 0;// denote the number of existent ballsvector<int> rby(3, 0); // denote the differencesint maxret = 0; // record the max number of the balls// loop to deal withfor (unsigned i = 0; i < seq.length(); i++) {if (seq[i] == 'R') r++;