alg2025/src/2/P11615.cpp
2025-02-14 15:39:52 +08:00

28 lines
592 B
C++

#include <cstdint>
#include <iostream>
#include <limits>
#include <sys/types.h>
using ull = uint64_t;
constexpr ull ullmax=std::numeric_limits<ull>::max();
ull n;
int main(){
// std::cin>>*(ll *)(void*)&n;
std::cin>>n;
ull ans=0;
for(ull i=1;i<=n;i++){
static ull x,y;
std::cin>>x>>y;
static std::hash<ull> hash;
static ull *arr =[]()->ull*{
ull *a = new ull(ullmax+1);
for(ull i=0;i<ullmax;i++){
a[i]=0;
}
return a;
}();
ans=ans+i*arr[hash(x)]%ullmax;
}
}