## 交易一中集训Day[7]

WA的一声就哭了.jpg
TLE的一声就哭了.jpg
T1猜了两个小时的结论。。。。

T3二分乱搞。。。。成功TLE。。。。。
zrO ljt大佬要不是2SAT打炸了就随手A题了啊 Orz

WP自带Markdown居然会把代码块里的大于小于号转义。。。。

## HDU 4609 3-idiots

Problem Description
King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that it was a kind of performance art, and begged the king to free them. Out of hatred to the real idiots, the king wanted to check if they were lying. The three men were sent to the king's forest, and each of them was asked to pick a branch one after another. If the three branches they bring back can form a triangle, their math ability would save them. Otherwise, they would be sent into jail.
However, the three men were exactly idiots, and what they would do is only to pick the branches randomly. Certainly, they couldn't pick the same branch - but the one with the same length as another is available. Given the lengths of all branches in the forest, determine the probability that they would be saved.
Input
An integer T(T≤100) will exist in the first line of input, indicating the number of test cases.
Each test case begins with the number of branches N(3≤N≤105).
The following line contains N integers a_i (1≤a_i≤105), which denotes the length of each branch, respectively.
Output
Output the probability that their branches can form a triangle, in accuracy of 7 decimal places.
Sample Input
2
4
1 3 3 4
4
2 3 3 4
Sample Output
0.5000000
1.0000000
Source
2013 Multi-University Training Contest 1
Recommend
liuyiding

R数组的计算不能放到外面。。。。。

## 交易一中集训Day[6]

PJ这次快压事故也真是。。。。

7z大法好。。。。

Rank1大佬x1 金牌爷x1 队爷x1 均表示不会做。。。

## 交易一中集训Day[5]

• 开始

还不错哟

• 这是啥

• 这又是啥
• 数论？
• DP？
• 数据结构？

Wifei密码都是31415926

## 交易一中集训Day[4]

$n \leq 200000 , 0 \leq a_i \leq 10^9$

4
1 2 3 12

3.0000

T2奥妙重重的排列数 T3奥妙重重的组合数
xjb打表找规律。。。。T2在OEIS上查到了递推式。。。。
T3根本找不到。。。。。

xjk光速过ppt看得我一脸懵逼。。。。不现推一下感觉非常懵逼。。。。

FFT通过恰当地选择x降低求值和插值的复杂度

• (消去引理)对任意整数$n \geq 0,k \geq 0,d \geq 0$，有
$$\omega^{dk}_{dn}=(\mathrm{e}^{2\pi\mathrm{i}/dn})^{dk}=(\mathrm{e}^{2\pi\mathrm{i}/n})^{k}=\omega^{k}_{n}$$

• (折半引理)如果$n>0$且$n$为偶数，那么$n$个$n$次单位根的平方的集合就是$n/2$个$n/2$次单位根的集合，且每个元素恰好出现两次。

• (求和引理)对于任意整数$n\geq1$和不能被$n$整除的整数$k$，有$$\sum_{j=0}^{n-1}(\omega_n^k)^j=0$$

$$y_k=A(\omega_n^k)=\sum_{j=0}^{n-1}a_j\omega_n^kj$$

$$a_j=\frac{1}{n}\sum_{j=0}^{n-1}y_k\omega_n^{-kj}$$

cpp

## 交易一中集训Day[3]

WA的一声就哭了
TLE的一声就哭了
RE的一声就哭了

Description

Input 第一行包含一个正整数n(1<=n<=5000)，表示强盗的个数。

Output

Sample Input
4
1 4 40
2 4 10
2 3 30
1 3 20
Sample Output
90
Source
By Claris

## 交易一中集训Day[2]

Q:如何减少bug？
A:提高1A率
Q:如何提高1A率？
A:减少bug
Q:1A率受bug率影响，bug率又收1A率影响，这样岂不是成环了啊
A:不是啊，是你bug率减少的结果是你1A率增加啊，你提升1A率是给减少bug一个明确的目标
Q:那如何提高1A率呢
A:减少bug啊

[5,5)
(5,5)