Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets you can never reach the same intersection i.e. the town's…
求中位数,注意求中位数前排序.... #include <bits/stdc++.h> using namespace std; #define LL long long const int MAXN=1e4+10; LL a[MAXN]; int main() { int n; cin>>n; LL sum=0; for(int i=0;i<n;i++) { cin>>a[i]; } sort(a,a+n); int mid=(n+1)/2-1; // cout…