Oops Io Level 3
Oops Io Level 3
Oops Io Level 3
h>
int main()
int k,n,i,j,count,l=0;
char str1[101][101],str2[101][101];
char ch[100];
cin>>k;
for(i=0;i<k;i++)
cin>>str1[i];
cin>>n;
i=0;
while(i++!=n) {
scanf("%s",str2[i]);
for(j=0;j<k;j++)
if(!strcmp(str2[i],str1[j]))
count++;
if(!count)
ch[l++]=(toupper(str2[i][0]));
count=0;
for(i=0;i<l;i++)
if(i!=(l-1))
cout<<ch[i]<<".";
else
cout<<ch[i];
return 0;
#include <iostream>
int main()
int t;
cin>>t;
while(t--)
int n,b,i,sum=0;
cin>>n>>b;
int a[n];
for(i=0;i<n;i++){
cin>>a[i];
sum+=a[i];
if(sum>b){
cout<<"YES\n";
else{
cout<<"NO\n";
return 0;
#include<iostream>
int main()
{
int t,n,c=0,i,j,k=0,q,qq[10];
cin>>t;
while(t--){
cin>>n;
for(i=0;i<n;i++)
cin>>arr[i];
q=0;
for(i=0;i<n-1;i++){
q++;
if(arr[i]!=arr[i+1]){
qq[c]=q;
a[c]=arr[i];
c++;
q=0;
a[c]=arr[n-1];
c++;
q=0;
for(i=0;i<c;i++){
for(j=i+1;j<c;j++){
if(a[i]==a[j])
k++;
for(j=i+1;j<c;j++){
if(qq[i]==qq[j]) q++;
if(k==0&&q==0) cout<<"YES\n";
else cout<<"NO\n";
} return 0; }
#include <iostream>
#include<iomanip>
int main()
float height,bmi;
int weight;
cin>>weight;
cin>>height;
bmi=weight/(height*height);
cout<<fixed<<setprecision(2)<<bmi;
return 0;
}
#include <iostream>
#include<cstring>
int main()
char para[100000];
int t,n,task=0,i;
cin>>t;
while(t>0){
cin>>para;
n=strlen(para);
//cout<<n;
for(i=0;i<n/2;i++){
if(n%2!=0){
cout<<"Not Balanced\n";
task=1;
break;
}
if(para[i]=='{'&¶[n-i-1]=='}'){
task=0;
else if(para[i]=='('&¶[n-i-1]==')'){
task=0;
else if(para[i]=='['&¶[n-i-1]==']'){
task=0;
else{
cout<<"Not Balanced\n";
task=1;
break;
if(task==0){
cout<<"Balanced\n";
task=0;
t--;
return 0;
}
#include<bits/stdc++.h>
int main()
cin>>t;
while(t--){
char N[100001];
cin>>N;
len = strlen(N);
for(i=0;i<len;i++){
flag=0;
flag =0;
flag =0;
}
if(flag==0)
cout<<"no\n";
else
cout<<"yes\n";
return 0;
#include <iostream>
#include<iomanip>
int main()
int mpg;
float lph;
cin>>mpg;
lph=235.215/(float)mpg;
return 0;
#include <iostream>
int main()
int D,Oc,Of,Od,Fs,Fb,Fm,Fd;
cin>>D;
cin>>Oc>>Of>>Od>>Fs>>Fb>>Fm>>Fd;
int cost1,cost2;
cost1=(Oc+(D-Of)*Od);
cost2=(D/Fs*60)*Fm+D*Fd+Fb;
if(cost1<cost2)
cout<<"OLA Taxi";
else if(cost1==cost2)
cout<<"OLA Taxi";
else
cout<<"Fastrack Taxi";
return 0;
#include <iostream>
int main()
int firstnum,secondnum;
cin>>firstnum>>secondnum;
cout<<firstnum--<<" "<<++secondnum<<endl;
cout<<firstnum++<<" "<<--secondnum<<endl;
cout<<firstnum--<<" "<<++secondnum<<endl;
cout<<firstnum++<<" "<<--secondnum<<endl;
cout<<firstnum<<" "<<++secondnum;
return 0;
#include<iostream>
int main()
int n,b,s,k,i;
cin>>n>>b>>s;
for(i=0;i<s;i++){
k=n%(b+1);
cout<<k<<" ";
n=n/(b+1);
}
while(n>0){}
return 0;