13 条题解
-
-1
#include <iostream> #include <stdio.h> #include <math.h> #include <iomanip> using namespace std; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; int n , a , ans = 0; int main() { cin >> n; for( int i = 1 ; i <= n ; i++ ) { cin >> a; if( ans < a ) { ans = a; } else if( ans == a ) { ans = a; } } cout << ans; return 0; }
-
-1
#include <iostream> #include <stack> #include <cmath> #include <vector> #include <string.h> #include <queue> #include <stdio.h> #include <iomanip> #include <cstdio> #include <algorithm> #define int long long using namespace std; const int N = 1e5 + 10; const int INF = 0x3f3f3f3f; signed main() { int n; cin >> n; int maxn = -INF; for(int i = 1; i <= n; i++) { int x; cin >> x; maxn = max(maxn, x); } cout << maxn << endl; return 0; }
为什么那么多人都不会
满脸疑惑
- 1
信息
- ID
- 981
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 5
- 标签
- 递交数
- 935
- 已通过
- 339
- 上传者