STL

vectorのrotate 使い方

rotate(first, middle, last); middleの要素が先頭、middle-1の要素が末尾となるように、 [first,last)の要素の並びを回転させる。 https://cpprefjp.github.io/reference/algorithm/rotate.html void rotate_test(){ VI A = {1,2,3,4,5,6,7}; // 左に1つシ…