#include <iostream>
#include <cstring>
using namespace std;
const int N = 200010;
int n;
int b[N];
int main()
{
int t;
cin >> t;
while (t -- )
{
int n;
cin >> n;
memset(b, 0, (n + 1) * 4);
for (int i = 1; i <= n; i ++ )
{
int a;
cin >> a;
b[max(1, i - a + 1)] ++ , b[i + 1] -- ;
}
for (int i = 1; i <= n; i ++ )
{
b[i] += b[i - 1];
printf("%d ", !!b[i]);
}
puts("");
}
return 0;
}
改变数组元素——Acwing3729
最新推荐文章于 2024-08-30 15:57:36 发布