CF527 ABCDE

前端之家收集整理的这篇文章主要介绍了CF527 ABCDE前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

XGG Blog

  • CF527A Playing with Paper
  • CF527B Error Correct System
  • CF527C Glass Carving
  • CF527D Clique Problem
  • CF527E Data Center Drama

CF527A Playing with Paper

Divide.

Code

CF527B Error Correct System

Greedy.

Code

CF527C Glass Carving

O(nlogn): use stl set and upper_bound.
O(n): solve the problem from the last query to the first.

Code

CF527D Clique Problem

Find the maximum set of intervals which are not intersect with each other. Sort the intervals by their right position and choose them greedily.

Code

CF527E Data Center Drama

Eulerian Cycle.

Code

猜你在找的PHP相关文章