Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
263 B
15
Indexable
vector<int> compareTriplets(vector<int> a, vector<int> b) {
    vector<int> res (2, 0);
    
    for (int i = 0; i < a.size(); i++) {
        if (a[i] > b[i]) 
            res[0]++;
        else if (a[i] < b[i]) 
            res[1]++;
    }
    
    return res;
}
Leave a Comment