https://www.codechef.com/problems/TOTSCR

i was solving this problem and i did this

#include

using namespace std;

int main(){

int t;

cin>>t;

while(t–){

int N,K;

cin>>N>>K;

int A[K];

for(int i=0;i<K;i++){

cin>>A[i];

}

while(N–){

int sum=0;

string S;

cin>>S;

for(int i=0;i<K;i++){

if(S[i]==‘1’)

sum=sum+A[i];

}

cout<<sum<<endl;

}

```
}
```

return 0;

}

can some one please let me what am i doing wrong?