大佬们能不能帮我看看第一题为啥只对了20%,问题在哪😂 #include<iostream> (5488)#include<vector> #include<string> (5850)#include<algorithm> using namespace std; int main() { int num; cin >> num; vector<vector<string>>res(num, vector<string>(5)); for (int i = 0; i < num; i++) { string name; int chinese, math, english; cin >> name >> chinese >> math >> english; res[i][0] = to_string(chinese + math + english); res[i][4] = name; res[i][1] = to_string(chinese); res[i][2] = to_string(math); res[i][3] = to_string(english); } sort(res.rbegin(), res.rend()); //sort(res.begin(), res.end()); int i = 0;
点赞 1
牛客网
牛客企业服务