Shawn's Blog

  • Home
  • Tags
  • Categories
  • Archives
  • Search
  • Table of Contents
  • Overview

Shawn

若有恒,何必三更眠五更起;最无益,莫过一日曝十日寒。
392 posts
13 categories
114 tags

AcWing 3577. 选择数字

Posted on 2021-05-29 Edited on 2024-11-24 In AcWing
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>
#include <algorithm>
using namespace std;
int n;
int main() {
cin >> n;
int x = 0, y = 0, t;
while (n--) {
cin >> t;
x = max(x, t);
}
cin >> n;
while (n--) {
cin >> t;
y = max(y, t);
}
cout << x << ' ' << y << endl;
return 0;
}
# 思维题# 枚举
AcWing 3578. 最大中位数
AcWing 3549. 最长非递减子序列
© 2024 Shawn
Powered by Hexo & NexT.Mist
0%