From bad3b165a50881e56c577b5c79046e7e638a4301 Mon Sep 17 00:00:00 2001 From: kaoplo Date: Sun, 23 Oct 2022 14:37:04 +0200 Subject: [PATCH] hazi 1 meg felig ketto --- hf2/hf4/1.cpp | 24 ++++++++++++++++++++++++ hf2/hf4/3.cpp | 39 +++++++++++++++++++++++++++++++++++++++ ora/1016/1.cpp | 19 +++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 hf2/hf4/1.cpp create mode 100644 hf2/hf4/3.cpp create mode 100644 ora/1016/1.cpp diff --git a/hf2/hf4/1.cpp b/hf2/hf4/1.cpp new file mode 100644 index 0000000..9d10073 --- /dev/null +++ b/hf2/hf4/1.cpp @@ -0,0 +1,24 @@ +#include +#include +using namespace std; + +// https://host.pawz.hu/8840nfIq.png + +int main() { + int n, out, temp, temp2, max; + max = 0; + cin >> n; + + for (int i = 0; i < n; i++) { + temp2 = 0; + for (int j = 0; j < 7; j++) { + cin >> temp; + temp2 += temp; + } + if (temp2 > max) { + max = temp2; + out = i+1; + } + } + cout < +#include +using namespace std; + +int main() { + int n, m, temp; + //int min = 51; + //int max = -51; + int out = 1; + cin >> n >> m; + + vector> maxmin(m, vector (3)); // min, max /n + + for (int i = 0; i < n; i++) { + int min = 51; + int max = -51; + for (int j = 0; j < m; j++) { + cin >> temp; + if (temp > max) { + max = temp; + } + if (temp < min) { + min = temp; + } + } + cout< +using namespace std; + +int main() { + vector < int > megoldas; + int n, k, m, f; + cin >> n >> k; + for (int i = 0; i < n; i++) { + cin >> m >> f; + if (m < k) { + megoldas.push_back(i+1); + } + } + sort(megoldas.begin(), megoldas.end()); + cout << megoldas.size() << ' '; + for (int i = 0; i < megoldas.size(); i++) { + cout << megoldas[i]<< " "; + } +}