摘要:
Tree Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://poj.org/problem?id=1741 Description Give a tree with n vertices,each edge has a length(positi 阅读全文
摘要:
题目让O(1)预处理出来 类三角形边界及内部的和 根据这个图 就是一个大矩形-左边的绿色的矩形 - 蓝色的大三角形 + 右上角突出的蓝色的小三角形 #include<bits/stdc++.h> using namespace std; typedef long long ll; #define r 阅读全文