摘要:
###1.插入排序 void insert_sort() { for (int i = 1; i < n; i ++ ) { int x = a[i]; int j = i-1; while (j >= 0 && x < a[j]) { a[j+1] = a[j]; j -- ; } a[j+1] 阅读全文
摘要:
###1. #include<bits/stdc++.h> using namespace std; int n, a[1005]; int main(){ cin >> n; for(int i = 1; i <= n; i ++) cin >> a[i]; sort(a + 1, a + 1 + 阅读全文
摘要:
//BF算法 #include <iostream> using namespace std; int BF(char S[], char T[]) { int index = 0, i = 0, j = 0; while (S[i] != '\0' && T[j] != '\0') { if (S 阅读全文
摘要:
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner (System.in); int n = sc.nextInt(); int [ 阅读全文
摘要:
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while 阅读全文
摘要:
判断数字n是不是质数 import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextIn 阅读全文