What is the difference between these 2 codes

AC: https://www.codechef.com/viewsolution/34563641
WA: https://www.codechef.com/viewsolution/34627181

in one code vector is used and in one code array is used. I cant find any other difference and I dont understand why one code is giving WA while the other is being accepted.

@Ishitagambhir in the vector code(the one that is not passing) use vector unsigned long long int v(n)
, it will pass. ( you used vector ll v(n) where ll is int
hope its clear if yes dont forget to hit like and mark resolved :smiley:

1 Like