From 306e46ccbf2b018c734dfac1c0c8c188d5d63988 Mon Sep 17 00:00:00 2001 From: kaoplo Date: Thu, 24 Nov 2022 20:44:22 +0100 Subject: [PATCH] idkf i forgor :skull: --- {hf2 => hf}/hf3/1.cpp | 0 {hf2 => hf}/hf3/2.cpp | 0 {hf2 => hf}/hf3/3.cpp | 0 {hf2 => hf}/hf4/1.cpp | 0 {hf2 => hf}/hf4/3.cpp | 0 hf/hf5/1.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++ hf/hf5/2.cpp | 7 +++++ 7 files changed, 75 insertions(+) rename {hf2 => hf}/hf3/1.cpp (100%) rename {hf2 => hf}/hf3/2.cpp (100%) rename {hf2 => hf}/hf3/3.cpp (100%) rename {hf2 => hf}/hf4/1.cpp (100%) rename {hf2 => hf}/hf4/3.cpp (100%) create mode 100644 hf/hf5/1.cpp create mode 100644 hf/hf5/2.cpp diff --git a/hf2/hf3/1.cpp b/hf/hf3/1.cpp similarity index 100% rename from hf2/hf3/1.cpp rename to hf/hf3/1.cpp diff --git a/hf2/hf3/2.cpp b/hf/hf3/2.cpp similarity index 100% rename from hf2/hf3/2.cpp rename to hf/hf3/2.cpp diff --git a/hf2/hf3/3.cpp b/hf/hf3/3.cpp similarity index 100% rename from hf2/hf3/3.cpp rename to hf/hf3/3.cpp diff --git a/hf2/hf4/1.cpp b/hf/hf4/1.cpp similarity index 100% rename from hf2/hf4/1.cpp rename to hf/hf4/1.cpp diff --git a/hf2/hf4/3.cpp b/hf/hf4/3.cpp similarity index 100% rename from hf2/hf4/3.cpp rename to hf/hf4/3.cpp diff --git a/hf/hf5/1.cpp b/hf/hf5/1.cpp new file mode 100644 index 0000000..b112bed --- /dev/null +++ b/hf/hf5/1.cpp @@ -0,0 +1,68 @@ +#include +#include +using namespace std; + + +struct tanulok { + int ev; + int ho; + int nap; + int kezdes; + int vegzes; +}; + +int main() { + + int n; + cin >> n; + + vector tan(n); + + for (int i = 0; i < n; i++) { + cin >> tan[i].ev >> tan[i].ho >> tan[i].nap >> tan[i].kezdes >> tan[i].vegzes; + } + + int max = 0; + int maxI; + bool tovabb = false; + vector a; + for (int i = 0; i < n; i++) { + if (max < tan[i].ev) { + max = tan[i].ev; + maxI = i; + } + } + for (int i = 0; i < n; i++) { + if (max == tan[i].ev) { + a.push_back(i); + } + } + max = 0; + // for (int i = 0; i < a.size(); i++) { + // cout< b; + for (int i = 0; i < a.size(); i++) { + if (max < tan[a[i]].ho) { + max = tan[a[i]].ho; + maxI = a[i]; + //cout<<"if fired "<< i<<' '<< a[i] <<' '< +#include +using namespace std; + +int main() { + +} \ No newline at end of file