摘要:
import java.io.IOException;import java.util.Scanner;public class Sieve { static Scanner cin = new Scanner(System.in); public static void main(String[] args) { // We will compute all primes less than the value specified on the // command line, or, if no argument, all primes less than 100. int max ... 阅读全文
摘要:
/*以123的全排列为例:1 1232 1323 2314 2135 3126 321*//* 结果可以分为三部分:123 132; 213 231; 312 321; 对于123 132,去掉1后23可看作是其子问题*/import java.io.IOException;public class PermulateArray{ static int size; static int count=0; static char[] charArray; public static void main(String[] args)throws IOException{ String inpu.. 阅读全文