diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..05054c5 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: g++ build active file", + "command": "/usr/bin/g++", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/hf2/hf4/3 b/hf2/hf4/3 new file mode 100755 index 0000000..e4281f7 Binary files /dev/null and b/hf2/hf4/3 differ diff --git a/hf2/hf6/1 b/hf2/hf6/1 new file mode 100755 index 0000000..cfb34ad Binary files /dev/null and b/hf2/hf6/1 differ diff --git a/hf2/hf6/1.cpp b/hf2/hf6/1.cpp new file mode 100644 index 0000000..8fd4711 --- /dev/null +++ b/hf2/hf6/1.cpp @@ -0,0 +1,47 @@ +#include +#include +using namespace std; + +int convert(string a) { + int out = 0; + int counter = 1; + + //cout< 0; i--) { + if(a[i] == '1' ) { + out += counter; + //cout<<"found one at "<< a[i] ; + } + //cout<< " current index "<< i <<" at character "< a) { + int out = a[0]; + for (int i =1; i < a.size(); i++) { + if (a[i] > out) { + out = a[i]; + } + } + return out; +} + +int main() { + + vector test; + test.push_back(2); + test.push_back(6); + test.push_back(-7); + test.push_back(1); + test.push_back(0); + test.push_back(1); + test.push_back(4); + cout< +#include +using namespace std; + +int returnVecMax(vector a) { + int max = a[0]; + int index = 0; + for (int i =1; i < a.size(); i++) { + if (a[i] > max) { + max = a[i]; + index = i; + } + } + return index; +} + +int main () { + int o, n, m, t, h; + cin >> o >> n >> m >> t >> h; //orak szama, tantargyak szama, egy sorszama, egy nap sorszama + int ts, tts, nap, ora; // tanar sorszam, tanitott tantargy sorszam, nap, ora + + vector tantargyElofordulas(n); + + for (int i = 0; i < o; i++) { + cin >> ts >>tts>>nap>>ora; + tantargyElofordulas[ts] += 1; + + } +// for (int i = 0; i < tantargyElofordulas.size(); i++) { +// cout<