0w1

Minimum Vertex Cover

CSAcademy 23 E. No Prime Sum ( Bipartite Matching, Minimum Vertex Cover )

Round #23 (Div. 2 only)題意: 給 N 個相異正整數,問最少要移除幾個數字,能使任意兩個數字的和不為質數。輸出方案。限制: 2≤N≤2000 The elements of S are distinct integers between 1 and 10^5解法: 首先顯然偶數+偶數以及奇數+奇數的情形一定不會產…