qzezoj 1592 三角形計數

題面傳送門 題目告訴咱們,沒有三點共線,因此咱們能夠容斥。 兩條線, x , y x,y x,y相等,即平行。那麼咱們能夠用總可能數- 2 2 2條直線平行- 3 3 3條直線平行。 用 h a s h hash hash來判斷平行線。 代碼實現:php #include<cstdio> #include<cstring> #include<cmath> #define mod 600017 us
相關文章
相關標籤/搜索