253A - Boys and Girls
- 253A - Boys and Girls
- #include<bits/stdc++.h>
- typedef long long int ll;
-
- using namespace std;
- int main()
- {
-
-
- freopen("input.txt","r",stdin);
- freopen("output.txt","w",stdout);
-
- int n=0,m=0,i;
- scanf("%d %d",&n,&m);
-
-
- if(n>m){
- for( i=0;i<m;i++){
- printf("BG");
- }
-
- for( i=0;i<n-m;i++)
- printf("B");
- }
- else{
- for( i=0;i<n;i++){
- printf("GB");
- }
- for( i=0;i<m-n;i++)
- printf("G");
- }
-
- }
Comments
Post a Comment