注册
登录
帮助
首页
题库
运行状态
比赛
用户
题解系统
QQ群: 181873520
[A] A hard problem
时间限制: 6000 ms 内存限制: 65535 K
问题描述
You are given a sequence a consisting of n integers.Find the maximum possible value of a[i] mod a[j] where 1<=i,j<=n and a[i]
>=a[j].
输入
The first line contains integer n - the length of the sequence(1<=n<=2*10^5)
The second line contains n space-separated integers a[i](1<=a[i]<=10^6)
输出
Print the answer to the problem
样例输入
3 3 4 5 3 1 2 4
样例输出
2 0
提示
无
来源
Radical@NBUT
操作
题目 Problems
A - A hard problem
[3 / 12 (25.00%)]
B - XorAgain
[0 / 0 (0.00%)]
C - Explosion
[0 / 7 (0.00%)]
状态 Status
统计 Statistics
排名 Rank
报名参赛 SIGN UP
显示春菜