summaryrefslogtreecommitdiffstats
path: root/inf/lige/3/1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'inf/lige/3/1.cpp')
-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;
+}