| 比赛 | 20131130 | 评测结果 | AWAAWWWWWW |
|---|---|---|---|
| 题目名称 | 参加考试 | 最终得分 | 30 |
| 用户昵称 | digital-T | 运行时间 | 0.005 s |
| 代码语言 | C++ | 内存使用 | 0.33 MiB |
| 提交时间 | 2013-11-30 17:22:07 | ||
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
using namespace std;
int N,K,t[10001];
int main()
{
freopen("teststr.in","r",stdin);
freopen("teststr.out","w",stdout);
scanf("%d%d",&N,&K);
for(int i=1;i<=K;i++)
scanf("%d",&t[i]);
sort(t+1,t+K+1);
int ans=max(t[1],N-t[K]);
printf("%d\n",ans);
return 0;
}