上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: 笛卡尔积现象 原因:无有效连接条件 select * from beauty;#12 select * from boys;#4 SELECT NAME,boyname FROM boys,beauty;#12*4 #WHERE beauty.boyfriend_id =boys.id; 添加此行即 阅读全文
posted @ 2021-04-20 12:15 liv_vil 阅读(210) 评论(0) 推荐(0)
摘要: ##1.order 按升降序排序 SELECT * FROM employees ORDER BY salary ASC/DESC; #asc代表升序 desc代表降序 默认升序 按表达式排序 SELECT *,salary*12*(1+IFNULL(commission_pct,0)) 年薪 FR 阅读全文
posted @ 2021-04-18 20:44 liv_vil 阅读(1138) 评论(0) 推荐(1)
摘要: 1.查看当前所有的数据库 show databases; 2.打开指定的库 use 库名; use test; 3查看当前的库 select database(); 4.查看当前库的所有表 show tables; 5.查看其它库的所有表 show tables from 库名; show tabl 阅读全文
posted @ 2021-04-17 11:01 liv_vil 阅读(39) 评论(0) 推荐(0)
摘要: 1.数据库的好处: ①实现数据持久化 数组与集合存储在 内存 中, 一断电就没了 ②使用完整的管理系统统一管理,易于查询 文件虽然能持久,但不好查 比如我想在交通工具图片里查找 红色的 三厢的 汽车 2. DB 数据库( database ):存储数据的“仓库”。它保存了一系列有组织的数据。 DBM 阅读全文
posted @ 2021-04-02 10:59 liv_vil 阅读(114) 评论(0) 推荐(0)
摘要: ##static ###用处 设计类 必须new对象 系统才分配内存 static创建的类变量、类方法 可以不创建对象直接使用 希望某些数据在内存里独一份 ###使用限制 仅用于 属性 方法 内部类 代码块 ###类变量 所有实例共享 如全体中国人的nationality 应该为static Str 阅读全文
posted @ 2021-03-19 20:50 liv_vil 阅读(53) 评论(0) 推荐(0)
摘要: https://codeforces.com/problemset/problem/1497/C2 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <utility> #in 阅读全文
posted @ 2021-03-18 08:58 liv_vil 阅读(69) 评论(0) 推荐(0)
摘要: http://codeforces.com/contest/1490/problem/F unordered_map会超时? #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include 阅读全文
posted @ 2021-03-16 08:17 liv_vil 阅读(46) 评论(0) 推荐(0)
摘要: https://codeforces.com/problemset/problem/1487/D #include <iostream> #include <cstring> #include <vector> #include <algorithm> #include <cmath> using 阅读全文
posted @ 2021-03-15 22:15 liv_vil 阅读(49) 评论(0) 推荐(0)
摘要: https://codeforces.com/problemset/problem/1492/C 求出t中每个字母尽量往最左和最右的位置 #include <iostream> #include <cstring> #include <vector> #include <algorithm> usi 阅读全文
posted @ 2021-03-15 17:37 liv_vil 阅读(48) 评论(0) 推荐(0)
摘要: https://codeforces.com/contest/1491/problem/C 从前往后做,当S[i]不为1时 把它变为1 用cnt[]记下它走到其他位置的次数 cnt[i]是指之前从1~i-1位置所有踩到i位置上的次数 如果S[i]不为1 :将S[i]减成1 要从i这里开始走max(1 阅读全文
posted @ 2021-03-14 19:21 liv_vil 阅读(160) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 下一页