summaryrefslogtreecommitdiffstats
path: root/problems
diff options
context:
space:
mode:
Diffstat (limited to 'problems')
-rw-r--r--problems/bs/bs.cpp28
-rw-r--r--problems/bs/config3
-rw-r--r--problems/bs/inits/.init1
-rw-r--r--problems/bs/inits/0.init1
-rw-r--r--problems/bs/inits/1.init1
-rw-r--r--problems/bs/inits/10.init1
-rw-r--r--problems/bs/inits/11.init1
-rw-r--r--problems/bs/inits/12.init1
-rw-r--r--problems/bs/inits/13.init1
-rw-r--r--problems/bs/inits/14.init1
-rw-r--r--problems/bs/inits/15.init1
-rw-r--r--problems/bs/inits/16.init1
-rw-r--r--problems/bs/inits/17.init1
-rw-r--r--problems/bs/inits/18.init1
-rw-r--r--problems/bs/inits/19.init1
-rw-r--r--problems/bs/inits/2.init1
-rw-r--r--problems/bs/inits/20.init1
-rw-r--r--problems/bs/inits/21.init1
-rw-r--r--problems/bs/inits/22.init1
-rw-r--r--problems/bs/inits/23.init1
-rw-r--r--problems/bs/inits/24.init1
-rw-r--r--problems/bs/inits/3.init1
-rw-r--r--problems/bs/inits/4.init1
-rw-r--r--problems/bs/inits/5.init1
-rw-r--r--problems/bs/inits/6.init1
-rw-r--r--problems/bs/inits/7.init1
-rw-r--r--problems/bs/inits/8.init1
-rw-r--r--problems/bs/inits/9.init1
-rw-r--r--problems/bs/inits/a.php8
-rw-r--r--problems/bs/inits/x25
-rw-r--r--problems/bs/inputs/0.in1
-rw-r--r--problems/bs/inputs/1.in1
-rw-r--r--problems/bs/inputs/10.in1
-rw-r--r--problems/bs/inputs/11.in1
-rw-r--r--problems/bs/inputs/12.in1
-rw-r--r--problems/bs/inputs/13.in1
-rw-r--r--problems/bs/inputs/14.in1
-rw-r--r--problems/bs/inputs/15.in1
-rw-r--r--problems/bs/inputs/16.in1
-rw-r--r--problems/bs/inputs/17.in1
-rw-r--r--problems/bs/inputs/18.in1
-rw-r--r--problems/bs/inputs/19.in1
-rw-r--r--problems/bs/inputs/2.in1
-rw-r--r--problems/bs/inputs/20.in1
-rw-r--r--problems/bs/inputs/21.in1
-rw-r--r--problems/bs/inputs/22.in1
-rw-r--r--problems/bs/inputs/23.in1
-rw-r--r--problems/bs/inputs/24.in1
-rw-r--r--problems/bs/inputs/3.in1
-rw-r--r--problems/bs/inputs/4.in1
-rw-r--r--problems/bs/inputs/5.in1
-rw-r--r--problems/bs/inputs/6.in1
-rw-r--r--problems/bs/inputs/7.in1
-rw-r--r--problems/bs/inputs/8.in1
-rw-r--r--problems/bs/inputs/9.in1
-rwxr-xr-xproblems/bs/testerbin0 -> 10361 bytes
-rw-r--r--problems/bs/tester.cpp28
-rw-r--r--problems/hellow/config3
-rw-r--r--problems/hellow/hellow.cpp12
-rw-r--r--problems/hellow/inits/0.init1
-rw-r--r--problems/hellow/inits/1.init1
-rw-r--r--problems/hellow/inputs/0.in1
-rw-r--r--problems/hellow/inputs/1.in1
-rwxr-xr-xproblems/hellow/testerbin0 -> 10213 bytes
-rw-r--r--problems/hellow/tester.cpp23
65 files changed, 185 insertions, 0 deletions
diff --git a/problems/bs/bs.cpp b/problems/bs/bs.cpp
new file mode 100644
index 0000000..37600e6
--- /dev/null
+++ b/problems/bs/bs.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+
+using namespace std;
+
+int main()
+{
+ //cerr << "chert" << endl;
+ long long max; cin >> max;
+
+ long long s = 0, e = max + 1;
+
+ while (e - s > 1)
+ {
+ long long m = (e + s) / 2;
+ cout << m << endl;
+ string res;
+ cin >> res;
+ //cerr << "responce to " << m << " is " << res << endl;
+ if (res == "correct")
+ break;
+ else if (res == "high")
+ e = m;
+ else
+ s = m;
+ }
+
+ return 0;
+}
diff --git a/problems/bs/config b/problems/bs/config
new file mode 100644
index 0000000..27eea01
--- /dev/null
+++ b/problems/bs/config
@@ -0,0 +1,3 @@
+24
+default
+normal 1 16384 %n.in
diff --git a/problems/bs/inits/.init b/problems/bs/inits/.init
new file mode 100644
index 0000000..4085abc
--- /dev/null
+++ b/problems/bs/inits/.init
@@ -0,0 +1 @@
+817688420639124
diff --git a/problems/bs/inits/0.init b/problems/bs/inits/0.init
new file mode 100644
index 0000000..dc6f4a8
--- /dev/null
+++ b/problems/bs/inits/0.init
@@ -0,0 +1 @@
+218
diff --git a/problems/bs/inits/1.init b/problems/bs/inits/1.init
new file mode 100644
index 0000000..1b1c131
--- /dev/null
+++ b/problems/bs/inits/1.init
@@ -0,0 +1 @@
+280
diff --git a/problems/bs/inits/10.init b/problems/bs/inits/10.init
new file mode 100644
index 0000000..fa2fd6e
--- /dev/null
+++ b/problems/bs/inits/10.init
@@ -0,0 +1 @@
+835997987
diff --git a/problems/bs/inits/11.init b/problems/bs/inits/11.init
new file mode 100644
index 0000000..d1c6f48
--- /dev/null
+++ b/problems/bs/inits/11.init
@@ -0,0 +1 @@
+395233934
diff --git a/problems/bs/inits/12.init b/problems/bs/inits/12.init
new file mode 100644
index 0000000..9f30a1e
--- /dev/null
+++ b/problems/bs/inits/12.init
@@ -0,0 +1 @@
+403475449
diff --git a/problems/bs/inits/13.init b/problems/bs/inits/13.init
new file mode 100644
index 0000000..e7eb148
--- /dev/null
+++ b/problems/bs/inits/13.init
@@ -0,0 +1 @@
+479944972
diff --git a/problems/bs/inits/14.init b/problems/bs/inits/14.init
new file mode 100644
index 0000000..fd8cf20
--- /dev/null
+++ b/problems/bs/inits/14.init
@@ -0,0 +1 @@
+15952939
diff --git a/problems/bs/inits/15.init b/problems/bs/inits/15.init
new file mode 100644
index 0000000..1b1b29a
--- /dev/null
+++ b/problems/bs/inits/15.init
@@ -0,0 +1 @@
+681270219720
diff --git a/problems/bs/inits/16.init b/problems/bs/inits/16.init
new file mode 100644
index 0000000..82279e5
--- /dev/null
+++ b/problems/bs/inits/16.init
@@ -0,0 +1 @@
+367209446112
diff --git a/problems/bs/inits/17.init b/problems/bs/inits/17.init
new file mode 100644
index 0000000..ee2d522
--- /dev/null
+++ b/problems/bs/inits/17.init
@@ -0,0 +1 @@
+978266150219
diff --git a/problems/bs/inits/18.init b/problems/bs/inits/18.init
new file mode 100644
index 0000000..6ad0771
--- /dev/null
+++ b/problems/bs/inits/18.init
@@ -0,0 +1 @@
+82343693519
diff --git a/problems/bs/inits/19.init b/problems/bs/inits/19.init
new file mode 100644
index 0000000..8b42161
--- /dev/null
+++ b/problems/bs/inits/19.init
@@ -0,0 +1 @@
+27189505666
diff --git a/problems/bs/inits/2.init b/problems/bs/inits/2.init
new file mode 100644
index 0000000..425151f
--- /dev/null
+++ b/problems/bs/inits/2.init
@@ -0,0 +1 @@
+40
diff --git a/problems/bs/inits/20.init b/problems/bs/inits/20.init
new file mode 100644
index 0000000..9192d00
--- /dev/null
+++ b/problems/bs/inits/20.init
@@ -0,0 +1 @@
+32143969796887
diff --git a/problems/bs/inits/21.init b/problems/bs/inits/21.init
new file mode 100644
index 0000000..dc81f13
--- /dev/null
+++ b/problems/bs/inits/21.init
@@ -0,0 +1 @@
+547740858706792
diff --git a/problems/bs/inits/22.init b/problems/bs/inits/22.init
new file mode 100644
index 0000000..8d17a5f
--- /dev/null
+++ b/problems/bs/inits/22.init
@@ -0,0 +1 @@
+7973866115106
diff --git a/problems/bs/inits/23.init b/problems/bs/inits/23.init
new file mode 100644
index 0000000..100d914
--- /dev/null
+++ b/problems/bs/inits/23.init
@@ -0,0 +1 @@
+428224552539201
diff --git a/problems/bs/inits/24.init b/problems/bs/inits/24.init
new file mode 100644
index 0000000..4085abc
--- /dev/null
+++ b/problems/bs/inits/24.init
@@ -0,0 +1 @@
+817688420639124
diff --git a/problems/bs/inits/3.init b/problems/bs/inits/3.init
new file mode 100644
index 0000000..c17e934
--- /dev/null
+++ b/problems/bs/inits/3.init
@@ -0,0 +1 @@
+97
diff --git a/problems/bs/inits/4.init b/problems/bs/inits/4.init
new file mode 100644
index 0000000..c1724de
--- /dev/null
+++ b/problems/bs/inits/4.init
@@ -0,0 +1 @@
+991
diff --git a/problems/bs/inits/5.init b/problems/bs/inits/5.init
new file mode 100644
index 0000000..717576b
--- /dev/null
+++ b/problems/bs/inits/5.init
@@ -0,0 +1 @@
+726745
diff --git a/problems/bs/inits/6.init b/problems/bs/inits/6.init
new file mode 100644
index 0000000..164e593
--- /dev/null
+++ b/problems/bs/inits/6.init
@@ -0,0 +1 @@
+769820
diff --git a/problems/bs/inits/7.init b/problems/bs/inits/7.init
new file mode 100644
index 0000000..46fc9a2
--- /dev/null
+++ b/problems/bs/inits/7.init
@@ -0,0 +1 @@
+39242
diff --git a/problems/bs/inits/8.init b/problems/bs/inits/8.init
new file mode 100644
index 0000000..ab5ff2b
--- /dev/null
+++ b/problems/bs/inits/8.init
@@ -0,0 +1 @@
+558287
diff --git a/problems/bs/inits/9.init b/problems/bs/inits/9.init
new file mode 100644
index 0000000..d21dc6d
--- /dev/null
+++ b/problems/bs/inits/9.init
@@ -0,0 +1 @@
+874697
diff --git a/problems/bs/inits/a.php b/problems/bs/inits/a.php
new file mode 100644
index 0000000..3183e5d
--- /dev/null
+++ b/problems/bs/inits/a.php
@@ -0,0 +1,8 @@
+<?php
+
+ for ($i = 0; $i < 5; $i++) echo rand(1, 1000)."\n";
+ for ($i = 5; $i < 10; $i++) echo rand(1, 1000).rand(1, 1000)."\n";
+ for ($i = 10; $i < 15; $i++) echo rand(1, 1000).rand(1, 1000).rand(1, 1000)."\n";
+ for ($i = 15; $i < 20; $i++) echo rand(1, 1000).rand(1, 1000).rand(1, 1000).rand(1, 1000)."\n";
+ for ($i = 20; $i < 25; $i++) echo rand(1, 1000).rand(1, 1000).rand(1, 1000).rand(1, 1000).rand(1, 1000)."\n";
+?>
diff --git a/problems/bs/inits/x b/problems/bs/inits/x
new file mode 100644
index 0000000..9619be5
--- /dev/null
+++ b/problems/bs/inits/x
@@ -0,0 +1,25 @@
+218
+280
+40
+97
+991
+726745
+769820
+39242
+558287
+874697
+835997987
+395233934
+403475449
+479944972
+15952939
+681270219720
+367209446112
+978266150219
+82343693519
+27189505666
+32143969796887
+547740858706792
+7973866115106
+428224552539201
+817688420639124
diff --git a/problems/bs/inputs/0.in b/problems/bs/inputs/0.in
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/problems/bs/inputs/0.in
@@ -0,0 +1 @@
+1000
diff --git a/problems/bs/inputs/1.in b/problems/bs/inputs/1.in
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/problems/bs/inputs/1.in
@@ -0,0 +1 @@
+1000
diff --git a/problems/bs/inputs/10.in b/problems/bs/inputs/10.in
new file mode 100644
index 0000000..770fdcf
--- /dev/null
+++ b/problems/bs/inputs/10.in
@@ -0,0 +1 @@
+1000000000
diff --git a/problems/bs/inputs/11.in b/problems/bs/inputs/11.in
new file mode 100644
index 0000000..770fdcf
--- /dev/null
+++ b/problems/bs/inputs/11.in
@@ -0,0 +1 @@
+1000000000
diff --git a/problems/bs/inputs/12.in b/problems/bs/inputs/12.in
new file mode 100644
index 0000000..770fdcf
--- /dev/null
+++ b/problems/bs/inputs/12.in
@@ -0,0 +1 @@
+1000000000
diff --git a/problems/bs/inputs/13.in b/problems/bs/inputs/13.in
new file mode 100644
index 0000000..770fdcf
--- /dev/null
+++ b/problems/bs/inputs/13.in
@@ -0,0 +1 @@
+1000000000
diff --git a/problems/bs/inputs/14.in b/problems/bs/inputs/14.in
new file mode 100644
index 0000000..770fdcf
--- /dev/null
+++ b/problems/bs/inputs/14.in
@@ -0,0 +1 @@
+1000000000
diff --git a/problems/bs/inputs/15.in b/problems/bs/inputs/15.in
new file mode 100644
index 0000000..d6ee901
--- /dev/null
+++ b/problems/bs/inputs/15.in
@@ -0,0 +1 @@
+1000000000000
diff --git a/problems/bs/inputs/16.in b/problems/bs/inputs/16.in
new file mode 100644
index 0000000..d6ee901
--- /dev/null
+++ b/problems/bs/inputs/16.in
@@ -0,0 +1 @@
+1000000000000
diff --git a/problems/bs/inputs/17.in b/problems/bs/inputs/17.in
new file mode 100644
index 0000000..d6ee901
--- /dev/null
+++ b/problems/bs/inputs/17.in
@@ -0,0 +1 @@
+1000000000000
diff --git a/problems/bs/inputs/18.in b/problems/bs/inputs/18.in
new file mode 100644
index 0000000..d6ee901
--- /dev/null
+++ b/problems/bs/inputs/18.in
@@ -0,0 +1 @@
+1000000000000
diff --git a/problems/bs/inputs/19.in b/problems/bs/inputs/19.in
new file mode 100644
index 0000000..d6ee901
--- /dev/null
+++ b/problems/bs/inputs/19.in
@@ -0,0 +1 @@
+1000000000000
diff --git a/problems/bs/inputs/2.in b/problems/bs/inputs/2.in
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/problems/bs/inputs/2.in
@@ -0,0 +1 @@
+1000
diff --git a/problems/bs/inputs/20.in b/problems/bs/inputs/20.in
new file mode 100644
index 0000000..e19179d
--- /dev/null
+++ b/problems/bs/inputs/20.in
@@ -0,0 +1 @@
+1000000000000000
diff --git a/problems/bs/inputs/21.in b/problems/bs/inputs/21.in
new file mode 100644
index 0000000..e19179d
--- /dev/null
+++ b/problems/bs/inputs/21.in
@@ -0,0 +1 @@
+1000000000000000
diff --git a/problems/bs/inputs/22.in b/problems/bs/inputs/22.in
new file mode 100644
index 0000000..e19179d
--- /dev/null
+++ b/problems/bs/inputs/22.in
@@ -0,0 +1 @@
+1000000000000000
diff --git a/problems/bs/inputs/23.in b/problems/bs/inputs/23.in
new file mode 100644
index 0000000..e19179d
--- /dev/null
+++ b/problems/bs/inputs/23.in
@@ -0,0 +1 @@
+1000000000000000
diff --git a/problems/bs/inputs/24.in b/problems/bs/inputs/24.in
new file mode 100644
index 0000000..e19179d
--- /dev/null
+++ b/problems/bs/inputs/24.in
@@ -0,0 +1 @@
+1000000000000000
diff --git a/problems/bs/inputs/3.in b/problems/bs/inputs/3.in
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/problems/bs/inputs/3.in
@@ -0,0 +1 @@
+1000
diff --git a/problems/bs/inputs/4.in b/problems/bs/inputs/4.in
new file mode 100644
index 0000000..83b33d2
--- /dev/null
+++ b/problems/bs/inputs/4.in
@@ -0,0 +1 @@
+1000
diff --git a/problems/bs/inputs/5.in b/problems/bs/inputs/5.in
new file mode 100644
index 0000000..749fce6
--- /dev/null
+++ b/problems/bs/inputs/5.in
@@ -0,0 +1 @@
+1000000
diff --git a/problems/bs/inputs/6.in b/problems/bs/inputs/6.in
new file mode 100644
index 0000000..749fce6
--- /dev/null
+++ b/problems/bs/inputs/6.in
@@ -0,0 +1 @@
+1000000
diff --git a/problems/bs/inputs/7.in b/problems/bs/inputs/7.in
new file mode 100644
index 0000000..749fce6
--- /dev/null
+++ b/problems/bs/inputs/7.in
@@ -0,0 +1 @@
+1000000
diff --git a/problems/bs/inputs/8.in b/problems/bs/inputs/8.in
new file mode 100644
index 0000000..749fce6
--- /dev/null
+++ b/problems/bs/inputs/8.in
@@ -0,0 +1 @@
+1000000
diff --git a/problems/bs/inputs/9.in b/problems/bs/inputs/9.in
new file mode 100644
index 0000000..749fce6
--- /dev/null
+++ b/problems/bs/inputs/9.in
@@ -0,0 +1 @@
+1000000
diff --git a/problems/bs/tester b/problems/bs/tester
new file mode 100755
index 0000000..812cf3b
--- /dev/null
+++ b/problems/bs/tester
Binary files differ
diff --git a/problems/bs/tester.cpp b/problems/bs/tester.cpp
new file mode 100644
index 0000000..1ae5699
--- /dev/null
+++ b/problems/bs/tester.cpp
@@ -0,0 +1,28 @@
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+int main (int argc, char *argv[])
+{
+ ifstream fin(argv[1]);
+ long long n, tmp;
+ fin >> n;
+
+ for (int i = 0; i < 74; i++)
+ {
+ cin >> tmp;
+ if (tmp == n)
+ {
+ cout << "correct" << endl;
+ cerr << 100 << endl;
+ return 0;
+ }
+ else if (tmp > n)
+ cout << "high" << endl;
+ else
+ cout << "low" << endl;
+ }
+
+ cerr << 0 << endl;
+ return 0;
+}
diff --git a/problems/hellow/config b/problems/hellow/config
new file mode 100644
index 0000000..5e78526
--- /dev/null
+++ b/problems/hellow/config
@@ -0,0 +1,3 @@
+2
+default
+normal 1 16384 %n.in
diff --git a/problems/hellow/hellow.cpp b/problems/hellow/hellow.cpp
new file mode 100644
index 0000000..f1255ce
--- /dev/null
+++ b/problems/hellow/hellow.cpp
@@ -0,0 +1,12 @@
+#include <iostream>
+
+using namespace std;
+
+int main()
+{
+ int n;
+ cin >> n;
+ cout << 3 * n << endl;
+ return 0;
+}
+
diff --git a/problems/hellow/inits/0.init b/problems/hellow/inits/0.init
new file mode 100644
index 0000000..697cb3a
--- /dev/null
+++ b/problems/hellow/inits/0.init
@@ -0,0 +1 @@
+300
diff --git a/problems/hellow/inits/1.init b/problems/hellow/inits/1.init
new file mode 100644
index 0000000..a83d1d5
--- /dev/null
+++ b/problems/hellow/inits/1.init
@@ -0,0 +1 @@
+-3
diff --git a/problems/hellow/inputs/0.in b/problems/hellow/inputs/0.in
new file mode 100644
index 0000000..29d6383
--- /dev/null
+++ b/problems/hellow/inputs/0.in
@@ -0,0 +1 @@
+100
diff --git a/problems/hellow/inputs/1.in b/problems/hellow/inputs/1.in
new file mode 100644
index 0000000..3a2e3f4
--- /dev/null
+++ b/problems/hellow/inputs/1.in
@@ -0,0 +1 @@
+-1
diff --git a/problems/hellow/tester b/problems/hellow/tester
new file mode 100755
index 0000000..a61e8c9
--- /dev/null
+++ b/problems/hellow/tester
Binary files differ
diff --git a/problems/hellow/tester.cpp b/problems/hellow/tester.cpp
new file mode 100644
index 0000000..f20ffdc
--- /dev/null
+++ b/problems/hellow/tester.cpp
@@ -0,0 +1,23 @@
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <cstdlib>
+
+using namespace std;
+
+int main(int argc, char* argv[])
+{
+ ifstream fin (argv[1]);
+ int z, y;
+ fin >> z;
+ cin >> y;
+ if(z == y)
+ {
+// cerr << "Correct!" << endl;
+ cerr << 100 << endl;
+ return 0;
+ }
+// cerr << "Wrong!" << endl;
+ cerr << 0 << endl;
+ return 0;
+}