forked from siddharthsonii/Hack-Fest-22
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CodeGladiator2020Problem1(OpenRound)-Solution1
75 lines (63 loc) · 1.67 KB
/
CodeGladiator2020Problem1(OpenRound)-Solution1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include<bits/stdc++.h>
using namespace std;
#define ll long long
if(vec[i]/arr[i]<val)
val=vec[i]/arr[i];
cout<<val<<"\n";l i=0;i<n;i++)
cin>>vec[i];
for(ll i=0;i<vec.size();i++)
val=vec[i]/arr[i];
cout<<val<<"\n";
return 0;
}
class doubleHash
{
public:
long int *hash
void insertHash(int key)
{
if (isFull())
return;
int index = hash1(key);
if (hashTable[index] != -1)
{
int index2 = hash2(key);
int i = 1;
while (1) {
int newIndex = (index + i * index2) % SIZE;
if (hashTable[newIndex] == -1)
{
hashTable[newIndex] = key;
break;
}
i++;
}
}
else hashTable[index] = key;
curr_size++;
}class doubleHash
{
public:
long int *hash
void insertHash(int key)
{
if (isFull())
return;
int index = hash1(key);
if (hashTable[index] != -1)
{
int index2 = hash2(key);
int i = 1;
while (1) {
int newIndex = (index + i * index2) % SIZE;
if (hashTable[newIndex] == -1)
{
hashTable[newIndex] = key;
break;
}
i++;
}
}
else hashTable[index] = key;
curr_size++;
}