hihoCoder Challenge 11 register

Ended

Participants:616

Verdict:Accepted
Submitted:2015-05-03 19:26:28

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#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) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX