summaryrefslogtreecommitdiffstats
path: root/inf/lige/3/1.cpp
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-02-27 00:15:03 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-02-27 00:15:03 +0100
commit3fed51e23753255ffc6e660aaacf926e8ac735e7 (patch)
treedd815583d778fe36343d1843d30d4fb0d61d41e1 /inf/lige/3/1.cpp
parentinf rn lyx (diff)
downloadsola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar.gz
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar.bz2
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar.lz
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar.xz
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.tar.zst
sola-gimb-4-3fed51e23753255ffc6e660aaacf926e8ac735e7.zip
Diffstat (limited to '')
-rw-r--r--inf/lige/3/1.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/inf/lige/3/1.cpp b/inf/lige/3/1.cpp
new file mode 100644
index 0000000..d8eb85f
--- /dev/null
+++ b/inf/lige/3/1.cpp
@@ -0,0 +1,46 @@
+#include <iostream>
+#include <set>
+#include <algorithm>
+using namespace std;
+class Obmo {
+ public:
+ int z, k, nsd;
+ set<int> obm;
+ Obmo () {
+ z = 0;
+ k = 0;
+ obm.clear();
+ }
+ void dodaj (int val) {
+ if (!obm.count()) {
+ nsd = val;
+ obm.insert(val);
+ return;
+ }
+ if (obm.count() == 1) {
+ nsd = gcd(val, nsd);
+ obm.insert(val);
+ return;
+ }
+ if (val % nsd == 0) {
+ obm.insert(val);
+ return;
+ }
+ for (auto itr = obm.begin(); itr != obm.end(); itr++) {
+ if *itr:q
+
+ }
+ }
+ void odvzemi (int val) {
+ if (obm.count() == 2) {
+ obm.erase(val);
+ nsd = gcd(*obm.begin())
+ }
+ }
+ int get (void) {
+ return nsd;
+ }
+};
+int main (void) {
+ cout << "hw" << endl;
+}