3049_java
2011年03月01日
import java.io.*;
import java.util.*;
public class Main {
static final int N = 20;
static int n,l;
static String ans;
static char word[] = new char[N];
static char ansp[] = new char[N];
public static void main(String []args)throws Exception{
int i;
String str;
//Scanner cin = new Scanner(new FileInputStream("input.txt"));
Scanner cin = new Scanner(System.in);
l = cin.nextInt();
n = cin.nextInt();
for(i=0;i=l){
if(!have) return ;
for(i=0;i< dept;++i)
System.out.print(ansp[i]);
System.out.println("");
return ;
}
for(i=start;i< n;++i){
ansp[dept] = word[i];
if(word[i]=='a' || word[i]=='e'||word[i]=='i'||word[i]=='o'||word[i]= ='u'){
dfs(i+1,dept+1,have|true);
}
else dfs(i+1,dept+1,have);
}
}
}
2011年03月01日
import java.io.*;
import java.util.*;
public class Main {
static final int N = 20;
static int n,l;
static String ans;
static char word[] = new char[N];
static char ansp[] = new char[N];
public static void main(String []args)throws Exception{
int i;
String str;
//Scanner cin = new Scanner(new FileInputStream("input.txt"));
Scanner cin = new Scanner(System.in);
l = cin.nextInt();
n = cin.nextInt();
for(i=0;i=l){
if(!have) return ;
for(i=0;i< dept;++i)
System.out.print(ansp[i]);
System.out.println("");
return ;
}
for(i=start;i< n;++i){
ansp[dept] = word[i];
if(word[i]=='a' || word[i]=='e'||word[i]=='i'||word[i]=='o'||word[i]= ='u'){
dfs(i+1,dept+1,have|true);
}
else dfs(i+1,dept+1,have);
}
}
}