• + 0 comments
    int count = 0;
        if(B.size() <= 1) return "NO";
        else {
            for(int i = 0; i< B.size(); i++){
                if(B[i]%2 == 0) continue;
                if (i + 1 < B.size()) {
                    B[i]++;
                    B[i + 1]++;
                    count += 2;
                }
            }
        }
        
        return B[B.size()-1]%2 == 0? to_string(count) : "NO";