-
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
c5afd14
commit 530a9db
Showing
8 changed files
with
90 additions
and
0 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,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 not shown.
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,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 not shown.
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,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 not shown.
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,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 not shown.