Skip to content

Commit

Permalink
Odessa
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajeetramnit committed Jul 29, 2022
1 parent 4b5bea6 commit 4d43104
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 450 deletions.
65 changes: 65 additions & 0 deletions Odessa/odessa.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Q1
#include<iostream>
using namespace std;

void solution_function(){
int l;
cin>>l;
int res=0;
for(int i=l;i>=2;i--){
if(l%i==0){
res+=i;
}
}
cout<<res<<endl;
}

int main(){
solution_function();
return 0;
}

// Q2
#include<bits/stdc++.h>
using namespace std;

void solution_function() {

int n;
cin >> n;

int ans = 0;

vector<int> ax, ay, bx, by;
int a, b, c;

for (int i = 0; i < n; i++) {
cin >> a >> b >> c;
if (c) {
bx.push_back(a);
by.push_back(b);
}
else {
ax.push_back(a);
ay.push_back(b);
}
}

int al = ax.size();
int bl = bx.size();

for (int i = 0; i < al; i++) {
for (int j = 0; j < bl; j++) {
int dist = ((ax[i] - bx[j]) * (ax[i] - bx[j])) + ((ay[i] - by[j]) * (ay[i] - by[j]));
dist = sqrt(dist);

ans = max(ans, dist);
}
}
cout << ans << endl;
}

int main(){
solution_function();
return 0;
}
5 changes: 0 additions & 5 deletions Relevel/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions Relevel/Round 2 (DSA Question)/Disturbance.cpp

This file was deleted.

20 changes: 0 additions & 20 deletions Relevel/Round 2 (DSA Question)/OddSubset.cpp

This file was deleted.

1 change: 0 additions & 1 deletion Relevel/Round 2 (DSA Question)/README.md

This file was deleted.

1 change: 0 additions & 1 deletion Relevel/Round 3 (Fetch Movie API)
Submodule Round 3 (Fetch Movie API) deleted from f3e95d
20 changes: 0 additions & 20 deletions Relevel/Round 4 (Ticket Booking App)/.codesandbox/workspace.json

This file was deleted.

5 changes: 0 additions & 5 deletions Relevel/Round 4 (Ticket Booking App)/README.md

This file was deleted.

Binary file not shown.
36 changes: 0 additions & 36 deletions Relevel/Round 4 (Ticket Booking App)/package.json

This file was deleted.

23 changes: 0 additions & 23 deletions Relevel/Round 4 (Ticket Booking App)/public/data/coupon.json

This file was deleted.

155 changes: 0 additions & 155 deletions Relevel/Round 4 (Ticket Booking App)/public/data/data.json

This file was deleted.

Loading

0 comments on commit 4d43104

Please sign in to comment.