Untitled
unknown
c_cpp
a year ago
1.2 kB
12
Indexable
#include <iostream> #include <vector> #include <climits> using namespace std; using ll = long long; int main() { #ifndef ONLINE_JUDGE FILE* file_in; freopen_s(&file_in, "input.txt", "r", stdin); #endif std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int max_val = INT_MIN; int n; cin >> n; while (n--) { int x; cin >> x; if (x > max_val) { max_val = x; } } cout << max_val; } /* _ _ooOoo_ o8888888o 88" . "88 (| -_- |) O\ = /O ____/`---'\____ .' \\| |// `. / \\||| : |||// \ / _||||| -:- |||||_ \ | | \\\ - /'| | | | \_| `\`---'// |_/ | \ .-\__ `-. -'__/-. / ___`. .' /--.--\ `. .'___ ."" '< `.___\_<|>_/___.' _> \"". | | : `- \`. ;`. _/; .'/ / .' ; | \ \ `-. \_\_`. _.'_/_/ -' _.' / ===========`-.`___`-.__\ \___ /__.-'_.'_.-'================ */
Editor is loading...
Leave a Comment