diff --git a/1792A Gaming Forces/1792A.cpp b/1792A Gaming Forces/1792A.cpp new file mode 100644 index 0000000..8c22be6 --- /dev/null +++ b/1792A Gaming Forces/1792A.cpp @@ -0,0 +1,19 @@ +#include +using namespace std; +int main() +{ + int t; + cin>>t; + while(t--) + { + int n,num1=0,h; + cin>>n; + for(int i=0;i>h; + if(h==1) + num1++; + } + cout< +using namespace std; +int main(){ + int q; + cin>>q; + while(q--) + { + int n,t; + cin>>n>>t; + int a[n],b[n]; + for(int i=0;i>a[i]; + } + for(int i=0;i>b[i]; + } + int ent=0; + int index=-1; + for(int i=0;ient) + { + ent=b[i]; + index=i+1; + } + } + } + cout< +#include +using namespace std; +int main() +{ + string s; + cin>>s; + int flag1=0,flag2=0,flag3=0; + if(s.length()>=5) + { + for(int i=0;i='A' && s[i]<='Z' && flag1==0) + { + flag1=1; + } + else if(s[i]>='a' && s[i]<='z' && flag2==0) + { + flag2=1; + } + else if(s[i]>='0' && s[i] <='9' && flag3==0) + { + flag3=1; + } + if(flag1==1 && flag2==1 && flag3==1) + break; + } + } + if(s.length()>4 && flag1==1 && flag2==1 && flag3==1) + cout<<"Correct"; + else + cout<<"Too weak"; + return 0; +} \ No newline at end of file diff --git a/977A Wrong Substraction/977A.cpp b/977A Wrong Substraction/977A.cpp new file mode 100644 index 0000000..6214bb8 --- /dev/null +++ b/977A Wrong Substraction/977A.cpp @@ -0,0 +1,13 @@ +#include +using namespace std; +int main() +{ + int n,k; + cin>>n>>k; + while(k--) + { + if(n%10==0) n=n/10; + else n=n-1; + } + cout<