80求助,4,5会WA
查看原帖
80求助,4,5会WA
75734
duanyuchen楼主2018/5/19 20:17

输出到最后面时候

#include就不输出了 using namespace std; int b[500]; int main() { int n; cin >> n; for (int i = 0; i < 2 * n; i++) { cin >> b[i]; } int t = 0; for (int i = 0; i < 2 * n; i++) { if (i % 2 == 0) { while (b[i]--) { if (t == n) { cout << endl; t = 0; } cout << 0; t++; } } else { while (b[i]--) { if (t == n) { cout << endl; t = 0; } cout << 1; t++; } }

}
return 0;

}

2018/5/19 20:17
加载中...