摘要: Throwable 是所有 Java 程序中错误处理的父类 ,有两种子类: Error 和 Exception 。 Error :表示由 JVM 所侦测到的无法预期的错误,由于这是属于 JVM 层次的严重错误 ,导致 JVM 无法继续执行,因此,这是不可捕捉到的,无法采取任何恢复的操作,顶多只能显示 阅读全文
posted @ 2020-11-05 15:20 王杰森 阅读(59) 评论(0) 推荐(0) 编辑
摘要: //整数的散列//m个数在n个数中是否出现过的散列 #include<cstdio> using namespace std; int const Maxn = 100010; bool hashTable[Maxn] = {false}; int main(){ int n,m,x;//x表示出现 阅读全文
posted @ 2020-05-19 21:05 王杰森 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm>//这是sort函数所在的库 4 using namespace std; 5 struct Student{ 6 char id[15]; //id 7 int score 阅读全文
posted @ 2020-05-19 20:33 王杰森 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 选择排序,时间复杂度 O(n^2), 下面要注意c语言传参入数组传入的是地址!,所以用sizeof求数组大小的时候,在自定义函数中求出来的sizeof(arr)就是指针的大小,为4;64位系统的话是8; 所以要在main函数中传入自定义方法给数组大小 1 #include <stdio.h> 2 # 阅读全文
posted @ 2020-05-14 14:43 王杰森 阅读(174) 评论(0) 推荐(0) 编辑
摘要: //B1032 挖掘机技术哪家强 1 #include <stdio.h> 2 const int maxn = 100001; 3 int school[maxn] = {0};//定义大型数组要在main函数外部,避免消耗系统栈 4 int main(){ 5 int n; 6 int schI 阅读全文
posted @ 2020-05-09 17:10 王杰森 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 抖音超火的相册源码,把12张照片按名字1-12,以jpg格式存入img文件夹即可 用网页打开index,html文件. 已提供下载,欢迎下载 下载链接: https://files.cnblogs.com/files/Jason-LinkStart/%E6%8A%96%E9%9F%B3%E7%9B% 阅读全文
posted @ 2020-01-02 00:54 王杰森 阅读(1907) 评论(0) 推荐(0) 编辑
摘要: 牛客网20分通过,PAT平台18分,有一个测试点未通过,不知错误点,有待改进! import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scan 阅读全文
posted @ 2019-12-31 03:35 王杰森 阅读(330) 评论(0) 推荐(0) 编辑
摘要: p=str.maketrans("abcde","12345") print("hehe.aabbec".translate(p)) 输出结果为 h5h5,112253 即上方两个字符串种字符一一对应替换,字符串长度需要相等,否则报错 阅读全文
posted @ 2018-07-23 11:56 王杰森 阅读(183) 评论(0) 推荐(0) 编辑