#include <stdio.h>
int main(){
int n, p=0, m=0 ;
scanf("%d", &n);
int tamanhos[n];
for(int i=0; i<n; i++){
scanf("%d", &tamanhos[i]);
if(tamanhos[i]==1){
p++;
}
else{
m++;
}
}
int quantp, quantm;
scanf("%d", &quantp);
scanf("%d", &quantm);
if(p<=quantp && m<=quantm)
printf("S");
else
printf("N");
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: