WA

Revision en1, by _Halabi, 2024-07-01 22:48:56

i tried to solve this problem but i have WA 19 , many trials without result so i hope some one can help me <3

my solutin idea :

for each u  we preprocess it that we store for it the 1<<k elemnt after  u in valid sequence    dp[u][k]  and sum untill this elemnt   sum[u][k]  >>  so we can ans queryies about u in log time [submission:268374991]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English _Halabi 2024-07-01 22:50:25 11 Tiny change: ' log time [submission:268374991]' -> ' log time \n\n\nsubmission : 268374991'
en1 English _Halabi 2024-07-01 22:48:56 362 Initial revision (published)