10 2020 档案
摘要:A Finding Sasuke 题意:给出长度为 \(n\) 的序列 \(a_i(i=1,2,\cdots,n,0<|a_i|\le100)\),求 \(b_i(i=1,2,\cdots,n,0<|b_i|\le100)\) 使得 \(\sum_{i=1}^na_ib_i=0\)。 #includ
阅读全文
摘要:1. HDU1166 敌兵布阵 题目链接 题意:单点更新+区间查询(求和)。 树状数组 (218ms) #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> usi
阅读全文
摘要:Krusal 时间复杂度 \(O(m\log m)\) Prim 时间复杂度 \(O(n^2)\),二叉堆优化至 \(O(m\log n)\)。Prim 主要用于稠密图。 1. POJ1251 Jungle Roads 题目链接 题意:给出 n 个村庄,n - 1 个村庄连接的村庄以及道路及其每月维
阅读全文

浙公网安备 33010602011771号