Please read the new rule regarding the restriction on the use of AI tools. ×

удаление неуникальных элементов в векторе

Revision ru1, by bo_sinn, 2024-09-27 18:41:57

sort(all(a)); a.resize(unique(all(a)) — a.begin());

Tags vector, c++

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru1 Russian bo_sinn 2024-09-27 18:41:57 101 Первая редакция (опубликовано)