Advertisement

华为OD机试题 C++ ABR 车路协同场景 2022年第四季度 满分为100分

阅读量:

**■**题目描述

复制代码
 #include<bits/stdc++.h>

    
  
    
 using namespace std;
    
  
    
 void SplitInt(string input, vector<int> &output, char patten);
    
  
    
 void Split(string input, vector <string> &output, string pattern);
    
  
    
 int main()
    
 {
    
     string str;
    
     getline(cin, str);
    
     vector <string> vec;
    
     Split(str, vec, "},");
    
     vector<int> arrayA, arrayB;
    
     SplitInt(vec[0].substr(vec[0].find('{') + 1), arrayA, ',');
    
     SplitInt(vec[1].substr(vec[1].find('{') + 1), arrayB, ',');
    
     int R = stoi(str.substr(st

全部评论 (0)

还没有任何评论哟~