2019-04-13 22:11发布 生成海报
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define eps 1e-6 #define INF 0x3f3f3f3f #define PI acos(-1.0) //#define ll __int64 #define ll long long #define lson l,m,(rt<<1) #define rson m+1,r,(rt<<1)|1 #define M 1000000007 #pragma comment(linker, "/STACK:1024000000,1024000000") using namespace std; int a[20005]; multiset s; multiset::iterator it1; multiset::iterator it2; int main() { int n; while(~scanf("%d",&n)) { long long ans=0; s.clear(); for(int i=0;i