This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| #define FIN "cautbin.in" | |
| #define FOUT "cautbin.out" | |
| using namespace std; | |
| //returns the largest index such that arr[i] == key | |
| // or -1 whether the key is not in the array | |
| int binary_search0(int *arr, int lo, int hi, int key) { | |
| if(lo > hi) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <unordered_map> | |
| /* | |
| capacity = 5 | |
| Head 11 8 5 1 4 Tail | |
| tail->prev inseamna nodul cu key 7 | |
| head->next = inseamna nodul cu key 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //BFS > graful este reprezentat prin matricea de adiacenta | |
| #include <iostream> | |
| #include <queue> | |
| #include <vector> | |
| using namespace std; | |
| class GrafMatrice { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <queue> | |
| using namespace std; | |
| struct Node { | |
| int vecin; | |
| Node*urmator; | |
| Node(int vecin): vecin(vecin), urmator(nullptr) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution { | |
| public: | |
| vector<int> twoSum(vector<int> &nums, int target) { | |
| map<int,int> mp; | |
| int n = num.size(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Daca Team ori Player este inregistrat in Diqualifications table, trebuie o formula automata / trigger sa activeze in entitatea corecta (Team ori Player, dupa caz), in atributul Player_Registration_Status / Team_Registration_Status optiunea ‘Disqualified’ | |
| DELIMITER $$ | |
| CREATE TRIGGER trg_player_disqualification | |
| AFTER INSERT ON Disqualifications | |
| FOR EACH ROW | |
| BEGIN | |
| IF NEW.Player_ID IS NOT NULL THEN | |
| UPDATE Player | |
| SET Player_Registration_Status = 'Disqualified' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER $$ | |
| CREATE TRIGGER trg_athlete_hurdles_gender_check | |
| BEFORE INSERT ON Athlete_Profile | |
| FOR EACH ROW | |
| BEGIN | |
| DECLARE v_gender ENUM('M', 'F'); | |
| -- Retrieve the player's gender from the Player supertype | |
| SELECT Gender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| #define FIN "graf.in" | |
| #define FIN2 "graf-liste.in" | |
| using namespace std; | |
| class Graf { | |
| private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Input: | |
| Numar de noduri si matricea costurilor | |
| 5 | |
| 0 9 0 8 0 | |
| 7 0 1 0 3 | |
| 5 0 0 0 4 | |
| 0 0 6 0 0 | |
| 0 1 0 7 0 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Introduction | |
| This report presents the physical database design for a multi-sport tournament management system. The system is modelled after real-world events such as the Commonwealth Games and the European Championships (European Athletics, 2025). The design covers data management across multiple sports, scheduling, results recording, standings calculation, and performance reporting. | |
| The physical model has been developed in accordance with the requirements of the assignment brief and is presented as a crow's foot Enhanced Entity-Relationship Diagram (EERD) created using Lucidchart. This report accompanies that diagram and provides the design assumptions, rationale, and justification for key architectural decisions including the chosen inheritance strategy, denormalisation approach, and non-key indexing. | |
| 2. Design Assumptions and Rationale | |
| A number of assumptions were made during the design process to resolve ambiguities in the scenario and to reflect realistic tournament management requirements. These ar |