70,020
社区成员




#include <stdio.h>
/*
Input:
10
move 9 onto 1
move 8 over 1
move 7 over 1
move 6 over 1
pile 8 over 6
pile 8 over 5
move 2 over 1
move 4 over 9
quit
*/
void moveAontoB( int a, int b ) { }
void moveAoverB( int a, int b ) { }
void pileAontoB( int a, int b ) { }
void pileAoverB( int a, int b ) { }
int main( )
{
int n, i, j;//Read the value: n | P.s. [ 0, n - 1 ] | 1 <= n && n <= 24; i, j are for loop;
scanf( "%d", &n );
char TempString[ 5 ];
short TempShort[ 2 ];
while( 1 ) {
scanf( "%s", TempString );
//Keyword1: m(o)ve; p(i)le; q(u)it;
//Keyword2: o(n)to; o(v)er;
if( TempString[ 1 ] == 'o' ){//Judge it 1"move"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) moveAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) moveAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'i' ){//Judge it 1"pile"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) pileAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) pileAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'u' ) break;//Judge it 1"quit"
else { }
}
//Output them
for( i = 0; i < n; i ++ ) {
printf( "%d:", i );
for( j = 0; j < 1; j ++ ) {}
printf( "\n" );
}
system( "PAUSE" );
}
#include <stdio.h>
/*
Input:
10
move 9 onto 1
move 8 over 1
move 7 over 1
move 6 over 1
pile 8 over 6
pile 8 over 5
move 2 over 1
move 4 over 9
quit
*/
void moveAontoB( int a, int b ) { }
void moveAoverB( int a, int b ) { }
void pileAontoB( int a, int b ) { }
void pileAoverB( int a, int b ) { }
int main( )
{
short n, i, j;//Read the value: n | P.s. [ 0, n - 1 ] | 1 <= n && n <= 24; i, j are for loop;
scanf( "%d", &n );
char TempString[ 5 ];
short TempShort[ 2 ];
while( 1 ) {
scanf( "%s", TempString );
//Keyword1: m(o)ve; p(i)le; q(u)it;
//Keyword2: o(n)to; o(v)er;
if( TempString[ 1 ] == 'o' ){//Judge it 1"move"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) moveAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) moveAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'i' ){//Judge it 1"pile"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) pileAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) pileAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'u' ) break;//Judge it 1"quit"
else { }
}
//Output them
for( i = 0; i < n; i ++ ) {
printf( "%d:", i );
for( j = 0; j < 1; j ++ ) {}
printf( "\n" );
}
system( "PAUSE" );
}
#include <stdio.h>
/*
Input:
10
move 9 onto 1
move 8 over 1
move 7 over 1
move 6 over 1
pile 8 over 6
pile 8 over 5
move 2 over 1
move 4 over 9
quit
*/
void moveAontoB( int a, int b ) { }
void moveAoverB( int a, int b ) { }
void pileAontoB( int a, int b ) { }
void pileAoverB( int a, int b ) { }
int n, i, j;//Read the value: n | P.s. [ 0, n - 1 ] | 1 <= n && n <= 24; i, j are for loop;
int main( )
{
scanf( "%d", &n );
char TempString[ 5 ];
short TempShort[ 2 ];
while( 1 ) {
scanf( "%s", TempString );
//Keyword1: m(o)ve; p(i)le; q(u)it;
//Keyword2: o(n)to; o(v)er;
if( TempString[ 1 ] == 'o' ){//Judge it 1"move"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) moveAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) moveAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'i' ){//Judge it 1"pile"
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
if( TempString[ 1 ] == 'n' ) pileAontoB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"onto"
else if( TempString[ 1 ] == 'v' ) pileAoverB( TempShort[ 0 ], TempShort[ 1 ] );//Judge it 2"over"
else { }
}
else if( TempString[ 1 ] == 'u' ) break;//Judge it 1"quit"
else { }
}
//Output them
for( i = 0; i < n; i ++ ) {
printf( "%d:", i );
for( j = 0; j < 1; j ++ ) {}
printf( "\n" );
}
system( "PAUSE" );
}
#include <stdio.h>
/*
Input:
10
move 9 onto 1
*/
void moveAontoB( int a, int b ) { }
void moveAoverB( int a, int b ) { }
void pileAontoB( int a, int b ) { }
void pileAoverB( int a, int b ) { }
int main( )
{
int n;//可以修改了!~解决
scanf( "%d", &n );
char TempString[ 5 ];
short TempShort[ 2 ];
scanf( "%s", TempString );
scanf( "%hd%s%hd", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
system( "PAUSE" );
return 0;
}
#include <stdio.h>
/*
Input:
10
move 9 onto 1
*/
int main( )
{
int n;//Read the value: n | P.s. [ 0, n - 1 ] | 1 <= n && n <= 24; i, j are for loop;
char TempString[ 5 ];
short TempShort[ 2 ];
scanf( "%d%s", &n, TempString );
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );//问题所在!!!
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
system( "PAUSE" );
return 0;
}
#include <stdio.h>
/*
Input:
10
move 9 onto 1
*/
void moveAontoB( int a, int b ) { }
void moveAoverB( int a, int b ) { }
void pileAontoB( int a, int b ) { }
void pileAoverB( int a, int b ) { }
int main( )
{
int n;//Read the value: n | P.s. [ 0, n - 1 ] | 1 <= n && n <= 24; i, j are for loop;
scanf( "%d", &n );
char TempString[ 5 ];
short TempShort[ 2 ];
scanf( "%s", TempString );
scanf( "%d%s%d", &TempShort[ 0 ], TempString, &TempShort[ 1 ] );
printf( "%d %s %d\n", TempShort[ 0 ], TempString, TempShort[ 1 ] );//TEST
system( "PAUSE" );
}