summaryrefslogtreecommitdiffstats
path: root/problems/bs/tester.cpp
diff options
context:
space:
mode:
authorroot <root@localhost>2012-12-30 16:05:36 +0330
committerMahrud Sayrafi <mahrud@eve>2012-12-30 05:33:01 -0800
commitb300254ee1f308c440d8e8d8129fb863b6ec9599 (patch)
tree13b4c0871e5ed92b517c002ab815da7f0fe5fbcc /problems/bs/tester.cpp
parent9cb5ecf6956115140521d74cea8b4191634842fd (diff)
downloadhellijudge-legacy.git-b300254ee1f308c440d8e8d8129fb863b6ec9599.tar.gz
hellijudge-legacy.git-b300254ee1f308c440d8e8d8129fb863b6ec9599.tar.xz
hellijudge-legacy.git-b300254ee1f308c440d8e8d8129fb863b6ec9599.zip
Making the legacy more usefulv0.9
Added a brief installation guide in README along with etc config file samples. Added a couple of useful start and kill scripts in utils folder. Added two sample problems (one normal one interactive) along with testers in utils folder.
Diffstat (limited to 'problems/bs/tester.cpp')
-rw-r--r--problems/bs/tester.cpp28
1 files changed, 28 insertions, 0 deletions
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;
+}