diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0c83701 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "files.associations": { + "iostream": "cpp", + "ostream": "cpp" + } +} \ No newline at end of file diff --git a/hf16/2.cpp b/hf16/2.cpp new file mode 100644 index 0000000..0e94513 --- /dev/null +++ b/hf16/2.cpp @@ -0,0 +1,38 @@ +#include +#include +using namespace std; + + +bool tukorSzam(string a) { + //ez undorító de nincs jobb ötletem xd + + if (a[0] == a[7]) { + if (a[1] == a[6]) { + if (a[2] == a[5]) { + if (a[3] == a[4]) { + return true; + } + return false; + } + return false; + } + return false; + } + return false; +} + +int main() { + int n; + cin>>n; + vector telefonszamok(n); + for (int i = 0; i < n; i++) { + cin >> telefonszamok[i]; + } + cout< out; + for (int i = 0; i < telefonszamok.size(); i++) { + if (tukorSzam(telefonszamok[i])) { + cout< +#include +using namespace std; + +int vectorAverage(vector n){ + int out; + int temp = 0; + for (int i = 0; i>n>>m; + vector> nap(m, vector (n)); + vector temp1(m); + + + for (int i = 0; i> nap[i][j]; + } + } + + for (int i = 0; i temp) { + out = i +1; + } + } + + + cout< +#include +using namespace std; + +int main() { + int n, k, temp; + + cin >> n >> k; + + vector gyorsabb; + + for (int i = 0; i < n; i++) { + cin >> temp; + if (temp < k) { + gyorsabb.push_back(i+1); + } + } + + cout< +#include +using namespace std; + +int main() { + + int streak = 0; + bool streake = false; + string input; + vector magan(5); + vector out; + magan = {'a', 'e', 'i', 'o', 'u'}; + + cin >> input; + + for (int i = 0; i < input.size(); i++) { + if (input[i] != magan[0] && input[i] != magan[1] && input[i] != magan[2] && input[i] != magan[3] && input[i] != magan[4]) { + streak++; + streake = true; + // cout << "yes" << ' ' << streak << " "<< streake<< ' '< +#include +using namespace std; + +int main() { + int a,b,c,x,y; + int n; + cin >> n; + vector out; + + for (int i = 0; i < n; i++) { + cin >> a >> b >> c >> x >> y; // a: kutyakaja, b: macskakaja, c: uni, x: kutya, y: macska + for (int j = 0; j < a; j++) { //kutya + if (x>0) { + x--; + } + } + //cout<< x<0) { + y--; + } + } + //cout<< y<0) { + x--; + } else if (y>0) { + y--; + } + } + //cout<< x<< ' '<< y <