why it is giving wrong output.
Friends pairing problem
hello @rohit2299
a)
u are accessing index n of dp array , for that ur dp size should be atleast n+1.
so change ur dp size.
b) use long long datatype in place of int
why it is giving wrong output.
hello @rohit2299
a)
u are accessing index n of dp array , for that ur dp size should be atleast n+1.
so change ur dp size.
b) use long long datatype in place of int