diff --git a/Codeforces/codeforces.cpp/.vs/ProjectSettings.json b/Codeforces/codeforces.cpp/.vs/ProjectSettings.json deleted file mode 100644 index b11371a..0000000 --- a/Codeforces/codeforces.cpp/.vs/ProjectSettings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "CurrentProjectSetting": "No Configurations" -} \ No newline at end of file diff --git a/Codeforces/codeforces.cpp/.vs/VSWorkspaceState.json b/Codeforces/codeforces.cpp/.vs/VSWorkspaceState.json deleted file mode 100644 index 9568b22..0000000 --- a/Codeforces/codeforces.cpp/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ExpandedNodes": [ - "" - ], - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/.suo b/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/.suo deleted file mode 100644 index 99819cf..0000000 Binary files a/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/.suo and /dev/null differ diff --git a/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/Browse.VC.db b/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/Browse.VC.db deleted file mode 100644 index ca268a3..0000000 Binary files a/Codeforces/codeforces.cpp/.vs/codeforces.cpp/v17/Browse.VC.db and /dev/null differ diff --git a/Codeforces/codeforces.cpp/.vs/slnx.sqlite b/Codeforces/codeforces.cpp/.vs/slnx.sqlite deleted file mode 100644 index 80c8881..0000000 Binary files a/Codeforces/codeforces.cpp/.vs/slnx.sqlite and /dev/null differ diff --git a/Codeforces/codeforces.cpp/1.cpp b/Codeforces/codeforces.cpp/1.cpp deleted file mode 100644 index c6270fc..0000000 --- a/Codeforces/codeforces.cpp/1.cpp +++ /dev/null @@ -1,21 +0,0 @@ - -#inciude -using namespace std; -int main() { - int rating; - cin >> rating - if (rating <= 1399) { - cout << 'Division 4' - } - elseif(1400 <= rating <= 1599) { - cout << 'Division 3' - } - elseif(1600 <= rating <= 1899) { - cout << 'Division 4' - } - else(1900 <= rating) { - cout << 'Division 1' - } - return 0; -} - \ No newline at end of file diff --git a/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/.suo b/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/.suo deleted file mode 100644 index 58f917d..0000000 Binary files a/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/.suo and /dev/null differ diff --git a/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/Browse.VC.db b/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/Browse.VC.db deleted file mode 100644 index ddfd36c..0000000 Binary files a/Codeforces/codeforces.cpp/2code.cpp/.vs/2code.cpp/v17/Browse.VC.db and /dev/null differ diff --git a/Codeforces/codeforces.cpp/2code.cpp/.vs/ProjectSettings.json b/Codeforces/codeforces.cpp/2code.cpp/.vs/ProjectSettings.json deleted file mode 100644 index b11371a..0000000 --- a/Codeforces/codeforces.cpp/2code.cpp/.vs/ProjectSettings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "CurrentProjectSetting": "No Configurations" -} \ No newline at end of file diff --git a/Codeforces/codeforces.cpp/2code.cpp/.vs/VSWorkspaceState.json b/Codeforces/codeforces.cpp/2code.cpp/.vs/VSWorkspaceState.json deleted file mode 100644 index 8776c97..0000000 --- a/Codeforces/codeforces.cpp/2code.cpp/.vs/VSWorkspaceState.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ExpandedNodes": [ - "" - ], - "SelectedNode": "\\Source1.cpp", - "PreviewInSolutionExplorer": false -} \ No newline at end of file diff --git a/Codeforces/codeforces.cpp/2code.cpp/.vs/slnx.sqlite b/Codeforces/codeforces.cpp/2code.cpp/.vs/slnx.sqlite deleted file mode 100644 index 13687d8..0000000 Binary files a/Codeforces/codeforces.cpp/2code.cpp/.vs/slnx.sqlite and /dev/null differ diff --git a/Codeforces/codeforces.cpp/2code.cpp/Source1.cpp b/Codeforces/codeforces.cpp/2code.cpp/Source1.cpp deleted file mode 100644 index 5628ab8..0000000 --- a/Codeforces/codeforces.cpp/2code.cpp/Source1.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#inciude -using namespace std; -int main() { - int rating; - cin >> rating - if (rating <= 1399) { - cout << 'Division 4' - } - elseif(1400 <= rating <= 1599) { - cout << 'Division 3' - } - elseif(1600 <= rating <= 1899) { - cout << 'Division 4' - } - else(1900 <= rating) { - cout << 'Division 1' - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/68.c b/Codeforces/codeforces.cpp/68.c deleted file mode 100644 index d3f5a12..0000000 --- a/Codeforces/codeforces.cpp/68.c +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Codeforces/codeforces.cpp/A. Array Coloring.c b/Codeforces/codeforces.cpp/A. Array Coloring.c deleted file mode 100644 index 9b14fee..0000000 --- a/Codeforces/codeforces.cpp/A. Array Coloring.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - int arr[n]; - int sum=0; - for(i:arr){ - cin>>arr[i]; - } - for(int i=0; i -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - int arr[n]; - int sum=0; - for(i:arr){ - cin>>arr[i]; - } - for(int i=0; i -#include - -using namespace std; - -string decryptString(string s) { - string result = ""; - - for (int i = 0; i < s.length(); i += 2) { - result += s[i]; - } - - return result; -} -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - string s; - cout << "Enter the encrypted string: "; - cin >> s; - - string decryptedString = decryptString(s); - cout << "Decrypted string: " << decryptedString << endl; - - return 0; - } -} diff --git a/Codeforces/codeforces.cpp/A. Cipher Shifer1.exe b/Codeforces/codeforces.cpp/A. Cipher Shifer1.exe deleted file mode 100644 index 7158d3d..0000000 Binary files a/Codeforces/codeforces.cpp/A. Cipher Shifer1.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. Cipher Shifer1.o b/Codeforces/codeforces.cpp/A. Cipher Shifer1.o deleted file mode 100644 index 631952d..0000000 Binary files a/Codeforces/codeforces.cpp/A. Cipher Shifer1.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. Divisible Array.cpp b/Codeforces/codeforces.cpp/A. Divisible Array.cpp deleted file mode 100644 index 1995284..0000000 --- a/Codeforces/codeforces.cpp/A. Divisible Array.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - cout< -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - if(n==2 || n==99) cout<<"Bob"< -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int x,k; - cin>>x>>k; - if(x -#include -#define ll long long -using namespace std; - -int main() { - int t; - cin >> t; - while (t--) { - long long n, k, x; - cin >> n >> k >> x; - ll sum = 0; - - if (k > n || k - 1 > x) { - cout << -1 << endl; // Print -1 when conditions are not met - } - else { - for (int i = 1; i < k; i++) { - sum+=i; - } - if(k>=x){ - for (int j = 0; j < n - k; j++) { - sum+= (k-1); - } - } - else{ - for (int l = 0; l < n-k; l++) { - sum += x; - } - } - cout << sum << endl; // Corrected to add 'n' to the sum - } - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/A. MEXanized Array.exe b/Codeforces/codeforces.cpp/A. MEXanized Array.exe deleted file mode 100644 index ce97f02..0000000 Binary files a/Codeforces/codeforces.cpp/A. MEXanized Array.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. MEXanized Array.o b/Codeforces/codeforces.cpp/A. MEXanized Array.o deleted file mode 100644 index d8afab6..0000000 Binary files a/Codeforces/codeforces.cpp/A. MEXanized Array.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. Musical Puzzle.cpp b/Codeforces/codeforces.cpp/A. Musical Puzzle.cpp deleted file mode 100644 index c5b2889..0000000 --- a/Codeforces/codeforces.cpp/A. Musical Puzzle.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n, i, j; - cin>>n; - string s; - cin>>s; - int count=0; - - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/A. Musical Puzzle.exe b/Codeforces/codeforces.cpp/A. Musical Puzzle.exe deleted file mode 100644 index aa7d51e..0000000 Binary files a/Codeforces/codeforces.cpp/A. Musical Puzzle.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. Musical Puzzle.o b/Codeforces/codeforces.cpp/A. Musical Puzzle.o deleted file mode 100644 index 72c1d51..0000000 Binary files a/Codeforces/codeforces.cpp/A. Musical Puzzle.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/A. Twin Permutations.cpp b/Codeforces/codeforces.cpp/A. Twin Permutations.cpp deleted file mode 100644 index 6110ab6..0000000 --- a/Codeforces/codeforces.cpp/A. Twin Permutations.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n, a[n], b[n]; - cin>>n; - for(int i=0; i>a[i]; - } - for(int j=0; j -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - string s; - cin>>s; - int a[n+1]; - a[0]=1; - for(int i=0;i -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - string s; - cin>>s; - int ind, wid; - for(int i=0;i' || s[i]=='<'){ - cout<') || (s[i]=='>' && s[i+1]=='<')){ - cout<<2; - } - } - for(int j=0;j'){ - ind=i; - } - else if(s[i]=='>' && s[i+1]=='<'){ - wid=i; - } - } - for(int k=i;k -#include -#include - -using namespace std; - -pair findMinMaxX(int n, int m, vector& a, vector& b) { - int min_x = a[0]; - int max_x = a[0]; - - int or_b = 0; - for (int bj : b) { - or_b |= bj; - } - - min_x |= or_b; - max_x |= or_b; - - return make_pair(min_x, max_x); -} - -int main() { - int t; - cin >> t; - - while (t--) { - int n, m; - cin >> n >> m; - vector a(n), b(m); - - for (int i = 0; i < n; ++i) { - cin >> a[i]; - } - - for (int i = 0; i < m; ++i) { - cin >> b[i]; - } - - pair result = findMinMaxX(n, m, a, b); - - cout << result.first << " " << result.second << endl; - } - - return 0; -} diff --git a/Codeforces/codeforces.cpp/B. Permutation Swap.c b/Codeforces/codeforces.cpp/B. Permutation Swap.c deleted file mode 100644 index b64ee56..0000000 --- a/Codeforces/codeforces.cpp/B. Permutation Swap.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n, i, j; - cin>>n; - - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/Between_the_Offices.cpp b/Codeforces/codeforces.cpp/Between_the_Offices.cpp deleted file mode 100644 index 9b07f0b..0000000 --- a/Codeforces/codeforces.cpp/Between_the_Offices.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -using namespace std; - int main(){ - int N, i, j, NofSF=0, NofFS=0; - string s; - cin>>N; - cout<>s; - for(i=0;iNofFS){ - cout<<"YES"; - } - else if(NofSF<=NofFS){ - cout<<"NO"; - } - return 0; - } diff --git a/Codeforces/codeforces.cpp/Between_the_Offices.exe b/Codeforces/codeforces.cpp/Between_the_Offices.exe deleted file mode 100644 index 1058d8c..0000000 Binary files a/Codeforces/codeforces.cpp/Between_the_Offices.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Between_the_Offices.o b/Codeforces/codeforces.cpp/Between_the_Offices.o deleted file mode 100644 index 969a793..0000000 Binary files a/Codeforces/codeforces.cpp/Between_the_Offices.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Cards.cpp b/Codeforces/codeforces.cpp/Cards.cpp deleted file mode 100644 index ca950e7..0000000 --- a/Codeforces/codeforces.cpp/Cards.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include -using namespace std; - -int main(){ - int N,i,j; - string s; - cin>>N; - cout<>s; - int num_of_z=0; - int num_of_n=0; - - for(i=0;i -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n,k,x=0,y=0; - cin>>n>>k; - for(int i=0;i<=n/2;i++){ - for(int j=0;j<=n/k;j++){ - if(2*i + k*j == n){ - cout<<"YES"; - break; - } - - if(2*i + k*j != n){ - cout<<"NO"; - break; - } - } - } - } - - return 0; -} diff --git a/Codeforces/codeforces.cpp/Coins.exe b/Codeforces/codeforces.cpp/Coins.exe deleted file mode 100644 index a1b2cf5..0000000 Binary files a/Codeforces/codeforces.cpp/Coins.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Coins.o b/Codeforces/codeforces.cpp/Coins.o deleted file mode 100644 index c9b022f..0000000 Binary files a/Codeforces/codeforces.cpp/Coins.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Fafa and his Company.cpp b/Codeforces/codeforces.cpp/Fafa and his Company.cpp deleted file mode 100644 index bc082f2..0000000 --- a/Codeforces/codeforces.cpp/Fafa and his Company.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include -using namespace std; - -int main(){ - int N, i, No_of_factor=0; - cin>>N; - for(i=1;i<=N;i++){ - if(N%i==0){ - No_of_factor++; - } - } - cout< -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int a,b, jumps; - cin>>a>>b; - if(b%a!=0 || (a==1 && b==1) || (a==1 && b==2) || (a==2 && b==1)){ - cout<<1; - jumps=1; - } - else if(b%a==0 || a%b==0){ - cout<<2; - jumps=2; - } - else(cout<<0); - - if(jumps==1){ - cout< -using namespace std; - -int main(){ - int n; - cin>>n; - string brr[6] = {} - string arr[]; - cout<<(6-n); - for(i=0;i>arr[i]; - cout< -using namespace std; - -int main(){ - int n; - cin>>n; - if(n%2==0){ - cout<<"Mahmoud"; - } - else if(n%2!=0){ - cout<<"Ehab"; - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.exe b/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.exe deleted file mode 100644 index d1bdf99..0000000 Binary files a/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.o b/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.o deleted file mode 100644 index 20c783b..0000000 Binary files a/Codeforces/codeforces.cpp/Mahmoud and Ehab and the even-odd game.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Pens and Pencils.cpp b/Codeforces/codeforces.cpp/Pens and Pencils.cpp deleted file mode 100644 index 4693037..0000000 --- a/Codeforces/codeforces.cpp/Pens and Pencils.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int a, b, c, d, k, num1, num2; - cin>>a>>b>>c>>d>>k; - - if(a>c){ - //cout<d){ - //cout< -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n,m,i =0,j= 0; - cin>>n; - cin>>m; - int a[n]; - int b[m]; - //cin>>a[n]; - for(int i=0; i>a[i]; -} - //cin>>b[m]; - for(int j=0; i>b[i]; -} - sort(a.begin(),a.end()); - sort(b.begin(),b.end()); - - while(m<=n){ - a[i] = b[m-i+1]; - i++; - } - cout << accumulate(a, a + n, 0); - return 0; - -} diff --git a/Codeforces/codeforces.cpp/Scarborough Fair.cpp b/Codeforces/codeforces.cpp/Scarborough Fair.cpp deleted file mode 100644 index 8f0d473..0000000 --- a/Codeforces/codeforces.cpp/Scarborough Fair.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include -using namespace std; - -int main(){ - int n, m, l, r, i, j; - char c1, c2; - cin>>n>>m; - cout<>s; - cout<>l>>r>>c1>>c2; - for(j=l-1;j<=r-1;j++){ - if(s[j]==c1){ - s[j]=c2; - } - } - } - cout< -using namespace std; - -int main(){ - int x; - cin>>x; - if(x%4==1){ - cout<<0<<" "; - cout<<'A'; - } - else if(x%4==3){ - cout<<2<<" "; - cout<<'C'; - } - else if(x%4==2){ - cout<<1<<" "; - cout<<'B'; - } - -} diff --git a/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.exe b/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.exe deleted file mode 100644 index 5a4e1f5..0000000 Binary files a/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.o b/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.o deleted file mode 100644 index 8bcafd2..0000000 Binary files a/Codeforces/codeforces.cpp/Tokitsukaze and Enhancement.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Untitled2.cpp b/Codeforces/codeforces.cpp/Untitled2.cpp deleted file mode 100644 index c28fa79..0000000 --- a/Codeforces/codeforces.cpp/Untitled2.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n,m,i =0,j= 0; - cin>>n; - cin>>m; - int a[n]; - int b[m]; - //cin>>a[n]; - for(int i=0; i>a[i]; -} - //cin>>b[m]; - for(int j=0; i>b[i]; -} - sort(a, a + n); - sort(b, b + n); - - while(m<=n){ - a[i] = b[m-i+1]; - i++; - } - int sum = 0; - sum = accumulate(a, a+n, sum); - cout< -using namespace std; - -int main(){ - int a, b, c; - cin>>a>>b>>c; - if(b>=a && c>=a){ - cout<<"Yes"; - } - else(cout<<"No"); -} diff --git a/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.exe b/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.exe deleted file mode 100644 index 4301f77..0000000 Binary files a/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.o b/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.o deleted file mode 100644 index 977a520..0000000 Binary files a/Codeforces/codeforces.cpp/Vus the Cossack and a Contest.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/array2.c b/Codeforces/codeforces.cpp/array2.c deleted file mode 100644 index c2d6dc3..0000000 --- a/Codeforces/codeforces.cpp/array2.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - int arr[n]; - //cin >> arr[i]; - for(i=0;i>arr[i]; - } - -} - return 0; -} - diff --git a/Codeforces/codeforces.cpp/bs.cpp b/Codeforces/codeforces.cpp/bs.cpp deleted file mode 100644 index e47b305..0000000 --- a/Codeforces/codeforces.cpp/bs.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include -using namespace std; -int main(){ - char arr[7] = {c, o, d, e, f , r, s} - - int t; - cin>>t; - while(t--){ - char n; - cin>>'n'>>endl; - - - - } - return 0; -} - diff --git a/Codeforces/codeforces.cpp/ee.cpp.c b/Codeforces/codeforces.cpp/ee.cpp.c deleted file mode 100644 index 8f33fc5..0000000 --- a/Codeforces/codeforces.cpp/ee.cpp.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n,m,i =0,j= 0; - cin>>n; - cin>>m; - int a[n]; - int b[m]; - //cin>>a[n]; - for(int i=0; i>a[i]; -} - //cin>>b[m]; - for(int j=0; i>b[i]; -} - sort(a.begin(),a.end()); - sort(b.begin(),b.end()); - - while(m<=n){ - a[i] = b[m-i+1]; - i++; - } - int sum = 0; - sum = accumulate(a, a+n, sum); - cout< -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n,m,i =0,j= 0; - cin>>n; - cin>>m; - int a[n]; - int b[m]; - //cin>>a[n]; - for(int i=0; i>a[i]; -} - //cin>>b[m]; - for(int j=0; i>b[i]; -} - sort(a.begin(),a.end()); - sort(b.begin(),b.end()); - - while(m<=n){ - a[i] = b[m-i+1]; - i++; - } - int sum = 0; - sum = accumulate(a, a+n, sum); - cout< -using namespace std; - -int main(){ - int salary[]; - int n = salary.size(); - int min = *min_element(salary, salary + n); - int max = *max_element(salary, salary + n); - for(int i=0;i -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int a,b,c; - cin>>a>>b>>c; - int maxi = max(a,max(b,c)); - int mini = min(a,min(b,c)); - if(a!=maxi && a!=mini) cout<=b){ - if(b>=c){ - cout<=b){ - cout<=a){ - if(a>=c){ - cout< -#define ll long long  - using namespace std; - - class phonedirectory{ - public: - sets ; - void insert_num(ll int num){ - s.insert(num); - } - bool check(ll int num){ -     set :: iterator itr = s.find(num) ; -     if(*itr >= 0 && *itr < s.size() ){ -         return true; -     } -     return false ; - } - void release_num(){ - if(s.empty() == 1){ -     cout<<"No numbers in slots"< :: iterator itr=v.begin(); -      auto it = itr ; -      cout<<" New Number "<<*it<> num_of_slot ; -         for(int i=0; i < num_of_slot ;i++){ -             cin>>number ; -         phone_num.insert_num(number); -         } -          - cout<<"if you want new number please Enter 'X' else 'N'  " <>new_num ; - if(new_num == 'X'){ - -     phone_num.release_num(); - } - char to_check; - cout<<"if you want to check number please Enter 'Y' else 'N' " <>to_check ; - - if(to_check == 'Y'){ -     cout<<"Enter Number to Check "<>mob_num ; -     if(phone_num.check(mob_num)){ -         cout<<"Number is present in slots"< -#define ll long long  -using namespace std; - - class phonedirectory{ - public: - - vector v; - for(int i=0 ; i>num; - v.push_back(num); - } - bool check(ll num){ - - for(int i=0; i < v.size(); i++){ - if(v[i]==num){ -         return true; -      } -      return false ; - } -} - void release_num(){ - if(v.empty() == 1){ -     cout<<"No numbers in slots"< :: iterator it; -      auto it = itr ; -      cout<<" New Number "<<*it<> num_of_slot ; -         for(int i=0; i < num_of_slots ;i++){ -             cin>>number ; -         phone_num.insert_num(number); -         } -          - cout<<"For new number please Enter 'X' else 'N'  " <>new_num ; - if(new_num == 'X'){ - -     phone_num.release_num(); - } - char to_check; - cout<<"To check number please Enter 'Y' else 'N' " <>to_check ; - - if(to_check == 'Y'){ -     cout<<"Enter Number to Check "<>mob_num ; -     if(phone_num.check(mob_num)){ -         cout<<"Number is present in slots"< -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n,m,i =0,j= 0; - cin>>n; - cin>>m; - int a[n]; - int b[m]; - //cin>>a[n]; - for(int i=0; i>a[i]; -} - //cin>>b[m]; - for(int j=0; i>b[i]; -} - sort(a.begin(),a.end()); - sort(b.begin(),b.end()); - - while(m<=n){ - a[i] = b[m-i+1]; - i++; - } - int sum = 0; - sum = accumulate(a, a+n, sum); - cout< - -using namespace std; - -int main(){ - int t; - cin>>t; - while(t--){ - int n; - vector v; - reverse(sort(v.begin(),v.end())); - c = min(a,b); - int a[26]; - sort(a,a+26); - d = max(a,b); - - } - return 0; -} diff --git a/Codeforces/codeforces.cpp/string1.cpp b/Codeforces/codeforces.cpp/string1.cpp deleted file mode 100644 index 18fc9c2..0000000 --- a/Codeforces/codeforces.cpp/string1.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/*In order to write a string, Atilla needs to first learn all letters that are contained in the string. - -Atilla needs to write a message which can be represented as a string s. He asks you what is the minimum alphabet size required so that one can write this message. - -The alphabet of size x (1≤x≤26) contains only the first x Latin letters. For example an alphabet of size 4 contains only the characters a, b, c and d. -*/ - -#include -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n; - cin>>n; - - string s; - cin>>s; - int a[26]={0}; - for(int i=0;i=0;i--){ - if(a[i]>0){ - cout< -using namespace std; - -int main(){ -int i,n; -cin >> n; -int arr[n]; -int sum=0; -for(i=0;i> arr[i]; - sum += arr[i]; -} -cout << sum; -return 0; -} diff --git a/Codeforces/codeforces.cpp/sumofArray.exe b/Codeforces/codeforces.cpp/sumofArray.exe deleted file mode 100644 index 2f7bdb0..0000000 Binary files a/Codeforces/codeforces.cpp/sumofArray.exe and /dev/null differ diff --git a/Codeforces/codeforces.cpp/sumofArray.o b/Codeforces/codeforces.cpp/sumofArray.o deleted file mode 100644 index 276fbfb..0000000 Binary files a/Codeforces/codeforces.cpp/sumofArray.o and /dev/null differ diff --git a/Codeforces/codeforces.cpp/task1.cpp b/Codeforces/codeforces.cpp/task1.cpp deleted file mode 100644 index b17f89e..0000000 --- a/Codeforces/codeforces.cpp/task1.cpp +++ /dev/null @@ -1,38 +0,0 @@ -void help(vector>&image,int &n,int &m){ - - if(x>=n || y>=m || image[x][y]==nc)return; - - int oc=image[x][y]; - - image[x][y]=nc; - - if(x+1=0 && image[x-1][y]==oc){ - - help(image,x-1,y,nc,n,m); - - } - - if(y-1>=0 && image[x][y-1]==oc){ - - help(image,x,y-1,nc,n,m); - - } - - if(y+1 -using namespace std; -int main(){ - int t; - cin>>t; - while(t--){ - int n,m; - cin>>n>>m; - string a, b, c; - cin>>a; - cin>>b; - int i; - int flag = 1; - reverse(b.begin(), b.end()); - c = a + (b); - for(i=0;i<=n+m-3;i++){ - if(c[i] == c[i+1] && c[i+1] == c[i+2]){ - flag = 0; - break; - } - } - if(flag == 0){ - cout<<"NO"< -using namespace std; - -int main() { - - int N,D; - cin>>N>>D>>[&n&]; - int count1=0; - int count2=0; - int a[N]; - for(int i=1;i<=N;i++){ - cin>>a[i]; - } - for(int j=1; j<=N; j++){ - if (a[j]>=80 || a[j]<=9){ - count1++; - } - else { - count2++; - } - } - float f1=count1/D; - int m1=count1/D; - int count11=0; - int count22=0; - - float f2=count2/D; - int m2=count2/D; - if(f1>m1){ - count11++; - } - if(f2>m2){ - count22++; - } - int a1=count1+count11; - int a2=count2+count22; - int k1=a1/D; - int k2=a2/D; - if(a1%D!=0 && a2%D!=0){ - cout<