The 1 s command of the ultraviolet A 400 Unix System

Source: Internet
Author: User

/*

* Solution:

* Solution steps: Calculate the longest String Length-> sort strings-> except for the longest String Length in the last column, all other columns are the longest String Length + 2 (output this string, fill in spaces for deficiencies)

*/

#include 
 
  #include 
  
   #define A 110#define B 65char s[ A ][ B ];int cmp( const void *_a , const void *_b ){    char *a = (char *)_a;    char *b = (char *)_b;    return strcmp( a , b );}void Paint( int x ,int y ){    int i;    int len = strlen( s[ x ] );    printf("%s",s[ x ] );    for( i=len;i
   
    = n) continue;                if( j == c-1 )                    Paint( j*r+i , tmp );                else                    Paint( j*r+i , tmp+2 );            }            puts("");        }    }    return 0;}
   
  
 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.