## 夜雨寄北

### 李商隱

• 判断式中如果同时存在位运算符小于等于大于时，将位运算符表达式加上括号
• 判等时，如果一边是常数一边是变量，将常数放于判等左边。 （TAT，当时听郝斌老师讲这条时还不以为意，心想判等自己肯定不会写成 = , 现在想来，真是内牛满面呀，这条规则实在太好了）

# Naive Operations

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 502768/502768 K (Java/Others)

### Problem Description

In a galaxy far, far away, there are two integer sequence a and b of length n.
b is a static permutation of 1 to n. Initially a is filled with zeroes.
There are two kind of operations:
1. add l r: add one for $a_l,a_{l+1}…a_r$
2. query l r: query $\sum_{i=l}^r \lfloor a_i / b_i \rfloor$

## 题目描述

Eddy has solved lots of problem involving calculating the number of coprime pairs within some range. This problem can be solved with inclusion-exclusion method. Eddy has implemented it lots of times. Someday, when he encounters another coprime pairs problem, he comes up with diff-prime pairs problem.

## 题目描述

Eddy was a contestant participating in ACM ICPC contests. ACM is short for Algorithm, Coding, Math. Since in the ACM contest, the most important knowledge is about algorithm, followed by coding(implementation ability), then math. However, in the ACM ICPC World Finals 2018, Eddy failed to solve a physics equation, which pushed him away from a potential medal.

• 空集 $\phi$——0
• 只含有第 $i$ 个元素的集合 ${i}$——$1<<i$
• 含有全部 $n$ 个元素的集合 ——$(1<<n)-1$
• 判断第 $i$ 个元素是否属于集合 $S$—— if( S>>i&1 )if(S & (1<<i))
• 向集合 $S$ 加入第 $i$ 个元素 ——S |= 1<<i
• 从集合 $S$ 中去除第 $i$ 个元素 ——S&~(1<<i)
• 集合 $S​$ 和集合 $T​$ 的交集 ——S&T
• 集合 $S$ 和集合 $T$ 的并集 ——S|T
• 切换第 i 位 ——S ^= 1<<i
• 判断某状态是否有相邻的两者相同 ——if( S & S<<1 )
• 把一个数字二进制下最靠右的第一个 1 去掉 ——S = S&(S-1)

## 1001 Maximum Multiple

### Problem Description

Given an integer n, Chiaki would like to find three positive integers x, y and z such that: $n=x+y+z$, $x\mid n$, $y \mid n$, $z \mid n$ and $xyz$ is maximum.

### Input

There are multiple test cases. The first line of input contains an integer $T$ ($1 \le T \le 10^6$), indicating the number of test cases. For each test case:
The first line contains an integer $n$ ($1 \le n \le 10^{6}$).

### Output

For each test case, output an integer denoting the maximum $xyz$. If there no such integers, output $-1$ instead.

0%