-
Notifications
You must be signed in to change notification settings - Fork 0
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
b467704
commit 0c740ca
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
ICPC Assiut University Community/Contest #1/A - Winter Sale.cpp
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,16 @@ | ||
#include <bits/stdc++.h> | ||
using namespace std; | ||
#define ll_a long long | ||
#define ll_u unsigned long long | ||
#define sort_Vector(v) sort(v.begin(),v.end()) | ||
#define sort_Array(a,n) sort(a,a+n) | ||
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); | ||
|
||
int main() { | ||
fast | ||
double x,p;cin>>x>>p; | ||
int y=100-x; | ||
double z=(p*100)/y; | ||
cout<<fixed<<setprecision(2)<<z; | ||
return 0; | ||
} |
22 changes: 22 additions & 0 deletions
22
ICPC Assiut University Community/Contest #1/B - Memo and Momo.cpp
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,22 @@ | ||
#include <bits/stdc++.h> | ||
using namespace std; | ||
#define ll_a long long | ||
#define ll_u unsigned long long | ||
#define sort_Vector(v) sort(v.begin(),v.end()) | ||
#define sort_Array(a,n) sort(a,a+n) | ||
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); | ||
|
||
int main() { | ||
fast | ||
ll_u a,b,k;cin>>a>>b>>k; | ||
if(a%k==0&&b%k==0){ | ||
cout<<"Both"; | ||
}else if(a%k==0&&b%k!=0){ | ||
cout<<"Memo"; | ||
}else if(b%k==0&&a%k!=0){ | ||
cout<<"Momo"; | ||
}else{ | ||
cout<<"No One"; | ||
} | ||
return 0; | ||
} |
15 changes: 15 additions & 0 deletions
15
ICPC Assiut University Community/Contest #1/C - Next Alphabet.cpp
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,15 @@ | ||
#include <bits/stdc++.h> | ||
using namespace std; | ||
#define ll_a long long | ||
#define ll_u unsigned long long | ||
#define sort_Vector(v) sort(v.begin(),v.end()) | ||
#define sort_Array(a,n) sort(a,a+n) | ||
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); | ||
|
||
int main() { | ||
fast | ||
char a;cin>>a; | ||
if(a=='z')cout<<"a"; | ||
else cout<<char(a+1); | ||
return 0; | ||
} |
26 changes: 26 additions & 0 deletions
26
ICPC Assiut University Community/Contest #1/D - Ali Baba and Puzzles.cpp
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,26 @@ | ||
#include <bits/stdc++.h> | ||
using namespace std; | ||
#define ll_a long long | ||
#define ll_u unsigned long long | ||
#define sort_Vector(v) sort(v.begin(),v.end()) | ||
#define sort_Array(a,n) sort(a,a+n) | ||
#define fast ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); | ||
|
||
int main() { | ||
fast | ||
ll_u a,b,c,d;cin>>a>>b>>c>>d; | ||
if(a+b*c==d){ | ||
cout<<"YES"; | ||
}else if(a*b+c==d){ | ||
cout<<"YES"; | ||
}else if(a+b-c==d){ | ||
cout<<"YES"; | ||
}else if(a-b+c==d){ | ||
cout<<"YES"; | ||
}else if(a-b*c==d){ | ||
cout<<"YES"; | ||
}else if(a*b-c==d){ | ||
cout<<"YES"; | ||
}else cout<<"NO"; | ||
return 0; | ||
} |