Skip to content

Commit

Permalink
New Problems added
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavan-Kumar122 committed Oct 30, 2020
1 parent c5afd14 commit 530a9db
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Death_DBMS.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include<bits/stdc++.h>
using namespace std;
long long int n,m;
int main(){
cin>>n>>m;
string victims[n];
string victims_sus_val[n] = {0};
string query;
int i = 0;
while (n--)
{
cin>>victims[i];
i++;
}
int query_number = 0;
int query_1 = 0;
int query_11 = 0;
while (m--)
{
cin>>query_number;

if(query_number == 1){
cin>>query_1;
cin>>query_11;
victims_sus_val[query_1] = query_11;
}
else
{
cin>>query;
int pos = 0;
int index;
// for (int k = 0; k < n; k++)
// {

// }



}

}



}
Binary file added Death_DBMS.exe
Binary file not shown.
12 changes: 12 additions & 0 deletions MarketingScheme.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <bits/stdc++.h>
int main()
{
int T, a, b;
scanf("%d", &T);
while(T--)
{
scanf("%d %d", &a, &b);
if(b >= 2 * a) puts("NO");
else puts("YES");
}
}
Binary file added MarketingScheme.exe
Binary file not shown.
19 changes: 19 additions & 0 deletions Problem_467A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<bits/stdc++.h>
using namespace std;
long long n;
int main(){
cin>>n;
int p,q;
int count = 0;
while(n--){
cin>>p>>q;
if(p<q){
if(p+1 == q){
continue;
}
else count++;
}
}
cout<<count;

}
Binary file added Problem_467A.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions Reverse_Binary_Strings.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include<bits/stdc++.h>
using namespace std;
long long n,i,t,k;
string s;
int main(){
cin>>t;
while(t--){
k=0;
cin>>n>>s;
s[n]=s[0];
for(i=0;i<n;i++) if(s[i]==s[i+1]) k++;
cout<<k/2<<"\n";
}
}
Binary file added Reverse_Binary_Strings.exe
Binary file not shown.

0 comments on commit 530a9db

Please sign in to comment.