- 博客(212)
- 收藏
- 关注
原创 树形显示
import java.util.*;class MyTree{ private Map<String, List<String>> map_ch = new HashMap<String, List<String>>(); private Map<String,String> map_pa = new HashMap<String,String>(); public void add(String .
2020-11-06 14:27:54
697
原创 平方十位数
public class Main { public static long max=-1; public static void main(String[] args) { int[] a = {0,1,2,3,4,5,6,7,8,9}; pullSort(a,0,10); System.out.println(max); } public static void pullSort(int[] a, int start, i.
2020-11-05 14:52:12
537
原创 打靶
public class Main{ static void f(int[] ta, int[] da, int k, int ho, int bu, int sc) { if(ho<0 || bu<0 || sc<0) return; if(k==ta.length){ if(ho>0 || bu>0 || sc>0) return; for(int i=0; i<.
2020-11-05 14:31:55
522
原创 反幻方
public class Main { public static int sum = 0; public static void main(String[] args) { int[] a = new int[9]; for (int i = 0; i < 9; i++) { a[i] = i+1; } pullSort(a,0,9); System.out.println(s.
2020-11-05 14:13:37
182
原创 愤怒小鸟
public class Main { public static void main(String[] args) { double l = 1000.0; int v = 10; int sum = 0; boolean k = true; double t = 0.0; while(true) { if(l<=1) break; .
2020-11-05 12:15:53
306
原创 穿越雷区
import java.util.Scanner;public class Main { public static int x1,y1,x2,y2; public static char[][] value; public static int[][] record; public static int min_step = 10000; public static int[][] next={{0,1},{0,-1},{1,0},{-1,0}}; .
2020-11-04 21:30:25
816
原创 显示二叉树
class BiTree{ private int v; private BiTree l; private BiTree r; public BiTree(int v){ this.v = v; } public void add(BiTree the){ if(the.v < v){ if(l==null) l = the; else l.add(the); .
2020-11-04 20:03:23
220
原创 五星填数
public class Main { public static int sum = 0; public static void main(String[] args) { int[] a = {1,2,3,4,5,6,8,9,10,12}; pullSort(a,0,10); System.out.println(sum/10); } public static void pullSort(int[] a, int..
2020-11-04 19:45:05
177
原创 分机号
public class Main { public static void main(String[] args) { int sum = 0; for (int i = 9; i >= 2; i--) { for (int j = i-1; j >= 1; j--) { for (int k = j-1; k >= 0; k--) { sum++;.
2020-10-31 22:29:33
249
原创 版本分支
import java.util.ArrayList;import java.util.List;import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int Q = scanner.nex.
2020-10-29 20:39:43
148
原创 全排列
// 轮换前k个,再递归处理import java.util.*;public class Main{ static void permu(char[] data, int cur){ if(cur==data.length-1){ System.out.println(new String(data)); return; } for(int i=cur; i<data.length; i.
2020-10-29 11:25:50
103
原创 最大乘积
public class Main { public static long max = 0; public static void main(String[] args) { int[] v = {1,2,3,4,5,6,7,8,9}; qpl(v,0,8); System.out.println(max); } public static void qpl(int[] v, int x, int y) { ..
2020-10-29 11:16:45
143
原创 三角形面积
import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double[] x = new double[3]; double[] y = new double[3]; for (int i = 0; i < 3; i++).
2020-10-28 22:34:10
125
原创 conda install和创建虚拟环境下载慢
运行代码:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channel_urls yes
2020-09-28 19:26:17
2799
原创 蓝桥杯模拟省赛(前8题)
题目1解决方法:((7! ) / 2)利用全排列思想和set集合去重复import java.util.HashSet;import java.util.Set;public class Main{ public static Set<String> strArr = new HashSet<>(); public static v...
2020-05-27 22:20:43
245
原创 13. 选出选修1号课程的不及格的学生以及缺考的学生的学号。
SELECT snoFROM scWHERE cno = '1'AND (grade < 60 OR grade IS NULL)
2020-05-14 12:00:38
2150
原创 12. 找出选修1号课程的不及格的学生的学号。(不包含缺考)
SELECT snoFROM scWHERE cno = '1'AND grade < 60
2020-05-14 11:59:58
1525
原创 11. 将学生的学号及平均成绩定义为一个视图(s_g),学号用sno表示,平均成绩用gavg表示。
CREATE VIEW s_g (sno, gavg) AS SELECT sno, AVG(grade)FROM scGROUP BY sno
2020-05-14 11:59:19
8981
1
原创 10. 建立信息系(IS)选修了1号课程的学生的视图(包括学号、姓名、成绩)
CREATE VIEW is_s(Sno, Sname, Grade) AS SELECT student.sno, sname, gradeFROM student, scWHERE student.sno = sc.snoAND sdept = 'IS'AND cno = '1'
2020-05-14 11:58:38
14742
原创 9. 建立信息系(IS)学生的视图(is_student),要求保留学号,姓名,年龄。
CREATE VIEW is_student AS SELECT sno, sname, sageFROM studentWHERE sdept = 'IS'
2020-05-14 11:57:50
10241
原创 8. 对每一个系,求学生的平均年龄,并把结果存入数据库中的新表dept_age(Sdept,Avg_age)中
INSERT INTO dept_age (Sdept, Avg_age) SELECT sdept, AVG(sage)FROM studentGROUP BY sdept
2020-05-14 11:57:06
11504
1
原创 7. 将学生201215121的年龄改为22岁
UPDATE studentSET sage = 22WHERE sno = '201215121'
2020-05-14 11:55:21
3302
原创 6. 将计算机科学系(CS)全体学生的成绩置零。
UPDATE scSET grade = 0WHERE sno IN ( SELECT sno FROM student WHERE sdept = 'CS' )
2020-05-14 11:54:37
9148
原创 5. 删除计算机科学系所有学生的选课记录。
DELETEFROM scWHERE sno IN ( SELECT sno FROM student WHERE sdept = 'CS' )
2020-05-14 11:53:36
20074
原创 2. 将一个新学生元组(学号:201215128;姓名:陈冬;性别:男;所在系:IS;年龄:18岁)插入到Student表中
INSERT INTO studentVALUES ( '201215128', '陈冬', '男', 18, 'IS' )
2020-05-14 11:51:21
5803
原创 1. 插入一条选课记录( '201215123','1 ')
INSERT INTO sc (sno, cno)VALUES ('201215123', '1')
2020-05-14 11:50:35
4351
原创 anaconda安装dlib库
前提准备安装好vs2017配置好cl.exeanaconda环境安装步骤配置cl.exe(1)建立系统环境LIB和INCLUDE(2)系统环境LIB下(3)系统环境INCLUDE下(4)检验配置情况(5)可以借鉴网站 https://blog.youkuaiyun.com/weixin_43997331/article/details/104764873?ops_request_misc=&request_id=&biz_id=102&utm_term=%E8%
2020-05-09 15:16:31
1012
原创 Windows下pip安装慢解决
借助镜像源格式: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple XXX pip install XXX -i https://pypi.tuna.tsinghua.edu.cn/simple镜像:清华源: -i https://pypi.tuna.tsinghua.edu.cn/simple 豆瓣源: -i https://pypi.douban.com/simple阿里源: -i http://mirrors
2020-05-09 14:46:18
177
原创 12. 查询每一门课的间接先修课(即先修课的先修课)
SELECT x.cno, y.cpnoFROM course x, course yWHERE x.cpno = y.cno
2020-05-07 11:56:54
28838
18
原创 11. 查询每个学生及其选修课程的情况,保留学生学号,姓名,课程号,课程名,成绩
SELECT student.sno, sname, course.cno, cname, gradeFROM student, course, scWHERE student.sno = sc.snoAND sc.cno = course.cno
2020-05-07 11:56:12
38251
6
原创 10. 查询选修了1号课程的学生及其选修课程的情况,保留学生学号,姓名,课程名,成绩
SELECT student.sno, sname, cname, gradeFROM student, course, scWHERE student.sno = sc.snoAND sc.cno = course.cnoAND course.cno = '1'
2020-05-07 11:55:27
9105
原创 9. 查询每个学生及其选修课程的情况,保留学生学号,姓名,课程号,成绩
SELECT student.sno, sname, cno, gradeFROM student, scWHERE student.sno = sc.sno
2020-05-07 11:54:45
11256
原创 8. 查询选修了全部课程的学生姓名
SELECT snameFROM studentWHERE NOT EXISTS ( SELECT * FROM course WHERE NOT EXISTS ( SELECT * FROM sc WHERE student.sno = sc.sno AND sc.cno = course....
2020-05-07 11:53:58
1315
原创 7. 查询与“刘晨”在同一个系学习的学生(学号,姓名,系)
SELECT sno, sname, sdeptFROM studentWHERE sdept = ( SELECT sdept FROM student WHERE sname = '刘晨' )
2020-05-07 11:53:07
21702
1
原创 6. 查询选修了课程名为“信息系统”的学生学号和姓名
SELECT student.sno, snameFROM student, course, scWHERE student.sno = sc.snoAND course.cno = sc.cnoAND course.cname = '信息系统'
2020-05-07 11:52:29
18519
原创 5. 找出每个学生超过他选修课程平均成绩的课程号。
SELECT sno, cnoFROM sc xWHERE grade > ( SELECT AVG(grade) FROM sc y WHERE x.sno = y.sno )
2020-05-07 11:51:29
17579
4
原创 4. 查询非计算机科学系中比计算机科学系任意一个学生年龄小的学生姓名和年龄
SELECT sname, sageFROM studentWHERE sage < ANY ( SELECT sage FROM student WHERE sdept = 'CS ' )AND sdept <> 'CS '
2020-05-07 11:50:38
8401
3
原创 3. 查询非计算机科学系中比计算机科学系所有学生年龄都小的学生姓名及年龄。
SELECT sname, sageFROM studentWHERE sage < ALL ( SELECT sage FROM student WHERE sdept = 'CS ' )AND sdept <> 'CS '
2020-05-07 11:49:08
11510
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人