forked from satyajeetramnit/Placement-2023
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b5bea6
commit 4d43104
Showing
23 changed files
with
65 additions
and
450 deletions.
There are no files selected for viewing
This file contains 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
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; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Submodule Round 3 (Fetch Movie API)
deleted from
f3e95d
20 changes: 0 additions & 20 deletions
20
Relevel/Round 4 (Ticket Booking App)/.codesandbox/workspace.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-499 KB
Relevel/Round 4 (Ticket Booking App)/Read Me Frontend - 23rd Sep.pdf
Binary file not shown.
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
Relevel/Round 4 (Ticket Booking App)/public/data/coupon.json
This file was deleted.
Oops, something went wrong.
155 changes: 0 additions & 155 deletions
155
Relevel/Round 4 (Ticket Booking App)/public/data/data.json
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.