Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <bits/stdc++.h>using namespace std;typedef long long LL;const int N = 100005;int n;pair<int , int> a[N];vector<int> fac[N];void work() {int i , j , x , y;scanf("%d" , &n);for (i = 0 ; i < n ; ++ i) {scanf("%d", &x);y = 0;for (j = 1 ; j * j <= x ; ++ j)if (x % j == 0) {++ y;if (j * j != x)++ y;}a[i] = make_pair(y , x);for (j = 2 ; j * j <= x ; ++ j)while (x % j == 0)fac[i].push_back(j) , x /= j;if (x > 1)fac[i].push_back(x);}int res = 0;if (n <= 2000) {for (i = 0 ; i < n ; ++ i)for (j = i ; j < n ; ++ j) {