运行 ❯
获得自己
的
网站
×
更改方向
更换主题,深色/浅色
转到 Spaces
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector<int> numbers = {1, 7, 3, 5, 9, 2}; vector<int> other = {9, 7, 5, 3, 2, 1}; if (is_permutation(numbers.begin(), numbers.end(), other.begin())) { cout << "Permutation found"; } else { cout << "No permutation found"; } return 0; }
找到置换