Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int amountOldDocuments, amountNewDrawer, amountNewDocuments, IDToBeStored;
- cin >> amountOldDocuments;
- string oldNames[amountOldDocuments];
- int oldID[amountOldDocuments];
- for(int i = 0; i < amountOldDocuments; i++) {
- cin >> oldNames[i];
- cin >> oldID[i];
- }
- cin >> amountNewDrawer;
- cin >> amountNewDocuments;
- for(int i = 0; i < amountNewDocuments; i++){
- cin >> IDToBeStored;
- }
- return 0;
- }
- void storeID(int IDToBeStored, int oldID[], int amountOldDocuments){
- for(int i = 0; i < amountOldDocuments; i++){
- if(oldID[i] == IDToBeStored){
- }
- }
- }
- int key(string name){
- int sum = 0;
- for(int position = 1; position <= name.length(); position++){
- sum = sum + (position * name.at(position - 1));
- }
- return sum;
- }
- int hash(int sum, int amountDrawer){
- return sum % amountDrawer;
- }
- struct drawer(){
- }
- class List(){
- int ID;
- string name;
- List next;
- List(int ID, string name){
- this->ID = 0;
- name = name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement