Anyone help me with constant factor of counting 3-cirlcles and 4-circles :(

Revision en1, by zhiyangfan, 2022-01-15 04:40:02

`I am trying to solve https://codeforces.me/gym/103470/problem/K.

My solution is similar to the official tutorial(If you don't understand Chineses, it's ok! I write annotation in the code),but I'm troubled with constant factor(maybe not? If my time complexity is not good enough, please point out. qwq ), keeping getting TLE on test 38. :(

I wonder if someone can help me with it, pointing out something wrong with my implementations. qwq

My code.

Tags graphs, implementations

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zhiyangfan 2022-01-15 04:40:02 621 Initial revision (published)