1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); vector<int> arr = { 1,67,23,67,2,3,1,6,8,678,567 }; // 3번째 지운다. arr.erase(arr.begin() + 3); } | cs |
'복습이 필요한 알고 팁' 카테고리의 다른 글
set을 더 잘써보자. (multiset 과 기타 잡팁들...) (0) | 2020.09.05 |
---|---|
동적 2차원 배열 + 특정 수로 초기화 하기 (0) | 2020.09.05 |
nCr 좀 더 간단하게 (r 이 작으면서 고정적인 값일때) (0) | 2020.08.29 |
정렬 STL을 잘 써보자 (0) | 2020.06.26 |
Set을 잘 써보자. (map 에 관한것도 조금) (0) | 2020.06.12 |