]> Skullheadx's Git Forge - CCC.git/commitdiff
2019 S1 + S2 + S3 WIP
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Sun, 2 Oct 2022 03:07:43 +0000 (23:07 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Sun, 2 Oct 2022 03:07:43 +0000 (23:07 -0400)
Main/C++/2019/2019 S3.txt [new file with mode: 0644]
Main/C++/2019/S1.cpp [new file with mode: 0644]
Main/C++/2019/S1.exe [new file with mode: 0644]
Main/C++/2019/S1.o [new file with mode: 0644]
Main/C++/2019/S2.cpp [new file with mode: 0644]
Main/C++/2019/S2.exe [new file with mode: 0644]
Main/C++/2019/S2.o [new file with mode: 0644]
Main/C++/2019/S3.cpp [new file with mode: 0644]
Main/C++/2019/S3.exe [new file with mode: 0644]
Main/C++/2019/S3.o [new file with mode: 0644]

diff --git a/Main/C++/2019/2019 S3.txt b/Main/C++/2019/2019 S3.txt
new file mode 100644 (file)
index 0000000..44a2db7
--- /dev/null
@@ -0,0 +1,14 @@
+X X X
+X X X
+X 2 3
+
+X X X
+X 2 X
+X X 3
+
+a a+d a+2d
+a+c a+c+d a+c+2d
+a+2c a+2c+d a+2c+2d
+
+9a + 9d + 9c = sum
+9(a+c+d) = sum
\ No newline at end of file
diff --git a/Main/C++/2019/S1.cpp b/Main/C++/2019/S1.cpp
new file mode 100644 (file)
index 0000000..e0c5f3c
--- /dev/null
@@ -0,0 +1,42 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+
+int main()
+{
+    string input;
+    cin >> input;
+    bool H=false, V = false;
+    for (int i = 0; i < input.size(); i++)
+    {
+        if (input[i] == 'H')
+            H = !H;
+        else
+            V = !V;
+    }
+
+    vector<vector<int>> grid = {{1,2},{3,4}};
+
+
+    if (H == true)
+    {
+        vector<int> temp = grid[1];
+        grid[1] = grid[0];
+        grid[0] = temp;
+    }
+    if (V == true)
+    {
+        int t1 = grid[0][1], t2 = grid[1][1];
+        grid[0][1] = grid[0][0];
+        grid[1][1] = grid[1][0];
+
+        grid[0][0] = t1;
+        grid[1][0] = t2;
+    }
+
+    cout << grid[0][0] << " " << grid[0][1] << endl;
+    cout << grid[1][0] << " " << grid[1][1] << endl;
+
+
+    return 0;
+}
diff --git a/Main/C++/2019/S1.exe b/Main/C++/2019/S1.exe
new file mode 100644 (file)
index 0000000..1fd2d6c
Binary files /dev/null and b/Main/C++/2019/S1.exe differ
diff --git a/Main/C++/2019/S1.o b/Main/C++/2019/S1.o
new file mode 100644 (file)
index 0000000..76b7bae
Binary files /dev/null and b/Main/C++/2019/S1.o differ
diff --git a/Main/C++/2019/S2.cpp b/Main/C++/2019/S2.cpp
new file mode 100644 (file)
index 0000000..8885413
--- /dev/null
@@ -0,0 +1,44 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+bool is_prime(int n);
+
+int main()
+{
+    int T, N;
+    cin >> T;
+    for (int i = 0; i < T; i++)
+    {
+        cin >> N;
+        int a=2,b;
+        while (true)
+        {
+            if (is_prime(a))
+            {
+                b = 2 * N - a;
+
+                if (is_prime(b))
+                {
+                    cout << a << " " << b << endl;
+                    break;
+                }
+            }
+            a++;
+
+
+        }
+    }
+    return 0;
+}
+
+bool is_prime(int n)
+{
+    if (n == 2)
+        return true;
+    for (int i = 2; i <= 1+sqrt(n); i++)
+    {
+        if (n % i == 0)
+            return false;
+    }
+    return true;
+}
diff --git a/Main/C++/2019/S2.exe b/Main/C++/2019/S2.exe
new file mode 100644 (file)
index 0000000..3bca27f
Binary files /dev/null and b/Main/C++/2019/S2.exe differ
diff --git a/Main/C++/2019/S2.o b/Main/C++/2019/S2.o
new file mode 100644 (file)
index 0000000..47e0751
Binary files /dev/null and b/Main/C++/2019/S2.o differ
diff --git a/Main/C++/2019/S3.cpp b/Main/C++/2019/S3.cpp
new file mode 100644 (file)
index 0000000..745af0a
--- /dev/null
@@ -0,0 +1,13 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+int main()
+{
+    int n = 0;
+    for (int i = 0; i < 10000000; i++)
+    {
+        n++;
+    }
+    cout << n;
+    return 0;
+}
diff --git a/Main/C++/2019/S3.exe b/Main/C++/2019/S3.exe
new file mode 100644 (file)
index 0000000..7d77b46
Binary files /dev/null and b/Main/C++/2019/S3.exe differ
diff --git a/Main/C++/2019/S3.o b/Main/C++/2019/S3.o
new file mode 100644 (file)
index 0000000..9fd85bf
Binary files /dev/null and b/Main/C++/2019/S3.o differ