単純ループ // 1重ループ for(int i = 0; i < n; i++){ } for(int i = 0; i < v.size(); i++){ int a = v[i]; } // 2重ループ for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ } } // YX ループ for(int y = 0; y < h; y++){ for(int x = 0; x < w; x++){ } } // 3重ループ for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ for(int t = 0; t < n; t++){ } } } // イテレーター set<int>::iterator itr = se.begin(); vector<int> v; while(itr != se.end()){ v.pb(*itr); itr++; }