liu12073_ @ 2023-10-14 21:58:46
#include<iostream>
using namespace std;
int main() {
int n, q[210], r = 0;
cin >> n;
for (int i = 1; i <= n * 2; i++) cin >> q[i];
for (int j = 1; j <= n * 2; j++) {
for (int k = 1; k <= q[j]; k++) {
if (j % 2) {
if (!(r % n)) cout << endl;
cout << 0;
r++;
} else {
if (!(r % n)) cout << endl;
cout << 1;
r++;
}
}
}
return 0;
}
样例没问题,就是不知道为什么全部WA
by six_one @ 2023-10-14 22:02:48
是
by six_one @ 2023-10-14 22:05:35
哦,我的意思是,循环读入的边界不应该是