跳到正文

题解

题解 AT2584 【[ABC064B] Traveling AtCoDeer Problem】

fy0617约 1 分钟
原文
文章信息与版本

文章信息

收录
2026年4月8日
更新
2026年4月8日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1
C++
#include<bits/stdc++.h>
using namespace std;
int a[101],n;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    cin>>a[i];
    cout<<(*max_element(a+1,a+1+n))-(*min_element(a+1,a+1+n))<<endl;
    \\函数求最大值和最小值
}
原文