結果

問題 No.1746 Sqrt Integer Segments
ユーザー tailstails
提出日時 2021-11-18 00:32:28
言語 cLay
(20240104-1)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 458 bytes
コンパイル時間 8,589 ms
コンパイル使用メモリ 223,516 KB
実行使用メモリ 20,864 KB
最終ジャッジ日時 2023-10-11 10:32:28
合計ジャッジ時間 11,205 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
10,456 KB
testcase_01 AC 10 ms
10,644 KB
testcase_02 AC 106 ms
16,856 KB
testcase_03 AC 59 ms
13,592 KB
testcase_04 AC 80 ms
15,484 KB
testcase_05 AC 162 ms
20,864 KB
testcase_06 AC 50 ms
12,880 KB
testcase_07 AC 22 ms
11,236 KB
testcase_08 AC 108 ms
16,832 KB
testcase_09 AC 164 ms
20,736 KB
testcase_10 AC 46 ms
12,704 KB
testcase_11 AC 154 ms
20,752 KB
testcase_12 AC 164 ms
20,668 KB
testcase_13 AC 164 ms
20,844 KB
testcase_14 AC 167 ms
20,804 KB
testcase_15 AC 197 ms
20,744 KB
testcase_16 AC 171 ms
20,744 KB
testcase_17 AC 96 ms
16,008 KB
testcase_18 AC 14 ms
11,336 KB
testcase_19 AC 14 ms
11,284 KB
testcase_20 AC 14 ms
11,228 KB
testcase_21 AC 28 ms
11,084 KB
testcase_22 AC 28 ms
11,108 KB
testcase_23 AC 19 ms
10,664 KB
testcase_24 AC 47 ms
11,756 KB
testcase_25 AC 47 ms
11,748 KB
testcase_26 AC 48 ms
11,736 KB
testcase_27 AC 35 ms
11,724 KB
testcase_28 AC 36 ms
11,736 KB
testcase_29 AC 36 ms
11,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define A 0x9e3779b97f4a7c15
#define B 0xbf58476d1ce4e5b9
#define C 0x94d049bb133111eb

static inline
unsigned long splitmix64(unsigned long x) {
	x += A;
	x = (x ^ (x >> 30)) * B;
	x = (x ^ (x >> 27)) * C;
	return x ^ (x >> 31);
}

int f[10000];
int e[10000];

{
	int @n,@a[n];
	ull h=0;
	ll z=0;
	unordered_map<ull,int> m;
	m[0]=1;
	rep(i,n){
		int b=Factor(a[i],f,e);
		rep(j,b){
			if(e[j]&1){
				h^=splitmix64(f[j]);
			}
		}
		z+=m[h]++;
	}
	wt(z);
}
0