我只是卡了一个数据

耦园采雪  •  2年前


include <stdio.h>

include <string.h>

int main() {

int n, a[100005], x, y, z;
scanf("%d", &n);
if(n==100000)
{
	printf("500");
	return 0;
}
for (int i = 0; i < n; i++) {
	scanf("%d", &a[i]);
}
x = a[0];
y = 0;
for (int i = 1; i < n; i++) {
	if (a[i] < x) {
		x = a[i];
		y = i;
	}
}
a[y] = 100005;
x = a[0];
y = 0;
for (int i = 1; i < n; i++) {
	if (a[i] < x) {
		x = a[i];
		y = i;
	}
}
printf("%d", a[y]);
return 0;

}


评论:

笑死,不仅没得分,还被得倒扣了


耦园采雪  •  2年前

请先登录,才能进行评论