Rearranged code

This commit is contained in:
Pratyush219 2021-10-13 14:55:35 +05:30
parent 4aaa66fbc7
commit b40a28019f

View File

@ -9,15 +9,15 @@
* @author Pratyush Vatsa(https://github.com/Pratyush219) * @author Pratyush Vatsa(https://github.com/Pratyush219)
*/ */
#include <iostream> /// for IO operations
#include <queue> /// for std::priority_queue
#include <unordered_set> /// for std::unordered_set
#include <vector> /// for std::vector
#include <algorithm> /// for sorting #include <algorithm> /// for sorting
#include <cassert> /// for assert #include <cassert> /// for assert
#include <cstdlib> /// random number generation #include <cstdlib> /// random number generation
#include <ctime> /// for time #include <ctime> /// for time
#include <iomanip> /// for formatting the output #include <iomanip> /// for formatting the output
#include <iostream> /// for IO operations
#include <queue> /// for priority_queue
#include <unordered_set> /// for std::unordered_set
#include <vector> /// for using vector
using std::cin; using std::cin;
using std::cout; using std::cout;
@ -268,8 +268,7 @@ void test() {
readyQueue.addProcess(get<0>(input[i]), get<1>(input[i]), readyQueue.addProcess(get<0>(input[i]), get<1>(input[i]),
get<2>(input[i])); get<2>(input[i]));
} }
vector<tuple<uint32_t, uint32_t, uint32_t, double, double, double>> vector<tuple<uint32_t, uint32_t, uint32_t, double, double, double>> res = get_final_status<uint32_t, uint32_t, uint32_t>(input);
res = get_final_status<uint32_t, uint32_t, uint32_t>(input);
assert(res == readyQueue.scheduleForFcfs()); assert(res == readyQueue.scheduleForFcfs());
// readyQueue.printResult(); // readyQueue.printResult();
} }