https://github.com/utsa-saga/vc8proof
Revision 11b14e0eb8c745f8017d2f12af5286ebc5c638e5 authored by utsa-saga on 19 February 2021, 01:18:59 UTC, committed by GitHub on 19 February 2021, 01:18:59 UTC
1 parent 3b2c0da
Tip revision: 11b14e0eb8c745f8017d2f12af5286ebc5c638e5 authored by utsa-saga on 19 February 2021, 01:18:59 UTC
Delete determineGaps.cpp
Delete determineGaps.cpp
Tip revision: 11b14e0
generatecases.cpp
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main(){
string vp1 = "ACEGH";
string vp2 = "ABDFH";
string vp3 = "ACFH";
string vp4 = "ABDEGH";
int index;
int case_num = 1;
string guards[8]= {"A", "B", "C", "D", "E", "F", "G", "H"};
for (int i = 0; i < 12; ++i)
{
for (int j = 0; j < 12; ++j)
{
for (int k = 0; k < 12; ++k)
{
for (int l = 0; l < 12; ++l)
{
if ((i != j) && (i != k) && (i != l) && (j != k) && (j != l) && (k != l))
{
// create a new file
fstream f;
string filename = "case" + to_string(case_num) + ".txt";
f.open(filename, ios::out);
case_num++;
index = 0;
for (int r = 0; r < 12; ++r)
{
if (r == i) { f << vp1 << endl; }
else if (r == j) { f << vp2 << endl; }
else if (r == k) { f << vp3 << endl; }
else if (r == l) { f << vp4 << endl; }
else {
f << guards[index] << endl;
index++;
}
}
f.close();
}
}
}
}
}
return 0;
}
Computing file changes ...