摘要:
题解We need to find an algorithm of complexity better than O(N3). Here we will describe three such algorithms. The basic idea of the first one ... 阅读全文
摘要:
Description 二维平面坐标系中有N个点。 从N个点选择3个点,问有多少选法使得这3个点形成直角三角形。Input 第一行包含一个整数N(3hi then begin mid:=(lo+hi) div 2; qsort(l... 阅读全文
摘要:
分析这就是裸的矩阵乘法啊!!! 数列f[n]=f[n-1]+f[n-2],f[1]=f[2]=1的前n项和s[n]的快速求法 0 1 0 1 1 1 0 0 1代码const a1:array[1..3,1..3] of int64=((0,1,0), ... 阅读全文