#include<iostream>#include<cstdio>#include<cmath>using namespace std;const double PI = acos(-1.0);struct Point{double x,y;};void koch(int n, Point a, Point b) {// 递归结束if (n == 0)return;// 三等分点s,t
#include<iostream>#include<cstdio>#include<cstring>using namespace std;typedef long long LL;LL A[100000 + 10];int n, k;//模拟装货过程bool check(LL P) {int cnt = k;for (int i = 0; i < n; ) {LL t = P;
using namespace std;const int MAX = 500000;const int maxnum = 1000000010;// 两个局部数组int L[MAX / 2 + 2], R[MAX / 2 + 2];int A[MAX], n;long long cnt ;// 排序和合并void merge(int left, int mid, int right)
Rooted Trees 问题 A graph G = (V, E) is a data structure where V is a finite set of vertices and E is a binary relation on V represented by a set of edges. Fig. 1 illustrates an example of a graph (or
Binary Tree 题目 A binary tree is a tree with a root node in which every node has at most two children. Your task is to write a program which reads a rooted binary tree T and prints the following inf