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