在末尾追加要挪几次
同样数「挪了几次」,这次是在末尾追加:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n = 5, moves = 0;
// 末尾追加:后面本来就是空的,一个都不用挪
cout << moves << endl;
}
(本题用 g++ -std=c++17 -O0 编译。)
同样数「挪了几次」,这次是在末尾追加:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n = 5, moves = 0;
// 末尾追加:后面本来就是空的,一个都不用挪
cout << moves << endl;
}
(本题用 g++ -std=c++17 -O0 编译。)
全部评论