diff --git a/.gitignore b/.gitignore index e7c164e0f5311bbbdbf9296adad998612cfe0582..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +0,0 @@ -* -!*.cpp \ No newline at end of file diff --git a/01/.vscode/settings.json b/01/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..b0bd9ac4e03420d354111adf0f710dfd4293ce9e --- /dev/null +++ b/01/.vscode/settings.json @@ -0,0 +1,55 @@ +{ + "files.associations": { + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "concepts": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "map": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "random": "cpp", + "regex": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/01/data/bon_pub01.err b/01/data/bon_pub01.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/bon_pub01.in b/01/data/bon_pub01.in new file mode 100644 index 0000000000000000000000000000000000000000..0b5a722809d40c0d0748b011ee6662ddc89e8b3d --- /dev/null +++ b/01/data/bon_pub01.in @@ -0,0 +1,8 @@ +config.min=-5000 +config.max=5000 +config.width=3 +config.align=left +config.stretch=0 += +3300;4400;20;SUM(A:C) +-40;-50;-60 \ No newline at end of file diff --git a/01/data/bon_pub01.out b/01/data/bon_pub01.out new file mode 100644 index 0000000000000000000000000000000000000000..bb548eaa37236a0a0ab7759378f71372f1386f51 --- /dev/null +++ b/01/data/bon_pub01.out @@ -0,0 +1,13 @@ +config.min=-5000 +config.max=5000 +config.width=3 +config.align=left +config.stretch=0 + ++-----+-----+-----+-----+-----+ +| | A | B | C | D | ++-----+-----+-----+-----+-----+ +| 1 | ### | ### | 20 | ### | ++-----+-----+-----+-----+-----+ +| 2 | -40 | -50 | -60 | | ++-----+-----+-----+-----+-----+ diff --git a/01/data/bon_pub02.err b/01/data/bon_pub02.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/bon_pub02.in b/01/data/bon_pub02.in new file mode 100644 index 0000000000000000000000000000000000000000..2eaadb9f224938d84587b6145ff5a03b5313d993 --- /dev/null +++ b/01/data/bon_pub02.in @@ -0,0 +1,8 @@ +config.min=-5000 +config.max=5000 +config.width=3 +config.align=left +config.stretch=1 += +3300;4400;20;SUM(A:C) +-40;-50;-60 \ No newline at end of file diff --git a/01/data/bon_pub02.out b/01/data/bon_pub02.out new file mode 100644 index 0000000000000000000000000000000000000000..b1a1f5990379f82eea7b64f4bc625636cae20ddd --- /dev/null +++ b/01/data/bon_pub02.out @@ -0,0 +1,13 @@ +config.min=-5000 +config.max=5000 +config.width=4 +config.align=left +config.stretch=1 + ++------+------+------+------+------+ +| | A | B | C | D | ++------+------+------+------+------+ +| 1 | 3300 | 4400 | 20 | 7720 | ++------+------+------+------+------+ +| 2 | -40 | -50 | -60 | | ++------+------+------+------+------+ diff --git a/01/data/bon_pub03.err b/01/data/bon_pub03.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/bon_pub03.in b/01/data/bon_pub03.in new file mode 100644 index 0000000000000000000000000000000000000000..a208a9ec61dec2a73f41d6e44d7e3560b1297fb5 --- /dev/null +++ b/01/data/bon_pub03.in @@ -0,0 +1,9 @@ +config.min=-99 +config.max=100 +config.width=4 +config.align=left +config.header=0 += +33;44;20;SUM(A:C) +-40;-50;SUM(A:B);SUM(A:C) +3;14;15;92 \ No newline at end of file diff --git a/01/data/bon_pub03.out b/01/data/bon_pub03.out new file mode 100644 index 0000000000000000000000000000000000000000..a221375a1913c5dc8a50b037028bd09d9fb7f5b5 --- /dev/null +++ b/01/data/bon_pub03.out @@ -0,0 +1,13 @@ +config.min=-99 +config.max=100 +config.width=4 +config.align=left +config.header=0 + ++------+------+------+------+ +| 33 | 44 | 20 | 97 | ++------+------+------+------+ +| -40 | -50 | -90 | -180 | ++------+------+------+------+ +| 3 | 14 | 15 | 92 | ++------+------+------+------+ diff --git a/01/data/pub01.err b/01/data/pub01.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/pub01.in b/01/data/pub01.in new file mode 100644 index 0000000000000000000000000000000000000000..1d3908ca8ceca766548bee5d5fdd3d5a4a84e0ce --- /dev/null +++ b/01/data/pub01.in @@ -0,0 +1,7 @@ +config.min=-99 +config.max=150 +config.width=3 +config.align=left += +10;20;20;SUM(A:C) +-10;-20;-30;-40;-50 \ No newline at end of file diff --git a/01/data/pub01.out b/01/data/pub01.out new file mode 100644 index 0000000000000000000000000000000000000000..2721437b83977f0e4429cff6e024391e980fba14 --- /dev/null +++ b/01/data/pub01.out @@ -0,0 +1,12 @@ +config.min=-99 +config.max=150 +config.width=3 +config.align=left + ++-----+-----+-----+-----+-----+-----+ +| | A | B | C | D | E | ++-----+-----+-----+-----+-----+-----+ +| 1 | 10 | 20 | 20 | 50 | | ++-----+-----+-----+-----+-----+-----+ +| 2 | -10 | -20 | -30 | -40 | -50 | ++-----+-----+-----+-----+-----+-----+ diff --git a/01/data/pub02.err b/01/data/pub02.err new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/pub02.in b/01/data/pub02.in new file mode 100644 index 0000000000000000000000000000000000000000..451c8bc8472f97a22dee2ef85dfb52874cba95cc --- /dev/null +++ b/01/data/pub02.in @@ -0,0 +1,6 @@ +config.width=3 +config.align=right += +10;20;30;SUM(A:C) +-40;-50;-60;-70 +90;80;-20;-30 \ No newline at end of file diff --git a/01/data/pub02.out b/01/data/pub02.out new file mode 100644 index 0000000000000000000000000000000000000000..ad2a982c2cc611e415e67c4a2645f085dc266f91 --- /dev/null +++ b/01/data/pub02.out @@ -0,0 +1,14 @@ +config.min=-99 +config.max=100 +config.width=3 +config.align=right + ++-----+-----+-----+-----+-----+ +| | A | B | C | D | ++-----+-----+-----+-----+-----+ +| 1 | 10 | 20 | 30 | 60 | ++-----+-----+-----+-----+-----+ +| 2 | -40 | -50 | -60 | -70 | ++-----+-----+-----+-----+-----+ +| 3 | 90 | 80 | -20 | -30 | ++-----+-----+-----+-----+-----+ diff --git a/01/data/pub03.err b/01/data/pub03.err new file mode 100644 index 0000000000000000000000000000000000000000..5b44dda85f9d4fba61cfd669afc486811d748c90 --- /dev/null +++ b/01/data/pub03.err @@ -0,0 +1 @@ +Out of range diff --git a/01/data/pub03.in b/01/data/pub03.in new file mode 100644 index 0000000000000000000000000000000000000000..dad237b636c05a21d818aff3486773c6c44bab1a --- /dev/null +++ b/01/data/pub03.in @@ -0,0 +1,5 @@ +config.min=0 +config.max=10 += +10;20;30;SUM(A:C) +60;20;70 \ No newline at end of file diff --git a/01/data/pub03.out b/01/data/pub03.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/pub04.err b/01/data/pub04.err new file mode 100644 index 0000000000000000000000000000000000000000..30b992dbd24382da7ad4e10f3540946329de6fc7 --- /dev/null +++ b/01/data/pub04.err @@ -0,0 +1 @@ +Invalid input diff --git a/01/data/pub04.in b/01/data/pub04.in new file mode 100644 index 0000000000000000000000000000000000000000..7ce5df93acc1ebd3388b40ab7577495244204331 --- /dev/null +++ b/01/data/pub04.in @@ -0,0 +1,5 @@ +config.min=0 +config.max=1000 += +a;b;c;400;500;SUM(A:E) +60;20;30;40;50;60;70 \ No newline at end of file diff --git a/01/data/pub04.out b/01/data/pub04.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/pub05.err b/01/data/pub05.err new file mode 100644 index 0000000000000000000000000000000000000000..c24f7a3824487a0896752772add39e618d3985b6 --- /dev/null +++ b/01/data/pub05.err @@ -0,0 +1 @@ +Invalid configuration diff --git a/01/data/pub05.in b/01/data/pub05.in new file mode 100644 index 0000000000000000000000000000000000000000..11b71ea3cb6c14ee4cbca682928f0d4ee403a86f --- /dev/null +++ b/01/data/pub05.in @@ -0,0 +1,6 @@ +config.min=0 +config.max=1000 +config.width=-5 += +100;200;300;400;500;SUM(A:E) +60;20;30;40;50;60;70 \ No newline at end of file diff --git a/01/data/pub05.out b/01/data/pub05.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/data/pub06.err b/01/data/pub06.err new file mode 100644 index 0000000000000000000000000000000000000000..347b3fdfb965211430382f799453d1b7e11ff0f0 --- /dev/null +++ b/01/data/pub06.err @@ -0,0 +1 @@ +Cell is too short diff --git a/01/data/pub06.in b/01/data/pub06.in new file mode 100644 index 0000000000000000000000000000000000000000..7097a8978eeacb4458967e39bda9b4ced7240ea4 --- /dev/null +++ b/01/data/pub06.in @@ -0,0 +1,6 @@ +config.min=0 +config.max=1000 +config.width=2 += +100;200;300;400;500;SUM(A:E) +60;20;30;40;50;60;70 \ No newline at end of file diff --git a/01/data/pub06.out b/01/data/pub06.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/01/template/.vscode/settings.json b/01/template/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..930ff050668ad09a18a25432b9cbdfa9c4fc8ef0 --- /dev/null +++ b/01/template/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "*.tcc": "cpp" + } +} \ No newline at end of file diff --git a/01/template/Makefile b/01/template/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..1ba7c4aba9da02ca16ac1ac6ed28824170909add --- /dev/null +++ b/01/template/Makefile @@ -0,0 +1,17 @@ +CXX = g++ +CXXFLAGS = -pedantic -Wall -Werror -std=c++17 + +SRC = main.cpp parse.cpp +OBJ = $(SRC:.cpp=.o) +EXEC = program + +all: $(EXEC) + +$(EXEC): $(OBJ) + $(CXX) $(CXXFLAGS) -o $@ $^ + +%.o: %.cpp %.hpp + $(CXX) $(CXXFLAGS) -c $< -o $@ + +clean: + rm -f $(OBJ) $(EXEC) diff --git a/01/template/dmskoskds.cpp b/01/template/dmskoskds.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2880862c5e250c40ceb9e718ceda7dfd78348629 --- /dev/null +++ b/01/template/dmskoskds.cpp @@ -0,0 +1,211 @@ +#include <iostream> +#include <string> +#include <regex> +#include <vector> +#include <sstream> +#include <iomanip> +#include "main.hpp" +#include "parse.hpp" + +#define OUT_OF_RANGE 100 +#define INVALID_INPUT 101 +#define INVALID_CONFIGURATION 102 +#define CELL_IS_TOO_SHORT 103 + +void print_border_line(size_t length, int chars_amount); +bool is_cell_too_short(int number, int width); + +int main(){ + + int Marek = 0; + + // variable for decoded config + config_t config; + std::string line; + bool readingConfig = true; // Flag to control reading config vs table + + std::vector<config_t> my_configs; + config_t new_config; + + new_config.type = "min"; + new_config.value = "-99"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "max"; + new_config.value = "100"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "width"; + new_config.value = "3"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "align"; + new_config.value = "left"; + new_config.valid = true; + my_configs.push_back(new_config); + +/* READING CONFIG +*****************************************************************************************/ + do { + std::getline(std::cin, line); + + if (readingConfig) { + config = getConfig(line); // Decode config + + if (config.valid) { + for (std::size_t i = 0; i < my_configs.size(); i++) { + if (config.type.compare(my_configs[i].type) == 0) { + my_configs[i].value = config.value; + } + } + } + // If the line is exactly "=" + if (line == "=") { + + readingConfig = false; // Stop reading config, start reading table + } + } + } while (readingConfig); +/***************************************************************************************/ + + if (stoi(my_configs[0].value) > stoi(my_configs[1].value) || stoi(my_configs[2].value) < 1) { + std::cerr << "Invalid configuration\r\n"; + return INVALID_CONFIGURATION; + } + +/* READING THE TABLE +*****************************************************************************************/ + + std::vector<std::vector<int>> values; + + int min = stoi(my_configs[0].value); + int max = stoi(my_configs[1].value); + int width = stoi(my_configs[2].value); + + // Now, we are reading table values + while (std::getline(std::cin, line)) { + std::stringstream ss(line); + std::vector<int> row; + std::string cell; + int number; + + while (std::getline(ss, cell, ';')) { + try { // if loaded cell is a number + number = std::stoi(cell); + // Check if the number is in the given range + if (number < min || number > max) { + std::cerr << "Out of range\r\n"; + return OUT_OF_RANGE; + } + if (is_cell_too_short(number, width)) { + std::cerr << "Cell is too short\r\n"; + return CELL_IS_TOO_SHORT; + } + row.push_back(number); + } + // If the cell isn't a number + catch (const std::exception& e) { // if there is a text (SUM?) + std::regex sum_regex(R"(SUM\(([A-Z]):([A-Z])\))"); + std::smatch match; + int sum = 0; + + if (std::regex_match(cell, match, sum_regex)) { + char from = match[1].str()[0]; + char to = match[2].str()[0]; + + for (int i = from - 'A'; i <= to - 'A'; i++) { + sum += row[i]; + } + } else { + std::cerr << "Invalid input\r\n"; + return INVALID_INPUT; + } + if (is_cell_too_short(sum, width)) { + std::cerr << "Cell is too short\r\n"; + return CELL_IS_TOO_SHORT; + } + row.push_back(sum); + } + } + values.push_back(row); + } + +/***************************************************************************************/ + + +/* PRINTING CONFIG INFO +***************************************************************************************/ + for (const auto& config : my_configs) { + std::cout << "config." << config.type << "=" << config.value << "\r\n"; + } + std::cout << "\r\n"; + +/***************************************************************************************/ + + // Finds the width of the table (according to the longest row) + size_t max_length = 0; + for (const auto& row : values) { + if (row.size() > max_length) { + max_length = row.size(); + } + } + +/* PRINTING TABLE +***************************************************************************************/ + + print_border_line(max_length, width); + if (my_configs[3].value == "left") { + std::cout << std::left; + } + + std::cout << "|" << std::string(width + 2, ' '); + + std::cout << "|"; + for (char i = 'A'; i < 'A' + static_cast<char>(max_length); i++) { + std::cout << " " << std::setw(width) << i << " |"; + } + std::cout << "\r\n"; + + print_border_line(max_length, width); + + size_t rows_amount = values.size(); + for (size_t row = 0; row < rows_amount; row++) { + size_t cols_amount = values[row].size(); + std::cout << "| " << std::setw(width) << row + 1 << " |"; + for (size_t col = 0; col < max_length; col++) { + if (cols_amount > 0) { + std::cout << " " << std::setw(width) << values[row][col] << " |"; + cols_amount -= 1; + } else { + std::cout << " " << std::string(width + 1, ' ') << "|"; + } + } + std::cout << "\r\n"; + print_border_line(max_length, width); + } + +/***************************************************************************************/ + + return Marek; +} + +void print_border_line(size_t length, int chars_amount) { + std::cout << "+"; + for (size_t i = 0; i < length + 1; i++) { + std::cout << std::string(chars_amount + 2, '-') ; + std::cout << "+"; + } + std::cout << "\r\n"; +} + +bool is_cell_too_short(int number, int width) { + bool ret = false; + int len = std::to_string(std::abs(number)).length(); + if (len > width) { + ret = true; + } + return ret; +} diff --git a/01/template/idk.out b/01/template/idk.out new file mode 100644 index 0000000000000000000000000000000000000000..c705e990df88c4d1ba27a0f817d2bb63154cee2c --- /dev/null +++ b/01/template/idk.out @@ -0,0 +1,16 @@ +config.min=-99 +config.max=150 +config.width=3 +config.align=left +config.min=-99 +config.max=150 +config.width=3 +config.align=left + ++-----+-----+-----+-----+-----+-----+ +| | A | B | C | D | E | ++-----+-----+-----+-----+-----+-----+ +| 1 | 10 | 20 | 20 | 50 | | ++-----+-----+-----+-----+-----+-----+ +| 2 | -10 | -20 | -30 | -40 | -50 | ++-----+-----+-----+-----+-----+-----+ diff --git a/01/template/main.cpp b/01/template/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b3db266518bc57fe703bc90f6683f46b736fb80a --- /dev/null +++ b/01/template/main.cpp @@ -0,0 +1,274 @@ +#include <iostream> +#include <string> +#include <regex> +#include <vector> +#include <sstream> +#include <iomanip> +#include "main.hpp" +#include "parse.hpp" + +#define OUT_OF_RANGE 100 +#define INVALID_INPUT 101 +#define INVALID_CONFIGURATION 102 +#define CELL_IS_TOO_SHORT 103 + +void print_border_line(size_t length, int chars_amount); +bool is_cell_too_short(int number, int width); + +int main(){ + + int Marek = 0; + int stretch_type = 10; + bool is_print_header = true; + + // variable for decoded config + config_t config; + std::string line; + bool readingConfig = true; // Flag to control reading config vs table + + std::vector<config_t> my_configs; + config_t new_config; + + new_config.type = "min"; + new_config.value = "-99"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "max"; + new_config.value = "100"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "width"; + new_config.value = "3"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "align"; + new_config.value = "left"; + new_config.valid = true; + my_configs.push_back(new_config); + + new_config.type = "header"; + new_config.value = "1"; + new_config.valid = true; + my_configs.push_back(new_config); + +/* READING CONFIG +*****************************************************************************************/ + do { + std::getline(std::cin, line); + + if (readingConfig) { + config = getConfig(line); // Decode config + + if (config.valid) { + for (std::size_t i = 0; i < my_configs.size(); i++) { + if (config.type.compare(my_configs[i].type) == 0) { + my_configs[i].value = config.value; + } else if (i == my_configs.size() - 1) { + if (config.type.compare("stretch") == 0) { + stretch_type = stoi(config.value); + my_configs.push_back(config); + } + } + } + } + // If the line is exactly "=" + if (line == "=") { + + readingConfig = false; // Stop reading config, start reading table + } + } + } while (readingConfig); +/***************************************************************************************/ + + if (stoi(my_configs[0].value) > stoi(my_configs[1].value) || stoi(my_configs[2].value) < 1) { + std::cerr << "Invalid configuration\n"; + return INVALID_CONFIGURATION; + } + + if (stoi(my_configs[4].value) == 0) { + is_print_header = false; + } + +/* READING THE TABLE +*****************************************************************************************/ + + std::vector<std::vector<int>> values; + + int min = stoi(my_configs[0].value); + int max = stoi(my_configs[1].value); + int width = stoi(my_configs[2].value); + + // Now, we are reading table values + while (std::getline(std::cin, line)) { + std::stringstream ss(line); + std::vector<int> row; + std::string cell; + int number; + + while (std::getline(ss, cell, ';')) { + try { // if loaded cell is a number + number = std::stoi(cell); + // Check if the number is in the given range + if (number < min || number > max) { + std::cerr << "Out of range\n"; + return OUT_OF_RANGE; + } + // Checks cell size + if (is_cell_too_short(number, width) && (stretch_type == 10)) { + std::cerr << "Cell is too short\n"; + return CELL_IS_TOO_SHORT; + } + row.push_back(number); + } + // If the cell isn't a number + catch (const std::exception& e) { // if there is a text (SUM?) + std::regex sum_regex(R"(SUM\(([A-Z]):([A-Z])\))"); + std::smatch match; + int sum = 0; + + if (std::regex_match(cell, match, sum_regex)) { + char from = match[1].str()[0]; + char to = match[2].str()[0]; + + for (int i = from - 'A'; i <= to - 'A'; i++) { + sum += row[i]; + } + } else { + std::cerr << "Invalid input\n"; + return INVALID_INPUT; + } + if (is_cell_too_short(sum, width) && (stretch_type == 10)) { + std::cerr << "Cell is too short\n"; + return CELL_IS_TOO_SHORT; + } + row.push_back(sum); + } + } + values.push_back(row); + } + +/***************************************************************************************/ + + if (stretch_type == 1) { + // Find the longest number + int length_longest_number = 0; + for (const auto& row : values) { + for (const auto& cell : row) { + int cell_length = std::to_string(std::abs(cell)).length(); + if (cell_length > length_longest_number) { + length_longest_number = cell_length; + } + } + } + width = length_longest_number; + my_configs[2].value = std::to_string(width); + } + +/* PRINTING CONFIG INFO +***************************************************************************************/ + for (const auto& config : my_configs) { + if (config.type.compare("header") == 0 && config.value.compare("1") == 0) { + + } else { + std::cout << "config." << config.type << "=" << config.value << "\n"; + } + } + std::cout << "\n"; + +/***************************************************************************************/ + + // Finds the width of the table (according to the longest row) + size_t max_length = 0; + for (const auto& row : values) { + if (row.size() > max_length) { + max_length = row.size(); + } + } + +/* PRINTING TABLE +***************************************************************************************/ + + if (my_configs[3].value == "left") { + std::cout << std::left; + } + + // If header==1 + if (is_print_header) { + print_border_line(max_length + 1, width); + + std::cout << "|" << std::string(width + 2, ' '); + + std::cout << "|"; + for (char i = 'A'; i < 'A' + static_cast<char>(max_length); i++) { + std::cout << " " << std::setw(width) << i << " |"; + } + std::cout << "\n"; + } + if (is_print_header) { + print_border_line(max_length + 1, width); + } else { + print_border_line(max_length, width); + } + + size_t rows_amount = values.size(); + for (size_t row = 0; row < rows_amount; row++) { + size_t cols_amount = values[row].size(); + if (is_print_header) { + std::cout << "| " << std::setw(width) << row + 1 << " |"; + } else { + std::cout << "|"; + } + for (size_t col = 0; col < max_length; col++) { + if (cols_amount > 0) { + if (stretch_type == 0) { + int num_len = std::to_string(std::abs(values[row][col])).length(); + if (num_len > width) { + std::cout << " "; + for (int i = 0; i < width; i++) { + std::cout << "#"; + } + std::cout << " |"; + } else { + std::cout << " " << std::setw(width) << values[row][col] << " |"; + } + } else { + std::cout << " " << std::setw(width) << values[row][col] << " |"; + } + cols_amount -= 1; + } else { + std::cout << " " << std::string(width + 1, ' ') << "|"; + } + } + std::cout << "\n"; + if (is_print_header) { + print_border_line(max_length + 1, width); + } else { + print_border_line(max_length, width); + } + } + +/***************************************************************************************/ + + return Marek; +} + +void print_border_line(size_t length, int chars_amount) { + std::cout << "+"; + for (size_t i = 0; i < length; i++) { + std::cout << std::string(chars_amount + 2, '-'); + std::cout << "+"; + } + std::cout << "\n"; +} + +bool is_cell_too_short(int number, int width) { + bool ret = false; + int len = std::to_string(std::abs(number)).length(); + if (len > width) { + ret = true; + } + return ret; +} diff --git a/01/template/main.hpp b/01/template/main.hpp new file mode 100644 index 0000000000000000000000000000000000000000..bc9d9ad957ebd3d35766e8ceeb6a2466b29760fe --- /dev/null +++ b/01/template/main.hpp @@ -0,0 +1,6 @@ + +#ifndef MAIN_HPP +#define MAIN_HPP + + +#endif \ No newline at end of file diff --git a/01/template/main.zip b/01/template/main.zip new file mode 100644 index 0000000000000000000000000000000000000000..4ceeff63a211d511dfebfcff1d94258f11d812a4 Binary files /dev/null and b/01/template/main.zip differ diff --git a/01/template/parse.cpp b/01/template/parse.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9a63b684645b76e5a815b641df9c7d0c6e2f6549 --- /dev/null +++ b/01/template/parse.cpp @@ -0,0 +1,53 @@ + +#include <string> +#include <regex> +#include <vector> +#include "parse.hpp" + +config_t getConfig(std::string text){ + config_t config; + std::regex regexConfig("(\\w+).(\\w+)=([\\w-]+)"); + std::smatch fn_match; + config.valid = false; + + if(std::regex_search(text, fn_match, regexConfig)){ + if(fn_match[1].compare("config") == 0){ // If there is 1st word is config + config.type = fn_match[2]; // Sets type from text + config.value = fn_match[3]; // Sets value from text + config.valid = true; + } + else{ + config.type = "not config"; + } + } + return config; +} + +sum_t getSum(std::string text, std::vector<int> numbers){ + sum_t sum; + std::regex regexConfig("(\\w+)\\((\\w):(\\w)\\)"); + std::smatch fn_match; + sum.valid = false; + sum.value = 0; + + if(std::regex_search(text, fn_match, regexConfig)){ + if(fn_match[1].compare("SUM") == 0){ + std::string temp = fn_match[2]; + int from = temp[0] - 'A'; + temp = fn_match[3]; + int to = temp[0] - 'A'; + + if(to < (int)numbers.size()){ + for(int i=from; i<=to; i++){ + sum.value += numbers[i]; + } + sum.valid = true; + sum.width = std::to_string(sum.value).size(); + } + else{ + sum.valid = false; + } + } + } + return sum; +} \ No newline at end of file diff --git a/01/template/parse.hpp b/01/template/parse.hpp new file mode 100644 index 0000000000000000000000000000000000000000..f7ef73b6f8a73a2f33c2860ee5ee081629d3ce89 --- /dev/null +++ b/01/template/parse.hpp @@ -0,0 +1,48 @@ +#ifndef _PARSE_HPP_ +#define _PARSE_HPP_ + +#include <string> +#include <vector> + +/** + * Header file for parsing inputs and printing out the header and lines + */ + +/** + * @brief Configuration struct + */ +typedef struct{ + std::string type; /**< Type of the config as string */ + std::string value; /**< Value after '=' char */ + bool valid; /**< true if this configuration is valid */ +}config_t; + +/** + * @brief Sum struct + */ +typedef struct{ + int value; /**< Sum of the cells */ + bool valid; /**< true if this sum is valid */ + int width; /**< Width of the text */ +}sum_t; + +/** + * @brief Parse input string to parse input configuration + * + * @param text Input string for parsing (one line) + * @retval Configuration struct (config_t) with parsed values + * + */ +config_t getConfig(std::string text); + +/** + * @brief Parse sum cell and return value and its validity + * + * @param text Text for parsing in format SUM(FROM:TO) + * @param numbers Vector of numbers which can be summed + * @retval sum_t struct with the value, text width and valid information + * + */ +sum_t getSum(std::string text, std::vector<int> numbers); + +#endif // __PARSE_HPP_ \ No newline at end of file diff --git a/01/template/working_basic.zip b/01/template/working_basic.zip new file mode 100644 index 0000000000000000000000000000000000000000..bcc2c31289647a74d5869e16bc4855543cae3401 Binary files /dev/null and b/01/template/working_basic.zip differ diff --git a/02/doprava.cpp b/02/doprava.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28858e911e4856d1a27857a9baf7e8f711c9b670 --- /dev/null +++ b/02/doprava.cpp @@ -0,0 +1,218 @@ +#include "doprava.hpp" +using namespace std; + +Time::Time(int ss) : seconds(ss) {} // initialize by seconds after midnight: seconds(ss){}; + +Time::Time(int hh, int mm, int ss) : seconds(3600 * hh + 60 * mm + ss) {} // initialize by hours, minutes seconds + +Time::Time(const Time &tt) : seconds(tt.seconds) {} // copy-constructor + +Time &Time::operator=(const Time &tt) +{ + this->seconds = tt.seconds; + return *this; +} + +int Time::gets() const { return seconds; } // get seconds after midnight // {return ss;} +void Time::gett(int &hh, int &mm, int &ss) const // get hours, minutes, seconds +{ + ss = seconds; + hh = ss / 3600; + ss -= 3600 * hh; + mm = ss / 60; + ss -= 60 * mm; +} + +Time operator+(const Time &lhs, const Time &rhs) { return Time(lhs.seconds + rhs.seconds); } +Time operator-(const Time &lhs, const Time &rhs) { return Time(lhs.seconds - rhs.seconds); } +bool operator<(const Time &lhs, const Time &rhs) { return lhs.seconds < rhs.seconds; } +bool operator>(const Time &lhs, const Time &rhs) { return rhs < lhs; } +bool operator<=(const Time &lhs, const Time &rhs) { return !(lhs > rhs); } +bool operator>=(const Time &lhs, const Time &rhs) { return !(lhs < rhs); } +bool operator==(const Time &lhs, const Time &rhs) { return lhs.seconds == rhs.seconds; } +bool operator!=(const Time &lhs, const Time &rhs) { return !(lhs == rhs); } + +Depart::Depart(Time ti_in, Lndir dir_in) : ti(ti_in), dir(dir_in) {} + +Depart::Depart(const Depart &dep) : Depart(dep.ti, dep.dir) {} + +Depart &Depart::operator=(const Depart &d) +{ + this->ti = d.ti; + this->dir = d.dir; + return *this; +} + +PlanConn::PlanConn(Driver drv_in, vector<Depart> d) : vector<Depart>(d), drv(drv_in) {} +PlanConn::PlanConn(const PlanConn &orig) : PlanConn(orig.drv, orig) {} +PlanConn &PlanConn::operator=(const PlanConn &orig) +{ + if (&orig != this) // if not identical + { + this->drv = orig.drv; + this->clear(); + for (auto it = orig.begin(); it != orig.end(); it++) + this->push_back(*it); + } + return *this; +} + +Driver::Driver(string name_in) : name(name_in) {} + +Driver::Driver(const Driver &drv) : name(drv.name) {} + +Driver &Driver::operator=(const Driver &drv) +{ + this->name = drv.name; + return *this; +} + +bool Driver::operator==(const Driver &drv) const +{ + return !name.compare(drv.name); +} + +bool Driver::operator!=(const Driver &drv) const +{ + return name.compare(drv.name); +} + +void DriverList::loadFromFile(string filename) +{ + string tmpstr; + int drivercount; + ifstream infile(filename); + if (infile.is_open()) + { + for (drivercount = 0; getline(infile, tmpstr); drivercount++) + this->push_back(Driver(tmpstr)); + cout << "Loaded " << drivercount << " names from " << filename << ".\n"; + infile.close(); + } + else + { + cout << "Could not open " << filename << ". Driver List not loaded." << endl; + } +} + +Line::Line(const Line &orig) : stops(orig.stops), conns_fwd(orig.conns_fwd), conns_bwd(orig.conns_bwd) {} + +Line &Line::operator=(const Line &orig) +{ + this->stops = orig.stops; + this->conns_fwd = orig.conns_fwd; + this->conns_bwd = orig.conns_bwd; + return *this; +} + +Line Network::getLine(int ln) const +{ + if (ln < 0 || (unsigned)ln >= this->lines.size()) + throw out_of_range("Line number out of range."); + else + return lines[ln]; +} + +int Network::nlines() const +{ + return this->lines.size(); +} + +void Network::loadFromFile(string filename) +{ + + Line tmpL; + Depart tmpD; + PlanConn tmpC; + Lndir tmpdir; + + string tmpstr; + + ifstream infile(filename); + if (infile.is_open()) + { + while (getline(infile, tmpstr)) + { + if (tmpstr.rfind("{", 0) == 0) //if dbegin with "{", create new line + { + tmpC.clear(); + istringstream ss(tmpstr); + char ch; + int sec; + + string token; + ss >> ch; + if (ch != '{' || !ss.good()) + { + infile.close(); + throw file_corrupt(); + } + ss >> ch; + if (ch == 'f' && ss.good()) + tmpdir = Lndir::fwd; + else if (ch == 'b' && ss.good()) + tmpdir = Lndir::bwd; + else + throw file_corrupt(); + ss >> ch; + if (ch != ';' || !ss.good()) + { + infile.close(); + throw file_corrupt(); + } + + if (!getline(ss, token, ';')) + { + infile.close(); + throw file_corrupt(); + } + tmpC.drv = Driver(token); + + ch = ';'; + while (ch == ';') + { + ss >> sec; + ss >> ch; + if (!ss.good()) + throw file_corrupt(); + tmpC.push_back(Depart(Time(sec), tmpdir)); + } + if (ch == '}') + if (tmpdir == Lndir::fwd) + tmpL.conns_fwd.push_back(tmpC); + else + tmpL.conns_bwd.push_back(tmpC); + else + { + infile.close(); + throw file_corrupt(); + } + } + else if (tmpstr.rfind("#####", 0) == 0) //if begins with "#####", push_back line + { + this->lines.push_back(tmpL); + } + else // we have to start a new line! + { + tmpL.stops.clear(); + tmpL.conns_fwd.clear(); + tmpL.conns_bwd.clear(); + istringstream ss(tmpstr); + string token; + while (getline(ss, token, ';')) + { + // cout<< token<< endl; + tmpL.stops.push_back(token); + } + } + } + + infile.close(); + std::cout << "Loaded network from " << filename << ".\n"; + } + else + { + std::cout << "Could not open " << filename << ". Network not loaded." << endl; + } +} + diff --git a/02/doprava.hpp b/02/doprava.hpp new file mode 100644 index 0000000000000000000000000000000000000000..372b8c8fffc8987902ce04a16972fc911020449c --- /dev/null +++ b/02/doprava.hpp @@ -0,0 +1,129 @@ +#ifndef DOPRAVA_H +#define DOPRAVA_H + +#include <vector> +#include <list> +#include <string> +#include <algorithm> +#include <iostream> +#include <fstream> +#include <sstream> + +using namespace std; + +// exception for read file - do not modify +struct file_corrupt : public std::exception +{ + const char *what() const throw() { return "file_corrupt"; } +}; + +// Direction of connection/departure +enum class Lndir +{ + fwd, + bwd +}; + + + +class Time +{ + int seconds; // seconds after midnight +public: + Time(int ss = 0); // initialize by seconds after midnight: seconds(ss){}; + Time(int hh, int mm, int ss = 0); // initialize by hours, minutes seconds + Time(const Time &tt); // copy-constructor + int gets() const; // get seconds after midnight // {return ss;} + void gett(int &hh, int &mm, int &ss) const; // get hours, minutes seconds + Time &operator=(const Time &tt); + friend Time operator+(const Time &lhs, const Time &rhs); + friend Time operator-(const Time &lhs, const Time &rhs); + friend bool operator<(const Time &lhs, const Time &rhs); + friend bool operator>(const Time &lhs, const Time &rhs); + friend bool operator<=(const Time &lhs, const Time &rhs); + friend bool operator>=(const Time &lhs, const Time &rhs); + friend bool operator==(const Time &lhs, const Time &rhs); + friend bool operator!=(const Time &lhs, const Time &rhs); +}; + +Time operator+(const Time &lhs, const Time &rhs); +Time operator-(const Time &lhs, const Time &rhs); +bool operator<(const Time &lhs, const Time &rhs); +bool operator>(const Time &lhs, const Time &rhs); +bool operator<=(const Time &lhs, const Time &rhs); +bool operator>=(const Time &lhs, const Time &rhs); +bool operator==(const Time &lhs, const Time &rhs); +bool operator!=(const Time &lhs, const Time &rhs); + +// Generic Departure +struct Depart +{ + Time ti; // time of departure + Lndir dir; // direction of departure + + // Constructors + Depart(Time = Time(0), Lndir dir_in = Lndir::fwd); + Depart(const Depart &dep); + // Assign + Depart &operator=(const Depart &d); +}; + +// Driver structure +struct Driver +{ + string name; + // Constructors + Driver(string name_in = ""); + Driver(const Driver &drv); + // Assign + Driver &operator=(const Driver &drv); + bool operator==(const Driver &drv) const; + bool operator!=(const Driver &drv) const; +}; + +// list of drivers - std::list with ability to read from file. +struct DriverList : list<Driver> +{ + void loadFromFile(string filename); +}; + +// Timetable for one connection +struct PlanConn : public vector<Depart> +{ + Driver drv; // driver of the connection + + // Constructors + PlanConn(Driver drv = Driver(), vector<Depart> d = vector<Depart>()); + PlanConn(const PlanConn &orig); + + //Assign + PlanConn &operator=(const PlanConn &drv); +}; + +// Structure of a single line +struct Line +{ + vector<string> stops; // stops on the line in forward order + vector<PlanConn> conns_fwd; // all connections of the line going forward + vector<PlanConn> conns_bwd; // all connections of the line going backward + + Line() : stops({}), conns_fwd({}), conns_bwd({}){}; // Implicit constructor + Line(const Line &orig); // Copy constructor + Line & operator=(const Line &orig); // Copy-assignment + // no destructor => implicit; +}; + +// structure of networks (Collection of lines) +class Network +{ +protected: + vector<Line> lines; +public: + Line getLine(int ln) const; // returns line with number ln + int nlines() const; // maximal number of lines + Line operator()(int ln) const { return getLine(ln); } // Alias For getLine + void loadFromFile(string filename); +}; + + +#endif \ No newline at end of file diff --git a/02/driver_list.txt b/02/driver_list.txt new file mode 100644 index 0000000000000000000000000000000000000000..3c6463010a68f2ea57876d5de5449a8a42136ab9 --- /dev/null +++ b/02/driver_list.txt @@ -0,0 +1,45 @@ +Alain Prost +Alan Jones +Alberto Ascari +Ari Vatanen +Ayrton Senna +Bruce McLaren +Carlos Sainz +Damon Hill +Denny Hulme +Eddie Irvine +Emerson Fittipaldi +Fernando Alonso +Giuseppe Farina +Graham Hill +Henri Toivonen +Jack Brabham +Jackie Stewart +Jacques Villeneuve +James Hunt +Jean Alesi +Jenson Button +Jim Clark +Jochen Rindt +Jody Scheckter +John Surtees +Juan M. Fangio +Keke Rosberg +Kimi Raikkonen +Lewis Hamilton +Mario Andretti +Michael Schumacher +Michele Mouton +Mika Hakkinen +Mike Hawthorn +Miki Biasion +Nelson Piquet +Nico Rosberg +Nigel Mansell +Niki Lauda +Petter Solberg +Phil Hill +Richard Burns +Sebastian Vettel +Stig Blomqvist +Timo Salonen diff --git a/02/main.cpp b/02/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..957d29178de4b4412f09ed99c48c480659540890 --- /dev/null +++ b/02/main.cpp @@ -0,0 +1,85 @@ +#include <iostream> +#include <vector> +#include "doprava.hpp" + +//Feel free to create your solution in multiple files +// and add the includes here. e.g.: +//#include "solution.hpp" + +using namespace std; + +int main(int argc, char** argv) { + + // Load files: + DriverList dl; + dl.loadFromFile("driver_list.txt"); + + Network net; + net.loadFromFile("network.txt"); + + // variables for argument decoding + string flag_in; + list<string> stop_in; + + if (argc > 1) + flag_in = string(argv[1]); + else + { + cerr << "Missing argument. Terminating." << endl; + return 1; + } + + if ((!flag_in.compare("--schedule"))) + { + // input check - do not edit + if (argc > 2) + { + for (int i = 2; i < argc; i++) + { + string temp = argv[i]; + replace(temp.begin(), temp.end(), '_', ' '); + stop_in.push_back(temp); + } + } + else + { + cerr << "Missing stop name. Terminating." << endl; + return 2; + } + // end of input check + + /* here should start the code for printing timetables*/ + /* stop_in contains names of stops, for which the timetable is to be printed. */ + + // This is an example, how it can be done using lambda-function + for_each(stop_in.begin(), stop_in.end(), [&] (string stop_name) {print_timetable(net,stop_name);} ); + // This is an example, how it can be done using for-loop + // for( auto iter = stop_in.begin(); iter != stop_in.end(); iter++) print_timetable(net,*iter); + + /* here should end the code for printing timetables*/ + } + else if ((!flag_in.compare("--line-routing"))) + { + + /* here should start the code for printing line routes without stats*/ + + + + /* here should end the code for printing line routes without stats*/ + } + else if ((!flag_in.compare("--driver-stops"))) + { + + /* here should start the code for stops statistics for drivers */ + + + + /* here should end the code for stops statistics for drivers */ + } + else + { + cout << "Flag not recognized, terminating." << endl; + } + + return 0; +} \ No newline at end of file diff --git a/02/makefile b/02/makefile new file mode 100644 index 0000000000000000000000000000000000000000..cba02c6c3c4be2324e98719e964e5c51641c0619 --- /dev/null +++ b/02/makefile @@ -0,0 +1,22 @@ +CXX = clang++ +CXXFLAGS= -g -std=c++17 -Wall -Wpedantic +SOURCES = $(wildcard *.cpp) + +main: $(SOURCES) + $(CXX) $^ -o $@ $(CXXFLAGS) + +out1.txt: main network.txt driver_list.txt + ./main --schedule "Petrackovo namesti" "Vitkov" "U Bufetu" > out1.txt + +out2.txt: main network.txt driver_list.txt + ./main --line-routing > out2.txt + +out3.txt: main network.txt driver_list.txt + ./main --driver-stops > out3.txt + +all: main + +run: out1.txt out2.txt out3.txt + +clean: + rm -f main out1.txt out2.txt out3.txt diff --git a/02/network.txt b/02/network.txt new file mode 100644 index 0000000000000000000000000000000000000000..49a703c22a1e0a4553c90ff3f76107fd415fdb4b --- /dev/null +++ b/02/network.txt @@ -0,0 +1,374 @@ +U Petnika;Pred Menzou;Matematiku;Fyziku;Radioelektronicka;Elektromagnetickeho pole;Mikroelektronicka;Studentska;Paterova;Nosterova;U Zavrene skoly;U Bufetu;Knihovnicka;Dekanat;Rektorat;Studijni odd. +{f;Jim Clark;14400;14580;14700;14820;14940;15040;15160;15240;15330;15410;15480;15600;15760;15890;16000;16120} +{f;James Hunt;16200;16380;16500;16620;16740;16840;16960;17040;17130;17210;17280;17400;17560;17690;17800;17920} +{f;Graham Hill;18000;18180;18300;18420;18540;18640;18760;18840;18930;19010;19080;19200;19360;19490;19600;19720} +{f;Jack Brabham;19800;19980;20100;20220;20340;20440;20560;20640;20730;20810;20880;21000;21160;21290;21400;21520} +{f;Nelson Piquet;21600;21780;21900;22020;22140;22240;22360;22440;22530;22610;22680;22800;22960;23090;23200;23320} +{f;Keke Rosberg;22500;22680;22800;22920;23040;23140;23260;23340;23430;23510;23580;23700;23860;23990;24100;24220} +{f;Ayrton Senna;23400;23580;23700;23820;23940;24040;24160;24240;24330;24410;24480;24600;24760;24890;25000;25120} +{f;John Surtees;24300;24480;24600;24720;24840;24940;25060;25140;25230;25310;25380;25500;25660;25790;25900;26020} +{f;Jim Clark;25200;25380;25500;25620;25740;25840;25960;26040;26130;26210;26280;26400;26560;26690;26800;26920} +{f;Niki Lauda;26100;26280;26400;26520;26640;26740;26860;26940;27030;27110;27180;27300;27460;27590;27700;27820} +{f;Jackie Stewart;27000;27180;27300;27420;27540;27640;27760;27840;27930;28010;28080;28200;28360;28490;28600;28720} +{f;Emerson Fittipaldi;27900;28080;28200;28320;28440;28540;28660;28740;28830;28910;28980;29100;29260;29390;29500;29620} +{f;Graham Hill;28800;28980;29100;29220;29340;29440;29560;29640;29730;29810;29880;30000;30160;30290;30400;30520} +{f;James Hunt;29700;29880;30000;30120;30240;30340;30460;30540;30630;30710;30780;30900;31060;31190;31300;31420} +{f;Nelson Piquet;30600;30780;30900;31020;31140;31240;31360;31440;31530;31610;31680;31800;31960;32090;32200;32320} +{f;Jochen Rindt;31500;31680;31800;31920;32040;32140;32260;32340;32430;32510;32580;32700;32860;32990;33100;33220} +{f;Keke Rosberg;32400;32580;32700;32820;32940;33040;33160;33240;33330;33410;33480;33600;33760;33890;34000;34120} +{f;Jack Brabham;33300;33480;33600;33720;33840;33940;34060;34140;34230;34310;34380;34500;34660;34790;34900;35020} +{f;Ayrton Senna;34200;34380;34500;34620;34740;34840;34960;35040;35130;35210;35280;35400;35560;35690;35800;35920} +{f;John Surtees;35100;35280;35400;35520;35640;35740;35860;35940;36030;36110;36180;36300;36460;36590;36700;36820} +{f;Jackie Stewart;36000;36180;36300;36420;36540;36640;36760;36840;36930;37010;37080;37200;37360;37490;37600;37720} +{f;Nelson Piquet;37800;37980;38100;38220;38340;38440;38560;38640;38730;38810;38880;39000;39160;39290;39400;39520} +{f;Jim Clark;39600;39780;39900;40020;40140;40240;40360;40440;40530;40610;40680;40800;40960;41090;41200;41320} +{f;Niki Lauda;41400;41580;41700;41820;41940;42040;42160;42240;42330;42410;42480;42600;42760;42890;43000;43120} +{f;Jochen Rindt;43200;43380;43500;43620;43740;43840;43960;44040;44130;44210;44280;44400;44560;44690;44800;44920} +{f;Emerson Fittipaldi;45000;45180;45300;45420;45540;45640;45760;45840;45930;46010;46080;46200;46360;46490;46600;46720} +{f;Graham Hill;46800;46980;47100;47220;47340;47440;47560;47640;47730;47810;47880;48000;48160;48290;48400;48520} +{f;Ayrton Senna;48600;48780;48900;49020;49140;49240;49360;49440;49530;49610;49680;49800;49960;50090;50200;50320} +{f;Keke Rosberg;50400;50580;50700;50820;50940;51040;51160;51240;51330;51410;51480;51600;51760;51890;52000;52120} +{f;Jack Brabham;52200;52380;52500;52620;52740;52840;52960;53040;53130;53210;53280;53400;53560;53690;53800;53920} +{f;James Hunt;54000;54180;54300;54420;54540;54640;54760;54840;54930;55010;55080;55200;55360;55490;55600;55720} +{f;Jackie Stewart;54900;55080;55200;55320;55440;55540;55660;55740;55830;55910;55980;56100;56260;56390;56500;56620} +{f;Niki Lauda;55800;55980;56100;56220;56340;56440;56560;56640;56730;56810;56880;57000;57160;57290;57400;57520} +{f;John Surtees;56700;56880;57000;57120;57240;57340;57460;57540;57630;57710;57780;57900;58060;58190;58300;58420} +{f;Nelson Piquet;57600;57780;57900;58020;58140;58240;58360;58440;58530;58610;58680;58800;58960;59090;59200;59320} +{f;Emerson Fittipaldi;58500;58680;58800;58920;59040;59140;59260;59340;59430;59510;59580;59700;59860;59990;60100;60220} +{f;Jochen Rindt;59400;59580;59700;59820;59940;60040;60160;60240;60330;60410;60480;60600;60760;60890;61000;61120} +{f;Jim Clark;60300;60480;60600;60720;60840;60940;61060;61140;61230;61310;61380;61500;61660;61790;61900;62020} +{f;Keke Rosberg;61200;61380;61500;61620;61740;61840;61960;62040;62130;62210;62280;62400;62560;62690;62800;62920} +{f;Graham Hill;62100;62280;62400;62520;62640;62740;62860;62940;63030;63110;63180;63300;63460;63590;63700;63820} +{f;Ayrton Senna;63000;63180;63300;63420;63540;63640;63760;63840;63930;64010;64080;64200;64360;64490;64600;64720} +{f;Jack Brabham;63900;64080;64200;64320;64440;64540;64660;64740;64830;64910;64980;65100;65260;65390;65500;65620} +{f;Jackie Stewart;64800;64980;65100;65220;65340;65440;65560;65640;65730;65810;65880;66000;66160;66290;66400;66520} +{f;Niki Lauda;65700;65880;66000;66120;66240;66340;66460;66540;66630;66710;66780;66900;67060;67190;67300;67420} +{f;Emerson Fittipaldi;66600;66780;66900;67020;67140;67240;67360;67440;67530;67610;67680;67800;67960;68090;68200;68320} +{f;John Surtees;67500;67680;67800;67920;68040;68140;68260;68340;68430;68510;68580;68700;68860;68990;69100;69220} +{f;Nelson Piquet;68400;68580;68700;68820;68940;69040;69160;69240;69330;69410;69480;69600;69760;69890;70000;70120} +{f;James Hunt;70200;70380;70500;70620;70740;70840;70960;71040;71130;71210;71280;71400;71560;71690;71800;71920} +{f;Jochen Rindt;72000;72180;72300;72420;72540;72640;72760;72840;72930;73010;73080;73200;73360;73490;73600;73720} +{f;Graham Hill;73800;73980;74100;74220;74340;74440;74560;74640;74730;74810;74880;75000;75160;75290;75400;75520} +{f;Keke Rosberg;75600;75780;75900;76020;76140;76240;76360;76440;76530;76610;76680;76800;76960;77090;77200;77320} +{f;Ayrton Senna;77400;77580;77700;77820;77940;78040;78160;78240;78330;78410;78480;78600;78760;78890;79000;79120} +{f;Niki Lauda;79200;79380;79500;79620;79740;79840;79960;80040;80130;80210;80280;80400;80560;80690;80800;80920} +{f;Jim Clark;81000;81180;81300;81420;81540;81640;81760;81840;81930;82010;82080;82200;82360;82490;82600;82720} +{f;Jackie Stewart;82800;82980;83100;83220;83340;83440;83560;83640;83730;83810;83880;84000;84160;84290;84400;84520} +{b;Nelson Piquet;16420;16240;16120;16000;15880;15780;15660;15580;15490;15410;15340;15220;15060;14930;14820;14700} +{b;Ayrton Senna;18220;18040;17920;17800;17680;17580;17460;17380;17290;17210;17140;17020;16860;16730;16620;16500} +{b;Niki Lauda;20020;19840;19720;19600;19480;19380;19260;19180;19090;19010;18940;18820;18660;18530;18420;18300} +{b;Jim Clark;21820;21640;21520;21400;21280;21180;21060;20980;20890;20810;20740;20620;20460;20330;20220;20100} +{b;Emerson Fittipaldi;23620;23440;23320;23200;23080;22980;22860;22780;22690;22610;22540;22420;22260;22130;22020;21900} +{b;Jackie Stewart;24520;24340;24220;24100;23980;23880;23760;23680;23590;23510;23440;23320;23160;23030;22920;22800} +{b;Jochen Rindt;25420;25240;25120;25000;24880;24780;24660;24580;24490;24410;24340;24220;24060;23930;23820;23700} +{b;James Hunt;26320;26140;26020;25900;25780;25680;25560;25480;25390;25310;25240;25120;24960;24830;24720;24600} +{b;Graham Hill;27220;27040;26920;26800;26680;26580;26460;26380;26290;26210;26140;26020;25860;25730;25620;25500} +{b;Nelson Piquet;28120;27940;27820;27700;27580;27480;27360;27280;27190;27110;27040;26920;26760;26630;26520;26400} +{b;Keke Rosberg;29020;28840;28720;28600;28480;28380;28260;28180;28090;28010;27940;27820;27660;27530;27420;27300} +{b;Jack Brabham;29920;29740;29620;29500;29380;29280;29160;29080;28990;28910;28840;28720;28560;28430;28320;28200} +{b;Ayrton Senna;30820;30640;30520;30400;30280;30180;30060;29980;29890;29810;29740;29620;29460;29330;29220;29100} +{b;Jim Clark;31720;31540;31420;31300;31180;31080;30960;30880;30790;30710;30640;30520;30360;30230;30120;30000} +{b;John Surtees;32620;32440;32320;32200;32080;31980;31860;31780;31690;31610;31540;31420;31260;31130;31020;30900} +{b;Niki Lauda;33520;33340;33220;33100;32980;32880;32760;32680;32590;32510;32440;32320;32160;32030;31920;31800} +{b;Jackie Stewart;34420;34240;34120;34000;33880;33780;33660;33580;33490;33410;33340;33220;33060;32930;32820;32700} +{b;Nelson Piquet;35320;35140;35020;34900;34780;34680;34560;34480;34390;34310;34240;34120;33960;33830;33720;33600} +{b;Emerson Fittipaldi;36220;36040;35920;35800;35680;35580;35460;35380;35290;35210;35140;35020;34860;34730;34620;34500} +{b;Graham Hill;37120;36940;36820;36700;36580;36480;36360;36280;36190;36110;36040;35920;35760;35630;35520;35400} +{b;Jochen Rindt;38020;37840;37720;37600;37480;37380;37260;37180;37090;37010;36940;36820;36660;36530;36420;36300} +{b;Keke Rosberg;39820;39640;39520;39400;39280;39180;39060;38980;38890;38810;38740;38620;38460;38330;38220;38100} +{b;James Hunt;41620;41440;41320;41200;41080;40980;40860;40780;40690;40610;40540;40420;40260;40130;40020;39900} +{b;Ayrton Senna;43420;43240;43120;43000;42880;42780;42660;42580;42490;42410;42340;42220;42060;41930;41820;41700} +{b;Jack Brabham;45220;45040;44920;44800;44680;44580;44460;44380;44290;44210;44140;44020;43860;43730;43620;43500} +{b;Jackie Stewart;47020;46840;46720;46600;46480;46380;46260;46180;46090;46010;45940;45820;45660;45530;45420;45300} +{b;Niki Lauda;48820;48640;48520;48400;48280;48180;48060;47980;47890;47810;47740;47620;47460;47330;47220;47100} +{b;John Surtees;50620;50440;50320;50200;50080;49980;49860;49780;49690;49610;49540;49420;49260;49130;49020;48900} +{b;Emerson Fittipaldi;52420;52240;52120;52000;51880;51780;51660;51580;51490;51410;51340;51220;51060;50930;50820;50700} +{b;Nelson Piquet;54220;54040;53920;53800;53680;53580;53460;53380;53290;53210;53140;53020;52860;52730;52620;52500} +{b;Jim Clark;56020;55840;55720;55600;55480;55380;55260;55180;55090;55010;54940;54820;54660;54530;54420;54300} +{b;Jochen Rindt;56920;56740;56620;56500;56380;56280;56160;56080;55990;55910;55840;55720;55560;55430;55320;55200} +{b;Graham Hill;57820;57640;57520;57400;57280;57180;57060;56980;56890;56810;56740;56620;56460;56330;56220;56100} +{b;Ayrton Senna;58720;58540;58420;58300;58180;58080;57960;57880;57790;57710;57640;57520;57360;57230;57120;57000} +{b;Keke Rosberg;59620;59440;59320;59200;59080;58980;58860;58780;58690;58610;58540;58420;58260;58130;58020;57900} +{b;Jack Brabham;60520;60340;60220;60100;59980;59880;59760;59680;59590;59510;59440;59320;59160;59030;58920;58800} +{b;Jackie Stewart;61420;61240;61120;61000;60880;60780;60660;60580;60490;60410;60340;60220;60060;59930;59820;59700} +{b;Niki Lauda;62320;62140;62020;61900;61780;61680;61560;61480;61390;61310;61240;61120;60960;60830;60720;60600} +{b;James Hunt;63220;63040;62920;62800;62680;62580;62460;62380;62290;62210;62140;62020;61860;61730;61620;61500} +{b;Emerson Fittipaldi;64120;63940;63820;63700;63580;63480;63360;63280;63190;63110;63040;62920;62760;62630;62520;62400} +{b;John Surtees;65020;64840;64720;64600;64480;64380;64260;64180;64090;64010;63940;63820;63660;63530;63420;63300} +{b;Nelson Piquet;65920;65740;65620;65500;65380;65280;65160;65080;64990;64910;64840;64720;64560;64430;64320;64200} +{b;Jochen Rindt;66820;66640;66520;66400;66280;66180;66060;65980;65890;65810;65740;65620;65460;65330;65220;65100} +{b;Keke Rosberg;67720;67540;67420;67300;67180;67080;66960;66880;66790;66710;66640;66520;66360;66230;66120;66000} +{b;Graham Hill;68620;68440;68320;68200;68080;67980;67860;67780;67690;67610;67540;67420;67260;67130;67020;66900} +{b;Ayrton Senna;69520;69340;69220;69100;68980;68880;68760;68680;68590;68510;68440;68320;68160;68030;67920;67800} +{b;Jim Clark;70420;70240;70120;70000;69880;69780;69660;69580;69490;69410;69340;69220;69060;68930;68820;68700} +{b;Jackie Stewart;72220;72040;71920;71800;71680;71580;71460;71380;71290;71210;71140;71020;70860;70730;70620;70500} +{b;Niki Lauda;74020;73840;73720;73600;73480;73380;73260;73180;73090;73010;72940;72820;72660;72530;72420;72300} +{b;Jack Brabham;75820;75640;75520;75400;75280;75180;75060;74980;74890;74810;74740;74620;74460;74330;74220;74100} +{b;Emerson Fittipaldi;77620;77440;77320;77200;77080;76980;76860;76780;76690;76610;76540;76420;76260;76130;76020;75900} +{b;John Surtees;79420;79240;79120;79000;78880;78780;78660;78580;78490;78410;78340;78220;78060;77930;77820;77700} +{b;James Hunt;81220;81040;80920;80800;80680;80580;80460;80380;80290;80210;80140;80020;79860;79730;79620;79500} +{b;Nelson Piquet;83020;82840;82720;82600;82480;82380;82260;82180;82090;82010;81940;81820;81660;81530;81420;81300} +{b;Graham Hill;84820;84640;84520;84400;84280;84180;84060;83980;83890;83810;83740;83620;83460;83330;83220;83100} +##### +Italska;Desinfekcni;Lihovar;Za Filtrem;Testovaci;Respiratoru;Petrackovo namesti;Ochrannych stitu;U Zavrene skoly;Prymulova;Remdesivirova;Svepomoci;Infekcni;Na Ventilaci;V Karantene;Spanelska +{f;Kimi Raikkonen;14220;14400;14580;14760;14940;15060;15180;15300;15420;15540;15660;15790;15920;16050;16180;16310} +{f;Jacques Villeneuve;15720;15900;16080;16260;16440;16560;16680;16800;16920;17040;17160;17290;17420;17550;17680;17810} +{f;Jenson Button;17220;17400;17580;17760;17940;18060;18180;18300;18420;18540;18660;18790;18920;19050;19180;19310} +{f;Nico Rosberg;18720;18900;19080;19260;19440;19560;19680;19800;19920;20040;20160;20290;20420;20550;20680;20810} +{f;Damon Hill;20220;20400;20580;20760;20940;21060;21180;21300;21420;21540;21660;21790;21920;22050;22180;22310} +{f;Nigel Mansell;21720;21900;22080;22260;22440;22560;22680;22800;22920;23040;23160;23290;23420;23550;23680;23810} +{f;Sebastian Vettel;22920;23100;23280;23460;23640;23760;23880;24000;24120;24240;24360;24490;24620;24750;24880;25010} +{f;Mika Hakkinen;24120;24300;24480;24660;24840;24960;25080;25200;25320;25440;25560;25690;25820;25950;26080;26210} +{f;Michael Schumacher;25320;25500;25680;25860;26040;26160;26280;26400;26520;26640;26760;26890;27020;27150;27280;27410} +{f;Alain Prost;26520;26700;26880;27060;27240;27360;27480;27600;27720;27840;27960;28090;28220;28350;28480;28610} +{f;Fernando Alonso;27720;27900;28080;28260;28440;28560;28680;28800;28920;29040;29160;29290;29420;29550;29680;29810} +{f;Lewis Hamilton;28920;29100;29280;29460;29640;29760;29880;30000;30120;30240;30360;30490;30620;30750;30880;31010} +{f;Jacques Villeneuve;30120;30300;30480;30660;30840;30960;31080;31200;31320;31440;31560;31690;31820;31950;32080;32210} +{f;Kimi Raikkonen;31320;31500;31680;31860;32040;32160;32280;32400;32520;32640;32760;32890;33020;33150;33280;33410} +{f;Jenson Button;32520;32700;32880;33060;33240;33360;33480;33600;33720;33840;33960;34090;34220;34350;34480;34610} +{f;Damon Hill;33720;33900;34080;34260;34440;34560;34680;34800;34920;35040;35160;35290;35420;35550;35680;35810} +{f;Nigel Mansell;34920;35100;35280;35460;35640;35760;35880;36000;36120;36240;36360;36490;36620;36750;36880;37010} +{f;Nico Rosberg;36120;36300;36480;36660;36840;36960;37080;37200;37320;37440;37560;37690;37820;37950;38080;38210} +{f;Sebastian Vettel;37320;37500;37680;37860;38040;38160;38280;38400;38520;38640;38760;38890;39020;39150;39280;39410} +{f;Fernando Alonso;38520;38700;38880;39060;39240;39360;39480;39600;39720;39840;39960;40090;40220;40350;40480;40610} +{f;Alain Prost;40020;40200;40380;40560;40740;40860;40980;41100;41220;41340;41460;41590;41720;41850;41980;42110} +{f;Mika Hakkinen;41520;41700;41880;42060;42240;42360;42480;42600;42720;42840;42960;43090;43220;43350;43480;43610} +{f;Jacques Villeneuve;43020;43200;43380;43560;43740;43860;43980;44100;44220;44340;44460;44590;44720;44850;44980;45110} +{f;Michael Schumacher;44520;44700;44880;45060;45240;45360;45480;45600;45720;45840;45960;46090;46220;46350;46480;46610} +{f;Kimi Raikkonen;46020;46200;46380;46560;46740;46860;46980;47100;47220;47340;47460;47590;47720;47850;47980;48110} +{f;Lewis Hamilton;47520;47700;47880;48060;48240;48360;48480;48600;48720;48840;48960;49090;49220;49350;49480;49610} +{f;Nigel Mansell;49020;49200;49380;49560;49740;49860;49980;50100;50220;50340;50460;50590;50720;50850;50980;51110} +{f;Nico Rosberg;50520;50700;50880;51060;51240;51360;51480;51600;51720;51840;51960;52090;52220;52350;52480;52610} +{f;Fernando Alonso;52020;52200;52380;52560;52740;52860;52980;53100;53220;53340;53460;53590;53720;53850;53980;54110} +{f;Damon Hill;53520;53700;53880;54060;54240;54360;54480;54600;54720;54840;54960;55090;55220;55350;55480;55610} +{f;Sebastian Vettel;54720;54900;55080;55260;55440;55560;55680;55800;55920;56040;56160;56290;56420;56550;56680;56810} +{f;Jenson Button;55920;56100;56280;56460;56640;56760;56880;57000;57120;57240;57360;57490;57620;57750;57880;58010} +{f;Jacques Villeneuve;57120;57300;57480;57660;57840;57960;58080;58200;58320;58440;58560;58690;58820;58950;59080;59210} +{f;Alain Prost;58320;58500;58680;58860;59040;59160;59280;59400;59520;59640;59760;59890;60020;60150;60280;60410} +{f;Kimi Raikkonen;59520;59700;59880;60060;60240;60360;60480;60600;60720;60840;60960;61090;61220;61350;61480;61610} +{f;Michael Schumacher;60720;60900;61080;61260;61440;61560;61680;61800;61920;62040;62160;62290;62420;62550;62680;62810} +{f;Mika Hakkinen;61920;62100;62280;62460;62640;62760;62880;63000;63120;63240;63360;63490;63620;63750;63880;64010} +{f;Lewis Hamilton;63120;63300;63480;63660;63840;63960;64080;64200;64320;64440;64560;64690;64820;64950;65080;65210} +{f;Nico Rosberg;64320;64500;64680;64860;65040;65160;65280;65400;65520;65640;65760;65890;66020;66150;66280;66410} +{f;Nigel Mansell;65520;65700;65880;66060;66240;66360;66480;66600;66720;66840;66960;67090;67220;67350;67480;67610} +{f;Fernando Alonso;66720;66900;67080;67260;67440;67560;67680;67800;67920;68040;68160;68290;68420;68550;68680;68810} +{f;Sebastian Vettel;67920;68100;68280;68460;68640;68760;68880;69000;69120;69240;69360;69490;69620;69750;69880;70010} +{f;Jacques Villeneuve;69120;69300;69480;69660;69840;69960;70080;70200;70320;70440;70560;70690;70820;70950;71080;71210} +{f;Jenson Button;70320;70500;70680;70860;71040;71160;71280;71400;71520;71640;71760;71890;72020;72150;72280;72410} +{f;Damon Hill;72720;72900;73080;73260;73440;73560;73680;73800;73920;74040;74160;74290;74420;74550;74680;74810} +{f;Alain Prost;75120;75300;75480;75660;75840;75960;76080;76200;76320;76440;76560;76690;76820;76950;77080;77210} +{f;Michael Schumacher;77520;77700;77880;78060;78240;78360;78480;78600;78720;78840;78960;79090;79220;79350;79480;79610} +{f;Lewis Hamilton;79920;80100;80280;80460;80640;80760;80880;81000;81120;81240;81360;81490;81620;81750;81880;82010} +{b;Sebastian Vettel;16730;16550;16370;16190;16010;15890;15770;15650;15530;15410;15290;15160;15030;14900;14770;14640} +{b;Mika Hakkinen;18230;18050;17870;17690;17510;17390;17270;17150;17030;16910;16790;16660;16530;16400;16270;16140} +{b;Alain Prost;19730;19550;19370;19190;19010;18890;18770;18650;18530;18410;18290;18160;18030;17900;17770;17640} +{b;Michael Schumacher;21230;21050;20870;20690;20510;20390;20270;20150;20030;19910;19790;19660;19530;19400;19270;19140} +{b;Fernando Alonso;22730;22550;22370;22190;22010;21890;21770;21650;21530;21410;21290;21160;21030;20900;20770;20640} +{b;Lewis Hamilton;24230;24050;23870;23690;23510;23390;23270;23150;23030;22910;22790;22660;22530;22400;22270;22140} +{b;Kimi Raikkonen;25430;25250;25070;24890;24710;24590;24470;24350;24230;24110;23990;23860;23730;23600;23470;23340} +{b;Jacques Villeneuve;26630;26450;26270;26090;25910;25790;25670;25550;25430;25310;25190;25060;24930;24800;24670;24540} +{b;Jenson Button;27830;27650;27470;27290;27110;26990;26870;26750;26630;26510;26390;26260;26130;26000;25870;25740} +{b;Damon Hill;29030;28850;28670;28490;28310;28190;28070;27950;27830;27710;27590;27460;27330;27200;27070;26940} +{b;Nico Rosberg;30230;30050;29870;29690;29510;29390;29270;29150;29030;28910;28790;28660;28530;28400;28270;28140} +{b;Nigel Mansell;31430;31250;31070;30890;30710;30590;30470;30350;30230;30110;29990;29860;29730;29600;29470;29340} +{b;Sebastian Vettel;32630;32450;32270;32090;31910;31790;31670;31550;31430;31310;31190;31060;30930;30800;30670;30540} +{b;Mika Hakkinen;33830;33650;33470;33290;33110;32990;32870;32750;32630;32510;32390;32260;32130;32000;31870;31740} +{b;Alain Prost;35030;34850;34670;34490;34310;34190;34070;33950;33830;33710;33590;33460;33330;33200;33070;32940} +{b;Fernando Alonso;36230;36050;35870;35690;35510;35390;35270;35150;35030;34910;34790;34660;34530;34400;34270;34140} +{b;Jacques Villeneuve;37430;37250;37070;36890;36710;36590;36470;36350;36230;36110;35990;35860;35730;35600;35470;35340} +{b;Michael Schumacher;38630;38450;38270;38090;37910;37790;37670;37550;37430;37310;37190;37060;36930;36800;36670;36540} +{b;Kimi Raikkonen;39830;39650;39470;39290;39110;38990;38870;38750;38630;38510;38390;38260;38130;38000;37870;37740} +{b;Lewis Hamilton;41030;40850;40670;40490;40310;40190;40070;39950;39830;39710;39590;39460;39330;39200;39070;38940} +{b;Nigel Mansell;42530;42350;42170;41990;41810;41690;41570;41450;41330;41210;41090;40960;40830;40700;40570;40440} +{b;Nico Rosberg;44030;43850;43670;43490;43310;43190;43070;42950;42830;42710;42590;42460;42330;42200;42070;41940} +{b;Damon Hill;45530;45350;45170;44990;44810;44690;44570;44450;44330;44210;44090;43960;43830;43700;43570;43440} +{b;Fernando Alonso;47030;46850;46670;46490;46310;46190;46070;45950;45830;45710;45590;45460;45330;45200;45070;44940} +{b;Jenson Button;48530;48350;48170;47990;47810;47690;47570;47450;47330;47210;47090;46960;46830;46700;46570;46440} +{b;Sebastian Vettel;50030;49850;49670;49490;49310;49190;49070;48950;48830;48710;48590;48460;48330;48200;48070;47940} +{b;Alain Prost;51530;51350;51170;50990;50810;50690;50570;50450;50330;50210;50090;49960;49830;49700;49570;49440} +{b;Mika Hakkinen;53030;52850;52670;52490;52310;52190;52070;51950;51830;51710;51590;51460;51330;51200;51070;50940} +{b;Jacques Villeneuve;54530;54350;54170;53990;53810;53690;53570;53450;53330;53210;53090;52960;52830;52700;52570;52440} +{b;Kimi Raikkonen;56030;55850;55670;55490;55310;55190;55070;54950;54830;54710;54590;54460;54330;54200;54070;53940} +{b;Lewis Hamilton;57230;57050;56870;56690;56510;56390;56270;56150;56030;55910;55790;55660;55530;55400;55270;55140} +{b;Michael Schumacher;58430;58250;58070;57890;57710;57590;57470;57350;57230;57110;56990;56860;56730;56600;56470;56340} +{b;Nigel Mansell;59630;59450;59270;59090;58910;58790;58670;58550;58430;58310;58190;58060;57930;57800;57670;57540} +{b;Nico Rosberg;60830;60650;60470;60290;60110;59990;59870;59750;59630;59510;59390;59260;59130;59000;58870;58740} +{b;Fernando Alonso;62030;61850;61670;61490;61310;61190;61070;60950;60830;60710;60590;60460;60330;60200;60070;59940} +{b;Damon Hill;63230;63050;62870;62690;62510;62390;62270;62150;62030;61910;61790;61660;61530;61400;61270;61140} +{b;Sebastian Vettel;64430;64250;64070;63890;63710;63590;63470;63350;63230;63110;62990;62860;62730;62600;62470;62340} +{b;Jacques Villeneuve;65630;65450;65270;65090;64910;64790;64670;64550;64430;64310;64190;64060;63930;63800;63670;63540} +{b;Jenson Button;66830;66650;66470;66290;66110;65990;65870;65750;65630;65510;65390;65260;65130;65000;64870;64740} +{b;Alain Prost;68030;67850;67670;67490;67310;67190;67070;66950;66830;66710;66590;66460;66330;66200;66070;65940} +{b;Michael Schumacher;69230;69050;68870;68690;68510;68390;68270;68150;68030;67910;67790;67660;67530;67400;67270;67140} +{b;Mika Hakkinen;70430;70250;70070;69890;69710;69590;69470;69350;69230;69110;68990;68860;68730;68600;68470;68340} +{b;Lewis Hamilton;71630;71450;71270;71090;70910;70790;70670;70550;70430;70310;70190;70060;69930;69800;69670;69540} +{b;Kimi Raikkonen;72830;72650;72470;72290;72110;71990;71870;71750;71630;71510;71390;71260;71130;71000;70870;70740} +{b;Nico Rosberg;75230;75050;74870;74690;74510;74390;74270;74150;74030;73910;73790;73660;73530;73400;73270;73140} +{b;Fernando Alonso;77630;77450;77270;77090;76910;76790;76670;76550;76430;76310;76190;76060;75930;75800;75670;75540} +{b;Nigel Mansell;80030;79850;79670;79490;79310;79190;79070;78950;78830;78710;78590;78460;78330;78200;78070;77940} +{b;Sebastian Vettel;82430;82250;82070;81890;81710;81590;81470;81350;81230;81110;80990;80860;80730;80600;80470;80340} +##### +Vitkov;Dobesova alej;Navratilova;Nentvichova;Studentska;Patova trida;Petrackovo namesti;Pani Vyborne;Maternovy sady +{f;Alberto Ascari;17100;17235;17370;17505;17640;17775;17910;18045;18180} +{f;Juan M. Fangio;19500;19635;19770;19905;20040;20175;20310;20445;20580} +{f;Giuseppe Farina;21900;22035;22170;22305;22440;22575;22710;22845;22980} +{f;Jody Scheckter;23100;23235;23370;23505;23640;23775;23910;24045;24180} +{f;Alan Jones;24300;24435;24570;24705;24840;24975;25110;25245;25380} +{f;Mike Hawthorn;25500;25635;25770;25905;26040;26175;26310;26445;26580} +{f;Denny Hulme;26700;26835;26970;27105;27240;27375;27510;27645;27780} +{f;Alberto Ascari;27900;28035;28170;28305;28440;28575;28710;28845;28980} +{f;Mario Andretti;29100;29235;29370;29505;29640;29775;29910;30045;30180} +{f;Phil Hill;30300;30435;30570;30705;30840;30975;31110;31245;31380} +{f;Jody Scheckter;31500;31635;31770;31905;32040;32175;32310;32445;32580} +{f;Giuseppe Farina;32700;32835;32970;33105;33240;33375;33510;33645;33780} +{f;Alan Jones;33900;34035;34170;34305;34440;34575;34710;34845;34980} +{f;Denny Hulme;35100;35235;35370;35505;35640;35775;35910;36045;36180} +{f;Phil Hill;37500;37635;37770;37905;38040;38175;38310;38445;38580} +{f;Mike Hawthorn;39900;40035;40170;40305;40440;40575;40710;40845;40980} +{f;Alberto Ascari;42300;42435;42570;42705;42840;42975;43110;43245;43380} +{f;Juan M. Fangio;44700;44835;44970;45105;45240;45375;45510;45645;45780} +{f;Mario Andretti;47100;47235;47370;47505;47640;47775;47910;48045;48180} +{f;Giuseppe Farina;49500;49635;49770;49905;50040;50175;50310;50445;50580} +{f;Denny Hulme;51900;52035;52170;52305;52440;52575;52710;52845;52980} +{f;Alan Jones;54300;54435;54570;54705;54840;54975;55110;55245;55380} +{f;Phil Hill;56700;56835;56970;57105;57240;57375;57510;57645;57780} +{f;Alberto Ascari;57900;58035;58170;58305;58440;58575;58710;58845;58980} +{f;Mike Hawthorn;59100;59235;59370;59505;59640;59775;59910;60045;60180} +{f;Jody Scheckter;60300;60435;60570;60705;60840;60975;61110;61245;61380} +{f;Juan M. Fangio;61500;61635;61770;61905;62040;62175;62310;62445;62580} +{f;Mario Andretti;62700;62835;62970;63105;63240;63375;63510;63645;63780} +{f;Giuseppe Farina;63900;64035;64170;64305;64440;64575;64710;64845;64980} +{f;Alan Jones;65100;65235;65370;65505;65640;65775;65910;66045;66180} +{f;Alberto Ascari;66300;66435;66570;66705;66840;66975;67110;67245;67380} +{f;Phil Hill;67500;67635;67770;67905;68040;68175;68310;68445;68580} +{f;Mike Hawthorn;68700;68835;68970;69105;69240;69375;69510;69645;69780} +{f;Denny Hulme;69900;70035;70170;70305;70440;70575;70710;70845;70980} +{f;Juan M. Fangio;71100;71235;71370;71505;71640;71775;71910;72045;72180} +{f;Mario Andretti;72300;72435;72570;72705;72840;72975;73110;73245;73380} +{f;Jody Scheckter;73500;73635;73770;73905;74040;74175;74310;74445;74580} +{f;Giuseppe Farina;74700;74835;74970;75105;75240;75375;75510;75645;75780} +{f;Alberto Ascari;77100;77235;77370;77505;77640;77775;77910;78045;78180} +{f;Alan Jones;79500;79635;79770;79905;80040;80175;80310;80445;80580} +{f;Phil Hill;81900;82035;82170;82305;82440;82575;82710;82845;82980} +{b;Mike Hawthorn;19080;18945;18810;18675;18540;18405;18270;18135;18000} +{b;Denny Hulme;21480;21345;21210;21075;20940;20805;20670;20535;20400} +{b;Mario Andretti;23880;23745;23610;23475;23340;23205;23070;22935;22800} +{b;Alberto Ascari;25080;24945;24810;24675;24540;24405;24270;24135;24000} +{b;Giuseppe Farina;26280;26145;26010;25875;25740;25605;25470;25335;25200} +{b;Phil Hill;27480;27345;27210;27075;26940;26805;26670;26535;26400} +{b;Alan Jones;28680;28545;28410;28275;28140;28005;27870;27735;27600} +{b;Jody Scheckter;29880;29745;29610;29475;29340;29205;29070;28935;28800} +{b;Mike Hawthorn;31080;30945;30810;30675;30540;30405;30270;30135;30000} +{b;Denny Hulme;32280;32145;32010;31875;31740;31605;31470;31335;31200} +{b;Alberto Ascari;33480;33345;33210;33075;32940;32805;32670;32535;32400} +{b;Phil Hill;34680;34545;34410;34275;34140;34005;33870;33735;33600} +{b;Mario Andretti;35880;35745;35610;35475;35340;35205;35070;34935;34800} +{b;Juan M. Fangio;37080;36945;36810;36675;36540;36405;36270;36135;36000} +{b;Giuseppe Farina;39480;39345;39210;39075;38940;38805;38670;38535;38400} +{b;Jody Scheckter;41880;41745;41610;41475;41340;41205;41070;40935;40800} +{b;Denny Hulme;44280;44145;44010;43875;43740;43605;43470;43335;43200} +{b;Alan Jones;46680;46545;46410;46275;46140;46005;45870;45735;45600} +{b;Phil Hill;49080;48945;48810;48675;48540;48405;48270;48135;48000} +{b;Mike Hawthorn;51480;51345;51210;51075;50940;50805;50670;50535;50400} +{b;Alberto Ascari;53880;53745;53610;53475;53340;53205;53070;52935;52800} +{b;Juan M. Fangio;56280;56145;56010;55875;55740;55605;55470;55335;55200} +{b;Mario Andretti;58680;58545;58410;58275;58140;58005;57870;57735;57600} +{b;Giuseppe Farina;59880;59745;59610;59475;59340;59205;59070;58935;58800} +{b;Denny Hulme;61080;60945;60810;60675;60540;60405;60270;60135;60000} +{b;Alan Jones;62280;62145;62010;61875;61740;61605;61470;61335;61200} +{b;Phil Hill;63480;63345;63210;63075;62940;62805;62670;62535;62400} +{b;Alberto Ascari;64680;64545;64410;64275;64140;64005;63870;63735;63600} +{b;Mike Hawthorn;65880;65745;65610;65475;65340;65205;65070;64935;64800} +{b;Jody Scheckter;67080;66945;66810;66675;66540;66405;66270;66135;66000} +{b;Juan M. Fangio;68280;68145;68010;67875;67740;67605;67470;67335;67200} +{b;Giuseppe Farina;69480;69345;69210;69075;68940;68805;68670;68535;68400} +{b;Mario Andretti;70680;70545;70410;70275;70140;70005;69870;69735;69600} +{b;Alberto Ascari;71880;71745;71610;71475;71340;71205;71070;70935;70800} +{b;Alan Jones;73080;72945;72810;72675;72540;72405;72270;72135;72000} +{b;Phil Hill;74280;74145;74010;73875;73740;73605;73470;73335;73200} +{b;Mike Hawthorn;75480;75345;75210;75075;74940;74805;74670;74535;74400} +{b;Juan M. Fangio;76680;76545;76410;76275;76140;76005;75870;75735;75600} +{b;Denny Hulme;79080;78945;78810;78675;78540;78405;78270;78135;78000} +{b;Jody Scheckter;81480;81345;81210;81075;80940;80805;80670;80535;80400} +{b;Alberto Ascari;83880;83745;83610;83475;83340;83205;83070;82935;82800} +##### +Svepomoci;Dobrovolniku;Lekaru;Svadlen;Cesko-cinskeho pratelstvi;Bezrouskova;Papirenske zavody;Posledni role +{f;Henri Toivonen;21900;22035;22170;22305;22440;22575;22710;22845} +{f;Stig Blomqvist;23400;23535;23670;23805;23940;24075;24210;24345} +{f;Ari Vatanen;24900;25035;25170;25305;25440;25575;25710;25845} +{f;Richard Burns;26400;26535;26670;26805;26940;27075;27210;27345} +{f;Petter Solberg;27900;28035;28170;28305;28440;28575;28710;28845} +{f;Timo Salonen;29400;29535;29670;29805;29940;30075;30210;30345} +{f;Michele Mouton;30900;31035;31170;31305;31440;31575;31710;31845} +{f;Carlos Sainz;32400;32535;32670;32805;32940;33075;33210;33345} +{f;Miki Biasion;33900;34035;34170;34305;34440;34575;34710;34845} +{f;Henri Toivonen;35400;35535;35670;35805;35940;36075;36210;36345} +{f;Ari Vatanen;36900;37035;37170;37305;37440;37575;37710;37845} +{f;Stig Blomqvist;38400;38535;38670;38805;38940;39075;39210;39345} +{f;Richard Burns;39900;40035;40170;40305;40440;40575;40710;40845} +{f;Petter Solberg;41400;41535;41670;41805;41940;42075;42210;42345} +{f;Timo Salonen;42900;43035;43170;43305;43440;43575;43710;43845} +{f;Michele Mouton;44400;44535;44670;44805;44940;45075;45210;45345} +{f;Carlos Sainz;45900;46035;46170;46305;46440;46575;46710;46845} +{f;Ari Vatanen;47400;47535;47670;47805;47940;48075;48210;48345} +{f;Henri Toivonen;48900;49035;49170;49305;49440;49575;49710;49845} +{f;Miki Biasion;50400;50535;50670;50805;50940;51075;51210;51345} +{f;Stig Blomqvist;51900;52035;52170;52305;52440;52575;52710;52845} +{f;Richard Burns;53400;53535;53670;53805;53940;54075;54210;54345} +{f;Timo Salonen;54900;55035;55170;55305;55440;55575;55710;55845} +{f;Petter Solberg;56400;56535;56670;56805;56940;57075;57210;57345} +{f;Michele Mouton;57900;58035;58170;58305;58440;58575;58710;58845} +{f;Ari Vatanen;59400;59535;59670;59805;59940;60075;60210;60345} +{f;Carlos Sainz;60900;61035;61170;61305;61440;61575;61710;61845} +{f;Henri Toivonen;62400;62535;62670;62805;62940;63075;63210;63345} +{f;Miki Biasion;63900;64035;64170;64305;64440;64575;64710;64845} +{f;Stig Blomqvist;65400;65535;65670;65805;65940;66075;66210;66345} +{f;Richard Burns;66900;67035;67170;67305;67440;67575;67710;67845} +{f;Timo Salonen;68400;68535;68670;68805;68940;69075;69210;69345} +{f;Carlos Sainz;69900;70035;70170;70305;70440;70575;70710;70845} +{f;Michele Mouton;71400;71535;71670;71805;71940;72075;72210;72345} +{f;Petter Solberg;72900;73035;73170;73305;73440;73575;73710;73845} +{f;Henri Toivonen;74400;74535;74670;74805;74940;75075;75210;75345} +{f;Miki Biasion;75900;76035;76170;76305;76440;76575;76710;76845} +{f;Stig Blomqvist;77400;77535;77670;77805;77940;78075;78210;78345} +{f;Timo Salonen;78900;79035;79170;79305;79440;79575;79710;79845} +{b;Timo Salonen;23145;23010;22875;22740;22605;22470;22335;22200} +{b;Carlos Sainz;24645;24510;24375;24240;24105;23970;23835;23700} +{b;Miki Biasion;26145;26010;25875;25740;25605;25470;25335;25200} +{b;Michele Mouton;27645;27510;27375;27240;27105;26970;26835;26700} +{b;Henri Toivonen;29145;29010;28875;28740;28605;28470;28335;28200} +{b;Stig Blomqvist;30645;30510;30375;30240;30105;29970;29835;29700} +{b;Richard Burns;32145;32010;31875;31740;31605;31470;31335;31200} +{b;Ari Vatanen;33645;33510;33375;33240;33105;32970;32835;32700} +{b;Petter Solberg;35145;35010;34875;34740;34605;34470;34335;34200} +{b;Michele Mouton;36645;36510;36375;36240;36105;35970;35835;35700} +{b;Timo Salonen;38145;38010;37875;37740;37605;37470;37335;37200} +{b;Carlos Sainz;39645;39510;39375;39240;39105;38970;38835;38700} +{b;Ari Vatanen;41145;41010;40875;40740;40605;40470;40335;40200} +{b;Miki Biasion;42645;42510;42375;42240;42105;41970;41835;41700} +{b;Henri Toivonen;44145;44010;43875;43740;43605;43470;43335;43200} +{b;Stig Blomqvist;45645;45510;45375;45240;45105;44970;44835;44700} +{b;Timo Salonen;47145;47010;46875;46740;46605;46470;46335;46200} +{b;Richard Burns;48645;48510;48375;48240;48105;47970;47835;47700} +{b;Petter Solberg;50145;50010;49875;49740;49605;49470;49335;49200} +{b;Michele Mouton;51645;51510;51375;51240;51105;50970;50835;50700} +{b;Carlos Sainz;53145;53010;52875;52740;52605;52470;52335;52200} +{b;Ari Vatanen;54645;54510;54375;54240;54105;53970;53835;53700} +{b;Henri Toivonen;56145;56010;55875;55740;55605;55470;55335;55200} +{b;Miki Biasion;57645;57510;57375;57240;57105;56970;56835;56700} +{b;Stig Blomqvist;59145;59010;58875;58740;58605;58470;58335;58200} +{b;Richard Burns;60645;60510;60375;60240;60105;59970;59835;59700} +{b;Timo Salonen;62145;62010;61875;61740;61605;61470;61335;61200} +{b;Petter Solberg;63645;63510;63375;63240;63105;62970;62835;62700} +{b;Carlos Sainz;65145;65010;64875;64740;64605;64470;64335;64200} +{b;Michele Mouton;66645;66510;66375;66240;66105;65970;65835;65700} +{b;Miki Biasion;68145;68010;67875;67740;67605;67470;67335;67200} +{b;Henri Toivonen;69645;69510;69375;69240;69105;68970;68835;68700} +{b;Stig Blomqvist;71145;71010;70875;70740;70605;70470;70335;70200} +{b;Ari Vatanen;72645;72510;72375;72240;72105;71970;71835;71700} +{b;Richard Burns;74145;74010;73875;73740;73605;73470;73335;73200} +{b;Timo Salonen;75645;75510;75375;75240;75105;74970;74835;74700} +{b;Carlos Sainz;77145;77010;76875;76740;76605;76470;76335;76200} +{b;Henri Toivonen;78645;78510;78375;78240;78105;77970;77835;77700} +{b;Miki Biasion;80145;80010;79875;79740;79605;79470;79335;79200} +##### diff --git a/02/out1.txt b/02/out1.txt new file mode 100644 index 0000000000000000000000000000000000000000..c49f9ee618ff4e46f0f6efe2df375b9b9915d9c6 --- /dev/null +++ b/02/out1.txt @@ -0,0 +1,122 @@ +Loaded 45 names from driver_list.txt. +Loaded network from network.txt. ++------------------------------------------------------------------------------+ +| Petrackovo namesti Line: 1 | ++--------------------------------------++--------------------------------------+ +| To: Spanelska || To: Italska | ++----+---------------------------------++----+---------------------------------+ +| 00 | || 00 | | +| 01 | || 01 | | +| 02 | || 02 | | +| 03 | || 03 | | +| 04 | 13 38 || 04 | 22 47 | +| 05 | 03 28 53 || 05 | 12 37 | +| 06 | 18 38 58 || 06 | 02 27 47 | +| 07 | 18 38 58 || 07 | 07 27 47 | +| 08 | 18 38 58 || 08 | 07 27 47 | +| 09 | 18 38 58 || 09 | 07 27 47 | +| 10 | 18 38 58 || 10 | 07 27 47 | +| 11 | 23 48 || 11 | 07 32 57 | +| 12 | 13 38 || 12 | 22 47 | +| 13 | 03 28 53 || 13 | 12 37 | +| 14 | 18 43 || 14 | 02 27 52 | +| 15 | 08 28 48 || 15 | 17 37 57 | +| 16 | 08 28 48 || 16 | 17 37 57 | +| 17 | 08 28 48 || 17 | 17 37 57 | +| 18 | 08 28 48 || 18 | 17 37 57 | +| 19 | 08 28 48 || 19 | 17 37 57 | +| 20 | 28 || 20 | 37 | +| 21 | 08 48 || 21 | 17 57 | +| 22 | 28 || 22 | 37 | +| 23 | || 23 | | ++----+---------------------------------++----+---------------------------------+ ++------------------------------------------------------------------------------+ +| Petrackovo namesti Line: 2 | ++--------------------------------------++--------------------------------------+ +| To: Maternovy sady || To: Vitkov | ++----+---------------------------------++----+---------------------------------+ +| 00 | || 00 | | +| 01 | || 01 | | +| 02 | || 02 | | +| 03 | || 03 | | +| 04 | 58 || 04 | | +| 05 | 38 || 05 | 04 44 | +| 06 | 18 38 58 || 06 | 24 44 | +| 07 | 18 38 58 || 07 | 04 24 44 | +| 08 | 18 38 58 || 08 | 04 24 44 | +| 09 | 18 38 58 || 09 | 04 24 44 | +| 10 | 38 || 10 | 04 44 | +| 11 | 18 58 || 11 | 24 | +| 12 | 38 || 12 | 04 44 | +| 13 | 18 58 || 13 | 24 | +| 14 | 38 || 14 | 04 44 | +| 15 | 18 58 || 15 | 24 | +| 16 | 18 38 58 || 16 | 04 24 44 | +| 17 | 18 38 58 || 17 | 04 24 44 | +| 18 | 18 38 58 || 18 | 04 24 44 | +| 19 | 18 38 58 || 19 | 04 24 44 | +| 20 | 18 38 58 || 20 | 04 24 44 | +| 21 | 38 || 21 | 04 44 | +| 22 | 18 58 || 22 | 24 | +| 23 | || 23 | 04 | ++----+---------------------------------++----+---------------------------------+ ++------------------------------------------------------------------------------+ +| Vitkov Line: 2 | ++--------------------------------------++--------------------------------------+ +| To: Maternovy sady || To: Vitkov | ++----+---------------------------------++----+---------------------------------+ +| 00 | || 00 | | +| 01 | || 01 | | +| 02 | || 02 | | +| 03 | || 03 | | +| 04 | 45 || 04 | | +| 05 | 25 || 05 | 18 58 | +| 06 | 05 25 45 || 06 | 38 58 | +| 07 | 05 25 45 || 07 | 18 38 58 | +| 08 | 05 25 45 || 08 | 18 38 58 | +| 09 | 05 25 45 || 09 | 18 38 58 | +| 10 | 25 || 10 | 18 58 | +| 11 | 05 45 || 11 | 38 | +| 12 | 25 || 12 | 18 58 | +| 13 | 05 45 || 13 | 38 | +| 14 | 25 || 14 | 18 58 | +| 15 | 05 45 || 15 | 38 | +| 16 | 05 25 45 || 16 | 18 38 58 | +| 17 | 05 25 45 || 17 | 18 38 58 | +| 18 | 05 25 45 || 18 | 18 38 58 | +| 19 | 05 25 45 || 19 | 18 38 58 | +| 20 | 05 25 45 || 20 | 18 38 58 | +| 21 | 25 || 21 | 18 58 | +| 22 | 05 45 || 22 | 38 | +| 23 | || 23 | 18 | ++----+---------------------------------++----+---------------------------------+ ++------------------------------------------------------------------------------+ +| U Bufetu Line: 0 | ++--------------------------------------++--------------------------------------+ +| To: Studijni odd. || To: U Petnika | ++----+---------------------------------++----+---------------------------------+ +| 00 | || 00 | | +| 01 | || 01 | | +| 02 | || 02 | | +| 03 | || 03 | | +| 04 | 20 50 || 04 | 13 43 | +| 05 | 20 50 || 05 | 13 43 | +| 06 | 20 35 50 || 06 | 13 28 43 58 | +| 07 | 05 20 35 50 || 07 | 13 28 43 58 | +| 08 | 05 20 35 50 || 08 | 13 28 43 58 | +| 09 | 05 20 35 50 || 09 | 13 28 43 58 | +| 10 | 05 20 50 || 10 | 13 43 | +| 11 | 20 50 || 11 | 13 43 | +| 12 | 20 50 || 12 | 13 43 | +| 13 | 20 50 || 13 | 13 43 | +| 14 | 20 50 || 14 | 13 43 | +| 15 | 20 35 50 || 15 | 13 28 43 58 | +| 16 | 05 20 35 50 || 16 | 13 28 43 58 | +| 17 | 05 20 35 50 || 17 | 13 28 43 58 | +| 18 | 05 20 35 50 || 18 | 13 28 43 58 | +| 19 | 05 20 50 || 19 | 13 43 | +| 20 | 20 50 || 20 | 13 43 | +| 21 | 20 50 || 21 | 13 43 | +| 22 | 20 50 || 22 | 13 43 | +| 23 | 20 || 23 | 13 | ++----+---------------------------------++----+---------------------------------+ diff --git a/02/out2.txt b/02/out2.txt new file mode 100644 index 0000000000000000000000000000000000000000..87f93035631a8cea505b00472998779c83ef2a26 --- /dev/null +++ b/02/out2.txt @@ -0,0 +1,75 @@ +Loaded 45 names from driver_list.txt. +Loaded network from network.txt. ++------------------------------------------------------------------------------+ +| Line: 0 | ++---+----+-----------------------------++---+----+-----------------------------+ +| d | rT | ==> || d | rT | <== | ++---+----+-----------------------------++---+----+-----------------------------+ +| 0 | 00 | U Petnika || 0 | 00 | Studijni odd. | +| 3 | 03 | Pred Menzou || 2 | 02 | Rektorat | +| 2 | 05 | Matematiku || 1 | 03 | Dekanat | +| 2 | 07 | Fyziku || 2 | 06 | Knihovnicka | +| 2 | 09 | Radioelektronicka || 2 | 08 | U Bufetu | +| 1 | 10 | Elektromagnetickeho pole || 2 | 10 | U Zavrene skoly | +| 2 | 12 | Mikroelektronicka || 1 | 11 | Nosterova | +| 1 | 14 | Studentska || 1 | 13 | Paterova | +| 1 | 15 | Paterova || 1 | 14 | Studentska | +| 1 | 16 | Nosterova || 1 | 16 | Mikroelektronicka | +| 1 | 18 | U Zavrene skoly || 2 | 18 | Elektromagnetickeho pole | +| 2 | 20 | U Bufetu || 1 | 19 | Radioelektronicka | +| 2 | 22 | Knihovnicka || 2 | 21 | Fyziku | +| 2 | 24 | Dekanat || 2 | 23 | Matematiku | +| 1 | 26 | Rektorat || 2 | 25 | Pred Menzou | +| 2 | 28 | Studijni odd. || 3 | 28 | U Petnika | ++---+----+-----------------------------++---+----+-----------------------------+ ++------------------------------------------------------------------------------+ +| Line: 1 | ++---+----+-----------------------------++---+----+-----------------------------+ +| d | rT | ==> || d | rT | <== | ++---+----+-----------------------------++---+----+-----------------------------+ +| 0 | 00 | Italska || 0 | 00 | Spanelska | +| 3 | 03 | Desinfekcni || 2 | 02 | V Karantene | +| 3 | 06 | Lihovar || 2 | 04 | Na Ventilaci | +| 3 | 09 | Za Filtrem || 2 | 06 | Infekcni | +| 3 | 12 | Testovaci || 2 | 08 | Svepomoci | +| 2 | 14 | Respiratoru || 2 | 10 | Remdesivirova | +| 2 | 16 | Petrackovo namesti || 2 | 12 | Prymulova | +| 2 | 18 | Ochrannych stitu || 2 | 14 | U Zavrene skoly | +| 2 | 20 | U Zavrene skoly || 2 | 16 | Ochrannych stitu | +| 2 | 22 | Prymulova || 2 | 18 | Petrackovo namesti | +| 2 | 24 | Remdesivirova || 2 | 20 | Respiratoru | +| 2 | 26 | Svepomoci || 2 | 22 | Testovaci | +| 2 | 28 | Infekcni || 3 | 25 | Za Filtrem | +| 2 | 30 | Na Ventilaci || 3 | 28 | Lihovar | +| 2 | 32 | V Karantene || 3 | 31 | Desinfekcni | +| 2 | 34 | Spanelska || 3 | 34 | Italska | ++---+----+-----------------------------++---+----+-----------------------------+ ++------------------------------------------------------------------------------+ +| Line: 2 | ++---+----+-----------------------------++---+----+-----------------------------+ +| d | rT | ==> || d | rT | <== | ++---+----+-----------------------------++---+----+-----------------------------+ +| 0 | 00 | Vitkov || 0 | 00 | Maternovy sady | +| 2 | 02 | Dobesova alej || 2 | 02 | Pani Vyborne | +| 2 | 04 | Navratilova || 2 | 04 | Petrackovo namesti | +| 2 | 06 | Nentvichova || 2 | 06 | Patova trida | +| 2 | 09 | Studentska || 2 | 09 | Studentska | +| 2 | 11 | Patova trida || 2 | 11 | Nentvichova | +| 2 | 13 | Petrackovo namesti || 2 | 13 | Navratilova | +| 2 | 15 | Pani Vyborne || 2 | 15 | Dobesova alej | +| 2 | 18 | Maternovy sady || 2 | 18 | Vitkov | ++---+----+-----------------------------++---+----+-----------------------------+ ++------------------------------------------------------------------------------+ +| Line: 3 | ++---+----+-----------------------------++---+----+-----------------------------+ +| d | rT | ==> || d | rT | <== | ++---+----+-----------------------------++---+----+-----------------------------+ +| 0 | 00 | Svepomoci || 0 | 00 | Posledni role | +| 2 | 02 | Dobrovolniku || 2 | 02 | Papirenske zavody | +| 2 | 04 | Lekaru || 2 | 04 | Bezrouskova | +| 2 | 06 | Svadlen || 2 | 06 | Cesko-cinskeho pratelstvi | +| 2 | 09 | Cesko-cinskeho pratelstvi || 2 | 09 | Svadlen | +| 2 | 11 | Bezrouskova || 2 | 11 | Lekaru | +| 2 | 13 | Papirenske zavody || 2 | 13 | Dobrovolniku | +| 2 | 15 | Posledni role || 2 | 15 | Svepomoci | ++---+----+-----------------------------++---+----+-----------------------------+ diff --git a/02/out3.txt b/02/out3.txt new file mode 100644 index 0000000000000000000000000000000000000000..693d26e5ee9417cf7c0efbd5aef58c84ba5a5dbe --- /dev/null +++ b/02/out3.txt @@ -0,0 +1,51 @@ +Loaded 45 names from driver_list.txt. +Loaded network from network.txt. ++----------------------+---+----+-----+ +| Driver Name | L | nC | nSt | ++----------------------+---+----+-----+ +| Nelson Piquet | 0 | 11 | 176 | +| Ayrton Senna | 0 | 10 | 160 | +| Graham Hill | 0 | 10 | 160 | +| Jackie Stewart | 0 | 10 | 160 | +| Niki Lauda | 0 | 10 | 160 | +| Emerson Fittipaldi | 0 | 9 | 144 | +| Fernando Alonso | 1 | 9 | 144 | +| Jacques Villeneuve | 1 | 9 | 144 | +| Jim Clark | 0 | 9 | 144 | +| Keke Rosberg | 0 | 9 | 144 | +| Sebastian Vettel | 1 | 9 | 144 | +| Alain Prost | 1 | 8 | 128 | +| Jack Brabham | 0 | 8 | 128 | +| James Hunt | 0 | 8 | 128 | +| Jochen Rindt | 0 | 8 | 128 | +| John Surtees | 0 | 8 | 128 | +| Kimi Raikkonen | 1 | 8 | 128 | +| Lewis Hamilton | 1 | 8 | 128 | +| Michael Schumacher | 1 | 8 | 128 | +| Nico Rosberg | 1 | 8 | 128 | +| Nigel Mansell | 1 | 8 | 128 | +| Damon Hill | 1 | 7 | 112 | +| Jenson Button | 1 | 7 | 112 | +| Mika Hakkinen | 1 | 7 | 112 | +| Alberto Ascari | 2 | 12 | 108 | +| Phil Hill | 2 | 10 | 90 | +| Alan Jones | 2 | 9 | 81 | +| Denny Hulme | 2 | 9 | 81 | +| Giuseppe Farina | 2 | 9 | 81 | +| Mike Hawthorn | 2 | 9 | 81 | +| Henri Toivonen | 3 | 10 | 80 | +| Timo Salonen | 3 | 10 | 80 | +| Carlos Sainz | 3 | 9 | 72 | +| Jody Scheckter | 2 | 8 | 72 | +| Juan M. Fangio | 2 | 8 | 72 | +| Mario Andretti | 2 | 8 | 72 | +| Miki Biasion | 3 | 9 | 72 | +| Stig Blomqvist | 3 | 9 | 72 | +| Ari Vatanen | 3 | 8 | 64 | +| Michele Mouton | 3 | 8 | 64 | +| Richard Burns | 3 | 8 | 64 | +| Petter Solberg | 3 | 7 | 56 | +| Bruce McLaren | X | XX | XXX | +| Eddie Irvine | X | XX | XXX | +| Jean Alesi | X | XX | XXX | ++----------------------+---+----+-----+ diff --git a/02/readme.txt b/02/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..dd4b640a0ca3f6daeff3b091725a1930056bcab5 --- /dev/null +++ b/02/readme.txt @@ -0,0 +1,18 @@ +Readme for PPC-2021 HW02: + +How to compile: +g++ -g main.cpp doprava.cpp -o main -std=c++17 -Wall -Wpedantic +or use makefile: +make all + +How to test: +.\main --schedule "Petrackovo namesti" "Vitkov" "U Bufetu" > out1.txt +.\main --line-routing > out2.txt +.\main --driver-stops > out3.txt +or use makefile: +make run + + +Feel free to change the stop names in test #1. The names of the stations are available in the provided file out2.txt. +Alternative variant of calling --schedule option is: +.\main --schedule Petrackovo_namesti Vitkov U_Bufetu > out1.txt diff --git a/pr01 b/pr01 deleted file mode 100755 index c91b50a54d13dba70dcbfff258212dab0210b4d1..0000000000000000000000000000000000000000 Binary files a/pr01 and /dev/null differ diff --git a/pr01.cpp b/pr01.cpp deleted file mode 100644 index f6c40f1f6cf45d7b48bbbcdffdf23baa993e86d8..0000000000000000000000000000000000000000 --- a/pr01.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include <iostream> - -class myClass -{ - public: - static int count; - int value; - myClass() { - count++; - value = 10; - std::cout << "Created\n"; - } - myClass(int val) { - count++; - value = val; - std::cout << "Created\n"; - } - ~myClass() { - std::cout << "Destroyed\n"; - } -}; - -int myClass::count = 0; - -int main() -{ - int Marek = 0; - - myClass a; - std::cout << "Instanci " << myClass::count << std::endl; - - myClass *c = new myClass(5); - - delete c; - - return Marek; -}