My issue
its showing the runtime error
My code
#include<stdio.h>
void process_test_case(int N, int K, int A[]){
for(int i=0; i<N; i++){
if(K>=A[i]){
printf("1");
K -= A[i];
}else{
printf("0");
}
}
printf("\n");
}
int main(){
int S;
scanf("%d", &S);
while(S--){
int N, K;
scanf("%d %d", &N, &K);
int A[N];
for(int i=0; i<N; i++){
scanf("%d", A[i]);
}
process_test_case(N, K, A);
}
return 0;
}
Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP300A/problems/ATM2