我有两个清单:
[a, b, c] [d, e, f]
我想:
[a, d, b, e, c, f]
在Python中执行此操作的简单方法是什么?
据我所知,Batch没有给出UNIX时间的命令.我能找到的最接近的是%time%,它只显示时间戳.
批处理中是否有命令或命令集可以获得UNIX时间?
我基本上有这样的东西(我更改了变量名称,抱歉,如果看起来很奇怪)
#include <stack>
#include <memory>
#include <vector>
struct Sequence {
std::stack<std::unique_ptr<int>> numbers;
// It works if I change it to this
//std::stack<std::unique_ptr<int>, std::vector<std::unique_ptr<int>>> numbers;
Sequence(const std::vector<int> &v) {
for (int i : v) {
numbers.push(std::make_unique<int>(i));
}
}
};
int main() {
// constructing alone works fine
// Sequence s{{3, 1, 5}};
// but pushing it into a vector gives an error
std::vector<Sequence> ts;
ts.emplace_back(std::vector<int>{1, 5, 2});
return 0;
}
Run Code Online (Sandbox Code Playgroud)
编译出现这个错误:
/usr/include/c++/10/bits/stl_uninitialized.h:137:72: error: static assertion failed: result type must be constructible …Run Code Online (Sandbox Code Playgroud)