#include <iostream>
#include <algorithm>
#include <vector>
void deleteConsecutiveDuplicates(std::vector<std::string> &vec) {
vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
}
int main() {
std::vector<std::string> vec = {"c", "c", "c++", "c++", "java", "java", "java", "c++", "c", "c", "c"};
deleteConsecutiveDuplicates(vec);
for (const std::string &word : vec) {
std::cout << word << " ";
}
}
/*
run:
c c++ java c++ c
*/