diff --git a/.gitignore b/.gitignore
index e257658..3c9fecf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,5 @@
*.out
*.app
+/.vscode
+
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 05054c5..32af85f 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -22,6 +22,26 @@
"isDefault": true
},
"detail": "Task generated by Debugger."
+ },
+ {
+ "type": "cppbuild",
+ "label": "C/C++: cpp build active file",
+ "command": "/usr/bin/cpp",
+ "args": [
+ "-fdiagnostics-color=always",
+ "-g",
+ "${file}",
+ "-o",
+ "${fileDirname}/${fileBasenameNoExtension}"
+ ],
+ "options": {
+ "cwd": "${fileDirname}"
+ },
+ "problemMatcher": [
+ "$gcc"
+ ],
+ "group": "build",
+ "detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
diff --git a/hf2/hf6/1 b/hf2/hf6/1
index cfb34ad..69cf96a 100755
Binary files a/hf2/hf6/1 and b/hf2/hf6/1 differ
diff --git a/hf2/hf6/1.cpp b/hf2/hf6/1.cpp
index 8fd4711..a597e44 100644
--- a/hf2/hf6/1.cpp
+++ b/hf2/hf6/1.cpp
@@ -7,19 +7,30 @@ int convert(string a) {
int counter = 1;
//cout< 0; i--) {
- if(a[i] == '1' ) {
+ for (int i = a.size() - 1; i >= 0; i--) {
+ if (a[i] == '1') {
out += counter;
- //cout<<"found one at "<< a[i] ;
- }
- //cout<< " current index "<< i <<" at character "< 0) {
+ a += n%base;
+ out = a + out;
+ n = n / base;
+ a = '0';
+ }
+
+
return out;
}
@@ -43,5 +54,10 @@ int main() {
test.push_back(0);
test.push_back(1);
test.push_back(4);
- cout< tantargyElofordulas(n);
for (int i = 0; i < o; i++) {
- cin >> ts >>tts>>nap>>ora;
+ cin >> ts >>tts>>nap>>ora;
+ ts;
tantargyElofordulas[ts] += 1;
}