防止你作弊
by lukelin @ 2017-07-18 14:20:15
英文语法有错误啊啊啊啊啊啊啊
宾语都没有啊啊啊啊啊
by Yubestor @ 2017-08-17 10:17:05
# 自己语法都有问题
by flashy_yali @ 2017-08-18 16:35:02
```cpp
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<cmath>
#include<algorithm>
using namespace std;
int N;
int h[1011];
int main(){
cin >> N;
for(int i = 0; i < N; ++i)cin >> h[i];
int ans = 0x7FFFFFFF;
for(int i = 0; i < 100 - 17 + 1; ++i){
int tans = 0;
for(int j = 0; j < N; ++j){
if(h[j] < i)tans += (i - h[j]) * (i - h[j]);
if(h[j] > i + 17)tans += (h[j] - i - 17) * (h[j] - i - 17);
}
ans = min(ans, tans);
}
cout << ans << endl;
return 0;
}
```
by LOVEMY @ 2017-10-08 20:20:04