rt
代码如下,可能码风有点奇怪,不喜勿喷 qwq
#include <iostream>
#include <vector>
using namespace std;
int main() {
int a, n, p;
cin >> a;
for(int i = 0; i < a; i++) {
cin >> n >> p;
if(n < 2 * p + 1) {
cout << -1 << endl;
} else {
if(n - 3 * p > 0) {
cout << string(n - 3 * p, '0');
}
cout << 1;
for(int u = 0; u < p; u++) {
cout << "01";
}
cout << endl;
}
}
return 0;
}