StarSilk's blog

By StarSilk, history, 19 months ago, In English

The interactor of problem 1815B can be made TLE.

Select a case that n>800,add O(n) random x between n/2 and 3n/2, and query n random pairs of nodes.As there are O(n^2) edges in the graph, it takes O(n^2) time to bfs and O(n^3) time for the interactor to answer all queries.

Submission:https://codeforces.net/contest/1815/submission/201700734

  • Vote: I like it
  • +127
  • Vote: I do not like it

| Write comment?
»
19 months ago, # |
  Vote: I like it +4 Vote: I do not like it

lmao

»
6 months ago, # |
  Vote: I like it -11 Vote: I do not like it

or2

»
5 months ago, # |
  Vote: I like it +3 Vote: I do not like it

how to be you StarSilk