fork download
  1. #include <iostream>
  2. #include <cctype>
  3.  
  4.  
  5. int main() {
  6. std::size_t counts[33] = {0};
  7.  
  8. for (char ch; std::cin >> ch; ) {
  9. if (std::isalpha(ch)) {
  10. ++counts[std::tolower(ch) - 'a'];
  11. }
  12. }
  13.  
  14. for (std::size_t i = 33; i-- != 0; ) {
  15. if (counts[i] >= 3) {
  16. std::cout << static_cast<char>(i + 'a');
  17. }
  18. }
  19. std::cout << std::endl;
  20. }
  21.  
Success #stdin #stdout 0s 3344KB
stdin
Adding points in this manner can cause the tree to become unbalanced, leading to decreased tree performance. The rate of tree performance degradation is dependent upon the spatial distribution of tree points being added, and the number of points added in relation to the tree size. If a tree becomes too unbalanced, it may need to be re-balanced to restore the performance of queries that rely on the tree balancing, such as nearest neighbour searching.
stdout
utsrponmlihgfedcba