ICode9

精准搜索请尝试: 精确搜索
  • 512 分解质因数 唯一分解定理 试除法2022-09-13 00:04:28

    视频链接:  Luogu P2043 质因子分解 #include <iostream> #include <cstring> #include <algorithm> using namespace std; int n; int a[10001]; //质因子的个数 void decompose(int x){ //分解质因数 for(int i=2; i*i<=x; i++) while(x%i==0) a[i]++, x/=i; if

  • DP专题2022-06-23 08:00:38

    Find More Coins (30) Link 01背包问题 #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include <string.h> #include <vector> #include <cmath> using namespace std; in

  • MDX维度剔除多个子维度2022-06-15 13:34:03

    剔除科室中科室代码为’10000‘,‘10001’,‘10002’的科室 Except( [科室].[明细科室].children, { [科室].[明细科室].&[10000],[科室].[明细科室].&[10001],[科室].[明细科室].&[10002]} ) )     

  • 洛谷 P1076寻宝题解--zhengjun2022-06-10 20:01:10

    题面传送门 思路 首先,一看就是一道模拟,然后这个是暴力代码(50分) #include<bits/stdc++.h> using namespace std; int n,m,x; int a[10001][101],b[10001][101],c[10001]; int main(){ scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) for(int j=0;j<m;j++) scanf(&q

  • 1110:查找特定的值2022-05-22 18:01:02

        #include<iostream> #include<cstring> using namespace std; int main() { int n,x; int a[10001]; int i; int flag=0; cin>>n; for(i=1; i<=n; i++) cin>>a[i]; cin>>x; for(i=1; i&l

  • P1510 精卫填海 题解2022-03-21 07:35:12

    P1510 精卫填海 #include<iostream> using namespace std; long long dp[45001]; int s[10001],t[10001]; int main() { int v,n,c; cin>>v>>n>>c; for (int i=1;i<=n;i++) { cin>>s[i]>>t[i]; } for (int i=1;i<=n;i++) {

  • P2613 【模板】有理数取余2022-02-25 21:03:41

    快速链接 原题链接题目大意输入格式输出格式数据范围解题思路上代码 原题链接 P2613 AC记录:Accepted 题目大意 给出一个有理数 c = a b

  • P1451 求细胞数量2022-02-23 20:59:50

    这题写之前,写一个good函数,判断x和y越不越界,然后四联通,标记。 代码: #include<bits/stdc++.h> using namespace std; int n,m; char mat[10001][10001]; int vis[10001][10001]; bool good(int x,int y) { if(x>=0&&x<n&&y>=0&&y<m&&!vis[x][y]

  • 信息学奥赛一本通评测系统P1338 最小函数值(minval)2022-02-10 23:58:10

    恭喜你看到了这篇题解,他会让你避开很多坑(新手推荐,大佬提些建议嘛) 当然,我不想让大佬像下面这道题中大佬一样。[AHOI2017/HNOI2017]大佬 - 洛谷https://www.luogu.com.cn/problem/P3724                                           

  • Hash常用操作2022-01-28 11:00:19

    Hash常用操作 hset key field value 存储一个哈希表key的键值 hsetnx key field value 存储一个不存在的哈希表key的键值 hmset key field1 value1 field2 value2 ... 在一个哈希表key中存储多个键值对 hget key field hmget key field1 field2 hlen key hdel key field1 field2..

  • 大盗阿福(线性DP)2022-01-22 23:03:21

    这题是关于线性DP 这题大意是:阿福偷东西,如果偷一家商店,则相邻两家不能偷,否则报警系统出发,w [ i ] 为偷能得到的价值。 那么我们就首先应该想如何写出递归式 我们首先假设阿福偷第 i 个商店,则第 i + 1 和 i - 1 个商店不能偷 我们就设二维 f 数组 ,f [ i ] [ 1 ] 为可以偷,f [ i

  • 铺地毯问题的求解2022-01-15 12:32:35

    题目描述 为了准备一个独特的颁奖典礼,组织者在会场的一片矩形区域(可看做是平面直角坐标系的第一象限)铺上一些矩形地毯。一共有 n 张地毯,编号从 1 到 n。现在将这些地毯按照编号从小到大的顺序平行于坐标轴先后铺设,后铺的地毯覆盖在前面已经铺好的地毯之上。 地毯铺设完成后,组织

  • 1.9编程基础之顺序查找 05 最大值和最小值的差2022-01-14 23:31:23

    http://noi.openjudge.cn/ch0109/05/ /* 1.9编程基础之顺序查找 05 最大值和最小值的差 http://noi.openjudge.cn/ch0109/05/ */ #include <bits/stdc++.h> using namespace std; int a[10000+10]; int main() { int m,max=-10001,min=10001; cin>>m; for(int i=1;i<=m

  • HENAU冬令营第一专题H - 字典序2022-01-10 14:03:02

    H - 字典序 给你两个不同的字符串,如果第一个字符串的字典序小于第二个字符串,则输出YES,如果第一个字符串的字典序大于第二个字符串,则输出NO。 Input 两行。第一行一个字符串,第二行一个字符串。保证字符串的长度不超过10000。保证两个字符串不完全相等。 Output 如果第一

  • Acwing第789题(数的范围)2022-01-08 12:08:54

    相关题目: 数的范围https://www.acwing.com/problem/content/791/ 解题思路: 暴力线性搜索,没有用到什么技巧。主要是分别设置了一个存放起始位置、终止位置的数组。利用该数出现次数来判断该数的起始位置和终止位置。 相关代码: #include<iostream> using namespace std; int s

  • java返回树状图节点数据2021-12-30 12:03:26

    前端需要实现设计如图:   后端设计返回的数据类型如下(数据量太大,省略部分数据): 1 {"code":0,"msg":null,"data":[{"sortName":"未知","sortCode":"-","parentCid":"","childrens":[]},{"sortName&

  • 把Espresso的源码编译出来了2021-12-28 23:33:11

    Input:.i 4.o 10000 10001 00010 00011 00100 10101 10110 00111 11000 11001 01010 01011 11100 11101 01110 01111 1 Output:1-1101-1--00 高档、专业: .i 16.o 400000000000000000 0000000000000000000000000000000000000000 ... 简单的例子可和这个对比:好懂的Quine-McCluske

  • mysql根据JSON字段内容查询数据2021-12-28 09:34:40

    原文:https://www.cnblogs.com/sensenh/p/15397864.html mysql5.7以上支持json的操作,以及增加了json存储类型一般数据库存储json类型的数据会用json类型或者text类型 表数据   使用 字段->’$.json属性’进行查询条件 select * from log where data->'$.id' = 142; 或 selec

  • 用Anaconda 配置GEE python环境2021-12-16 11:02:41

     之前参考吴老师的步骤,发现miniconda版配置环境时 默认安装python的版本是3.10的,所以恰好符合要求,就没有出现版本不匹配、jupyter 内核混乱的问题。根据我走过的坑,我发现python至少是3.8以上的,才没有那么多乱七八糟的问题。 首先安装anaconda,下载地址如下 Anaconda | Individual Editionhttps://www.a

  • 物品描述字符串处理:string.find和string.gsub使用2021-12-04 01:01:26

    【解析用逗号分割的物品描述字符串】 字符串格式:类型_id_数量 1 function Test3() 2 local str = "aa_10001_16,aa_10002_12,aa_10003_10" 3 local pattern = "((%w+)_(%d+)_(%d+)),?" 4 5 local entrys = {} 6 local index = 1 7 while true do 8

  • Redis相关命令以及持久化2021-12-03 22:59:02

    Redis Redis 是Remote Dictionary Service 的简称;也是远程字典服务; Redis 是内存数据库,KV数据库,数据结构数据库; Redis 应用非常广泛,如Twitter、暴雪娱乐、Github、Stack Overflow、腾讯、阿里巴巴、京东、华为、新浪微博等,很多中小型公司也在使用; Redis命令查看:http://redis.cn/

  • SQL60 统计salary的累计和running_total2021-11-19 13:01:06

    描述 按照salary的累计和running_total,其中running_total为前N个当前( to_date = '9999-01-01')员工的salary累计和,其他以此类推。 具体结果如下Demo展示。 drop table if exists `salaries` ; CREATE TABLE `salaries` (`emp_no` int(11) NOT NULL,`salary` int(11) NOT NULL,`f

  • SQL44 将id=5以及emp_no=10001的行数据替换成id=5以及emp_no=100052021-11-14 20:35:31

    描述 将id=5以及emp_no=10001的行数据替换成id=5以及emp_no=10005,其他数据保持不变,使用replace实现,直接使用update会报错。 CREATE TABLE titles_test (    id int(11) not null primary key,    emp_no  int(11) NOT NULL,    title  varchar(50) NOT 

  • 洛谷P1510 精卫填海(01背包)2021-11-05 19:00:32

    #include<bits/stdc++.h> using namespace std; int v,n,c; int dp[10001]; // 当体力为i时,所搬运的石头的最大体积 int w[10001],h[10001]; int main(){ int res = 0; cin >> v >> n >> c; for(int i = 1;i<=n;i++){ cin >> w[i] >> h[i];

  • 【牛客SQL】SQL44 将id=5以及emp_no=10001的行数据替换成id=5以及2021-10-29 10:30:21

    题目描述 将id=5以及emp_no=10001的行数据替换成id=5以及emp_no=10005,其他数据保持不变,使用replace实现,直接使用update会报错。 题解 运行时间:52ms 超过18.78% 用Mysql提交的代码 占用内存:7532KB 超过2.50%用Mysql提交的代码 REPLACE INTO titles_test VALUES (5, 10005, '

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有