city.cpp:18:1: error: 'pii' does not name a type
pii pt[maxn];
^~~
city.cpp: In function 'int DistanceSum(int, int*, int*)':
city.cpp:26:7: error: expected ']' before '+' token
pt[i+1] = {X[i], Y[i]};
^
city.cpp:26:5: warning: decomposition declaration only available with -std=c++1z or -std=gnu++1z
pt[i+1] = {X[i], Y[i]};
^
city.cpp:26:5: error: decomposition declaration cannot be declared with type 'pt {aka std::pair<int, int>}'
city.cpp:26:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
city.cpp:26:9: error: redeclaration of 'auto i'
pt[i+1] = {X[i], Y[i]};
^
city.cpp:25:11: note: 'int i' previously declared here
for (int i = 0; i < n; i++)
^
city.cpp:26:16: error: use of 'i' before deduction of 'auto'
pt[i+1] = {X[i], Y[i]};
^
city.cpp:26:22: error: use of 'i' before deduction of 'auto'
pt[i+1] = {X[i], Y[i]};
^
city.cpp:26:24: error: unable to deduce 'std::initializer_list<auto>' from '{<expression error>, <expression error>}'
pt[i+1] = {X[i], Y[i]};
^
city.cpp:28:9: error: expected primary-expression before '+' token
sort(pt+1, pt+n+1);
^
city.cpp:28:15: error: expected primary-expression before '+' token
sort(pt+1, pt+n+1);
^
city.cpp:31:30: error: expected primary-expression before '[' token
soma[i] = (soma[i-1]+(ll)pt[i].x)%mod;
^
city.cpp:40:27: error: expected primary-expression before '[' token
ans = (ans-((n-i)*(ll)pt[i].x)%mod+mod)%mod;
^
city.cpp:45:27: error: expected primary-expression before '[' token
ans = (ans+((i-1)*(ll)pt[i].x)%mod)%mod;
^
city.cpp:48:9: error: expected primary-expression before '+' token
sort(pt+1, pt+n+1, comp);
^
city.cpp:48:15: error: expected primary-expression before '+' token
sort(pt+1, pt+n+1, comp);
^
city.cpp:51:30: error: expected primary-expression before '[' token
soma[i] = (soma[i-1]+(ll)pt[i].y)%mod;
^
city.cpp:58:35: error: expected primary-expression before '[' token
ans = (ans-(((ll)n-(ll)i)*(ll)pt[i].y)%mod+mod)%mod;
^
city.cpp:63:33: error: expected primary-expression before '[' token
ans = (ans+(((ll)i-1LL)*(ll)pt[i].y)%mod)%mod;
^