μ’ν λ¬ΆκΈ°: C++ pair
μ’ν λ¬Άμ λ μ’μ C++ STL μκ°
λΌμ΄λΈλ¬λ¦¬ μΈν΄λ£¨λ
#include <pair>
#include <vector>
#include <queue>
// νλ 벑ν°μ push_back()μΌλ‘ λ§μ΄ μμ©ν¨!!
Example
pair<int, int> p;
p = make_pair(3, 3);
p = {3, 3};
μ‘°κΈ λ μμ©μ νλ©΄?
vector< pair<int,int> > v;
v.push_back(make_pair(2,2));
queue< pair<int,int> > q;
q.push(make_pair(2,2));
Leave a comment