How was your lunchtime?
This contest was good enough for me.
Rank 270.
Wasted a bit of time in the second one. Third was a good problem
How was your lunchtime?
This contest was good enough for me.
Rank 270.
Wasted a bit of time in the second one. Third was a good problem
literally rank 11 again
can anyone explain the 3rd one? convert the string??
I don’t know if it’s enough, so now I get to anxiously await rating changes
it was my first time and i scored 130 :
orzz
only orz if I get red
yeah may be
sadly I didnt see the bound on A[i] in TREDIFF :(.
It was so easy
Got stuck on this. Wanted to get 30points but couldn’t get it.
I wrote this beautiful code, so anyone kind enough could help me and tell where I went wrong.
Lets wait for editorial.I was getting WA in it!
Lol
Escape one seems so simple yet so hard lol
yeah
when both their total distance walked are same and both A[i] and B[i] are same
while(t--) {
lli n;
cin>>n;
lli a[n],b[n];
scanarr(a,n);
scanarr(b,n);
lli prea[n];
prea[0]=a[0];
for(lli i=1;i<n;i++){
prea[i] = prea[i-1]+a[i];
}
lli preb[n];
preb[0]=b[0];
for(lli i=1;i<n;i++){
preb[i] = preb[i-1]+b[i];
}
lli cnt=0;
for(lli i=0;i<n;i++){
if(prea[i]==preb[i] and a[i]==b[i])
cnt+=a[i];
}
cout<<cnt<<endl;
}
stucked in q3
you have to convert the first string to second string using minimum operation and operation is like you have to take a subset and replace that subset with its smallest character, like String A=aaab and String B=aaaa if you choose index 2 & 3 you got sub set from String A as (ab) here in this subset you have a as smallest so you can convert it to aa and put this subset back to original String thus making it aaaa.
i dont know the editorial approach but i selected largest character from B and reduce all non matching character of A to that chatacter of B and then did same for second largest and so on…
same here bro😁