{"id":58,"date":"2015-11-27T20:27:53","date_gmt":"2015-11-27T20:27:53","guid":{"rendered":"https:\/\/ysitar.sites.sch.gr\/?p=58"},"modified":"2025-10-01T13:51:05","modified_gmt":"2025-10-01T13:51:05","slug":"%ce%b4%ce%bf%ce%ba%ce%b9%ce%bc%ce%b1%cf%83%cf%84%ce%b9%ce%ba%ce%ac-%ce%b1%cf%81%cf%87%ce%b5%ce%af%ce%b1-%ce%b3%ce%b9%ce%b1-37o-%cf%80%ce%b1%ce%bd%ce%b5%ce%bb%ce%bb%ce%ae%ce%bd%ce%b9%ce%bf-%ce%b4","status":"publish","type":"post","link":"https:\/\/ysitar.sites.sch.gr\/?p=58","title":{"rendered":"\u0394\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03b3\u03b9\u03b1  37o \u03a0\u03b1\u03bd\u03b5\u03bb\u03bb\u03ae\u03bd\u03b9\u03bf \u0394\u03b9\u03b1\u03b3\u03c9\u03bd\u03b9\u03c3\u03bc\u03cc \u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03b9\u03ba\u03ae\u03c2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u03a4\u03bf \u03b8\u03ad\u03bc\u03b1 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u0391\u2019 \u03c6\u03ac\u03c3\u03b7 \u03c4\u03bf\u03c5 37\u03bf\u03c5 \u03a0\u03b1\u03bd\u03b5\u03bb\u03bb\u03ae\u03bd\u03b9\u03bf\u03c5 \u0394\u03b9\u03b1\u03b3\u03c9\u03bd\u03b9\u03c3\u03bc\u03bf\u03cd \u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03b9\u03ba\u03ae\u03c2 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03bf \u03b2\u03c1\u03b5\u03af\u03c4\u03b5 <a href=\"http:\/\/pdp.gr\/default.asp?pid=6&amp;la=1&amp;fid=1\" target=\"_blank\" rel=\"noreferrer noopener\">\u03b5\u03b4\u03ce<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0398\u03b1 \u03c7\u03c1\u03b5\u03b9\u03b1\u03c3\u03c4\u03b5\u03af\u03c4\u03b5 \u03bc\u03b5\u03c1\u03b9\u03ba\u03ac \u03bc\u03b5\u03b3\u03ac\u03bb\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 arin.in :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/users.sch.gr\/ysitar\/wordpress\/wp-content\/uploads\/2015\/11\/aris.zip\">aris1 <\/a>\u03ba\u03b1\u03b9<a href=\"http:\/\/users.sch.gr\/ysitar\/wordpress\/wp-content\/uploads\/2015\/11\/aris.zip\">&nbsp; <\/a><a href=\"http:\/\/users.sch.gr\/ysitar\/wordpress\/wp-content\/uploads\/2015\/11\/aris2.zip\">aris2<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03c3\u03c4\u03b5 \u03b4\u03b9\u03ba\u03ac \u03c3\u03b1\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03bc\u03b5 \u03c4\u03bf\u03bd \u03c0\u03b1\u03c1\u03b1\u03ba\u03ac\u03c4\u03c9 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/by Yannis Sitaridis Nov-2015\n#include &lt;iostream>\n#include &lt;fstream>\n#include &lt;vector>\n#include&lt;stdlib.h>\n#include &lt;time.h>\n\nusing namespace std;\n\nint main (){\n    \n    int timeSlots;\n    int teams;\n    int teamsUse;\n    int arr&#91;1000000] = {};\n    int count&#91;1000000] = {};\n    \n    for(int i = 1; i &lt;= timeSlots; i++){\n        count&#91;i]=0;\n    }\n    \n    cout &lt;&lt; \"Give number of timeslots\"&lt;&lt;endl;\n    cin >> timeSlots;\n    cout &lt;&lt; \"Give number of teams\"&lt;&lt;endl;\n    cin >> teams;\n    cout &lt;&lt; \"Give the max number of teams actually Using the computer\"&lt;&lt;endl;\n    cin >> teamsUse;\n    \n    if (teamsUse > teams){\n        cout &lt;&lt; \"Error - Invalid teams number\"&lt;&lt;endl;\n        return(1);\n    }\n    \n    srand (time(NULL));\n    \n    int n = 0;\n    int d = teams - teamsUse;\n    if (d > 0){\n        while (n &lt; d){\n            int test = rand() % teams + 1;\n            if (count&#91;test]==0){\n                count&#91;test]=-1;\n                n++;\n            }\n        }\n    }\n    \n    \n    ofstream outFile;\n    outFile.open(\"aris.i\");\n    \n    outFile &lt;&lt; timeSlots&lt;&lt;\" \";\n    outFile &lt;&lt; teams&lt;&lt;endl;    \n    \n    for(int i = 1; i &lt;= timeSlots; i++){\n        \/\/do{   \n            arr&#91;i] = rand() % teams + 1;\n        \/\/} while (count&#91;arr&#91;i]]==1);\n        \n    }\n    \n    for(int i = 1; i &lt;= timeSlots; i++){\n        while (count&#91;arr&#91;i]]==-1) {   \n            if (arr&#91;i]&lt;teams)\n                arr&#91;i]++;\n            else\n                arr&#91;i]--;\n        } \n        \n        cout &lt;&lt; arr&#91;i] &lt;&lt;\" \";\n        outFile &lt;&lt; arr&#91;i] &lt;&lt;\" \";\n    }\n    \n    cout &lt;&lt; endl;\n    outFile.close();\n    \n    \n    cout &lt;&lt; \"teams not using Aris\"&lt;&lt;endl;\n    for(int i = 1; i &lt;= teams; i++){\n        count&#91;i]=0;\n    }\n    for(int i = 1; i &lt;= timeSlots; i++){\n        count&#91;arr&#91;i]]++;\n    }\n    \n    int min=count&#91;1];\n    int max=min;\n    \n    for(int i = 1; i &lt;= teams; i++){\n        if (count&#91;i]==0){\n            cout &lt;&lt; i &lt;&lt; \" \";\n        }\n        if (count&#91;i]>0 &amp;&amp; count&#91;i]&lt;min){\n            min=count&#91;i];\n        }\n        if (count&#91;i]>max){\n            max=count&#91;i];\n        }\n        \n    }    \n    cout &lt;&lt; endl;\n    cout &lt;&lt; \"min=\" &lt;&lt; min &lt;&lt; \" \" &lt;&lt; \"max=\"&lt;&lt; max &lt;&lt; endl;\n    \n    return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u03a4\u03bf \u03b8\u03ad\u03bc\u03b1 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u0391\u2019 \u03c6\u03ac\u03c3\u03b7 \u03c4\u03bf\u03c5 37\u03bf\u03c5 \u03a0\u03b1\u03bd\u03b5\u03bb\u03bb\u03ae\u03bd\u03b9\u03bf\u03c5 \u0394\u03b9\u03b1\u03b3\u03c9\u03bd\u03b9\u03c3\u03bc\u03bf\u03cd \u03a0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03b9\u03ba\u03ae\u03c2 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03bf \u03b2\u03c1\u03b5\u03af\u03c4\u03b5 \u03b5\u03b4\u03ce. \u0398\u03b1 \u03c7\u03c1\u03b5\u03b9\u03b1\u03c3\u03c4\u03b5\u03af\u03c4\u03b5 \u03bc\u03b5\u03c1\u03b9\u03ba\u03ac \u03bc\u03b5\u03b3\u03ac\u03bb\u03b1 \u03b4\u03bf\u03ba\u03b9\u03bc\u03b1\u03c3\u03c4\u03b9\u03ba\u03ac \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 arin.in : aris1 \u03ba\u03b1\u03b9&nbsp; aris2 \u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03c3\u03c4\u03b5 \u03b4\u03b9\u03ba\u03ac \u03c3\u03b1\u03c2 \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03b5\u03bb\u03ad\u03b3\u03c7\u03bf\u03c5 \u03bc\u03b5 \u03c4\u03bf\u03bd \u03c0\u03b1\u03c1\u03b1\u03ba\u03ac\u03c4\u03c9 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1 :<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-13"],"_links":{"self":[{"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58"}],"version-history":[{"count":1,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ysitar.sites.sch.gr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}