I was taught not to write things like a=a+++++a
.
However I love writing a++
because I believe that it always gets executed after a whole sentence (perhaps, right after a ,
or ;
?)
But today I wrote this and got WA:
if(hh < tt && a[hh+1] == a[hh]-1) c[hh+1] += 2*c[hh++];
wa code: 154812779
rewrote it like this and got AC:
if(hh < tt && a[hh+1] == a[hh]-1) c[hh+1] += 2*c[hh], hh++;
ac code: 154812722
I'm wondering if it's wrong somewhere else or am I misunderstanding the usage of x++?