跳到正文

题解

话不多说,直接上代码

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

文章信息

收录
2026年3月1日
更新
2026年3月1日
篇幅
约 1 分钟
题目
B2057

版本

  1. v2当前
  2. v1
C++
#include<bits/stdc++.h>//万能开头

using namespace std;

int main()
{
	int n,t ,mx = 0;//日常定义变量
	cin>>n;
	cin>>mx;
	for(int i = 1; i <= n-1; i++)//请出我们的for循环大哥
	{
        cin>>t;

		if(t > mx) mx = t;//如果t比mx大那么就把t赋值给mx

	}
	cout<<mx;
    return 0;//好习惯
}
原文