E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
201809
ccf csp
201809
-2 买菜
核心代码用双指针的方式进行计算。#includeusingnamespacestd;classLoad{public:intstart;intend;};intmain(){intn;cin>>n;LoadH[n],W[n];for(inti=0;i>H[i].start>>H[i].end;}for(inti=0;i>W[i].start>>W[i].end;}inti=0,j=0;intres
大吉大利,今晚AC
·
2020-09-14 00:18
CCF
201809
-1 卖菜(水极了)
#include#includeusingnamespacestd;longa[1005],b[1005];intmain(){intn;cin>>n;for(inti=0;i>a[i];for(inti=0;i
末多末
·
2020-09-13 16:29
CCF
CCF
201809
-2 买菜(分类讨论)
#include#includeusingnamespacestd;longlonginta[2005],b[2005],c[2005],d[2005],T=0;intmain(){intn;cin>>n;for(inti=0;i>a[i]>>b[i];for(inti=0;i>c[i]>>d[i];for(inti=0;i=a[j]&&d[i]=a[j]&&c[i]=b[j])T+=b[j]-c
末多末
·
2020-09-13 16:29
CCF
CCF
201809
-2 买菜 (C++)
201809
-2买菜试题编号:
201809
-2试题名称:买菜时间限制:1.0s内存限制:256.0MB问题描述:解题过程此题直接暴力解即可。
D_din
·
2020-09-12 14:10
c++
算法
数据结构
c语言
csp
CCF
201809
-1 卖菜 (C++)
201809
-1卖菜试题编号:
201809
-1试题名称:卖菜时间限制:1.0s内存限制:256.0MB问题描述:解题过程直接按照题意编写即可。这里使用两个数组实现没有难度。
D_din
·
2020-09-12 14:10
数据结构
算法
c语言
c++
csp
CCF CSP
201809
-4 再卖菜
bfs+记忆化搜索(剪枝)#includeusingnamespacestd;constintN=310;inta[N],b[N],f[N][N][N],n;booldfs(intu){if(u==n+1){if((a[n-1]+a[n])/2==b[n])returntrue;returnfalse;}for(inti=0;i0&&!f[u][a[u]][a[u-1]]&&dfs(u+1))re
hbulzh
·
2020-09-12 13:17
CCF
DFS
CCF计算机软件能力认证试题练习:
201809
-3 元素选择器
元素选择器来源:CCF标签:参考资料:相似题目:题目输入样例115html..head....title..body....h1....p#subtitle....div#main......h2......p#one......div........p#twop#subtitleh3divpdivdivp输出样例369111602911111解题思路每个查询条件的最后一个标签(或id属性)是关键
wingrez
·
2020-09-12 09:35
【记录】算法题解
CCF-CSP
201809
-3 元素选择器
题目链接问题描述试题编号:
201809
-3试题名称:元素选择器时间限制:1.0s内存限制:256.0MB问题描述:id选择器和标签选择器的查询都比较简单,稍微麻烦的是后代选择器。
就算过了一载春秋
·
2020-09-12 09:46
∨∨CCF题解
CCF
201809
-3 2018年9月第三题元素选择器(C++ 100分题解)
CCF
201809
-32018年9月第三题元素选择器(C++100分题解)试题编号:3试题名称:元素选择器时间限制:1.0s内存限制:512.0MB提交后100分代码:这道题的大致思路:首先用stringstream
_抱一_
·
2020-09-12 09:41
ccf
csp认证
数据结构
c++
树结构
csp
正则表达式
CCF
201809
-3元素选择器(100分)
又是A了一天才A出来的题目,题目很长,可以去官网看,这里梳理一下题目细节。标签大小写不敏感,id敏感标签有层级之分(id也是)测试用例可能会查询第一层标签用例选择器有三种情况:标签选择器,id选择器,两者复合的后代选择器(重点!!!!)题目保证出现的标签和元素不会重复,且标签和元素内部没有空格前面三点的理解应该不难,大部分80分的人都能处理,问题出就出在复合选择器上,我们看一下题目原文:这里让人产
殇尘
·
2020-09-12 09:54
CCF
201809
-3 元素选择器 Python 递归实现 dfs 100分
思路:这是一个树,可以类比数据结构中的二叉树。二叉树有一个值(val),和不超过两个叶子节点这个html树可能有多个值,id属性和标签属性(div/p/h1这些),可能有多个节点题目描述:可能出现div#one这种复合的后代选择器于是我想直接用python嵌套的字典来完成一:节点的表示:每个节点用dict表示,每个节点的关键属性是,dict['idTag']id,dict['value']标签属性
abvd4
·
2020-09-12 09:21
简单的算法
ccf
201809
-3 元素选择器(100分)
本题的难点在于后代选择器,保存每个结点的前驱,例如A,B,C先判断本身是否满足C,再向上推,看是否满足B,A。提交后得100分的C++程序如下:#include#include#include#includeusingnamespacestd;intmain(){intn,m;intprior[105];//记录每个点的前驱cin>>n>>m;stringstr[105];stringbiaoq[
jinduo16
·
2020-09-12 09:00
ccf
python ccf题解
201809
-2 买菜
问题描述试题编号:
201809
-2试题名称:买菜时间限制:1.0s内存限制:256.0MB问题描述:问题描述小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车
SL_logR
·
2020-09-12 08:49
python
ccf
CCF
201809
-3 2018年9月第三题元素选择器(python 100分题解)
问题描述试题编号:3试题名称:元素选择器时间限制:10.0s内存限制:512.0MB问题描述:提交后100分代码:注意标签选择器大小写不敏感,匹配时都转成小写,id选择器大小写敏感直接匹配#元素选择器#输入n,m=map(int,input().split())doc=[]sel=[]#结构化文档内容foriinrange(n):doc.append(input())#带查询的选择器foriinr
SL_logR
·
2020-09-12 08:58
python
ccf
记一次IO异常捕获的过程
1,采集系统IO,确认IO异常发生在系统盘,还是数据盘,使用系统自带的iostat即可采集#iostat-d3-k-x-t3006/12/
201809
:52:33AMDevice:rrqm/swrqm/
weixin_34234829
·
2020-08-26 22:57
201809
-3 元素选择器
元素选择器题目描述解题思路定义node,里面有他的id,和他的标签,还有他的缩进。由于标签大小写不敏感,那就全部转换成小写如果没有标签那么就把标签置为空查询的时候分成两个,是否是后代选择器;如果不是的话,判断是不是标签查询,如果是标签查询(标签查询大小写不敏感)转换成全小写进行匹配如果是后代选择器,用map存下来所有的标签和id,然后进行匹配#include#include#include#inc
GuaXX
·
2020-08-25 17:30
CCF
201809
-2 买菜(C++)
注意事项:理清可以谈话的五种情况,代码写得简洁最好。#include#include#includeusingnamespacestd;inta[2001];intb[2001];intc[2001];intd[2001];intmain(){intn,s=0;cin>>n;for(inti=0;i>a[i]>>b[i];}for(inti=0;i>c[i]>>d[i];}for(inti=0;i
你像月亮。
·
2020-08-25 11:12
CCF
Django项目运行时出现self.status.split(‘ ‘,1)[0], self.bytes_sent,ConnectionAbortedError: [WinError 10053] 你
1[02/Nov/
201809
:46:51]"GET/new_industry/categoryHTTP/1.1"20028917922Traceback(mostrecentcalllast):3File"C
SpringBears
·
2020-08-25 06:55
Django
201809
月度检视
图片发自App1.运动达人:跑步次数:8次共计52.85公里,达到R️4级别图片发自App这也是我今年9月第一次跑了这么多,希望10月能跑出15次超过100公里,达到R5级别。2.健康:早睡/早起次数:18/30次,图片发自App3.学习:看书一本《哈佛大学凌晨四点半》,聆听时间管理100讲十穷爸爸富爸爸十每周大卡高效能人士分享!4、减肥达人:️饮食3333原则十睡眠质量十运动。从9月1日到11月
小不点磁铁
·
2020-08-24 07:10
【CSP模拟测试】
201809
-3元素选择器
题意:解题思路:(这个题的长度我是服气的哈,看了快半个小时)这里采用树来存储文档结构信息,可以根据输入顺序对文档结构树进行先序遍历,再根据选择器的查找方式可以确定使用树的双亲表示法的存储结构就已经能满足查找要求。将一行文档结构信息视为树的一个结点信息(后文的文档结构信息简称为结点信息),所有的结点用一个向量或数组来保存。定义结点类型。一个结点应至少记录以下信息:元素(标签)、属性和父结点在向量中的
X_7.....
·
2020-08-24 04:01
CSP模测
week15——实验(月模拟题4:CSP
201809
03)
目录元素选择器:问题描述题目简述问题分析解题思路参考代码心得体会元素选择器:问题描述题目简述问题分析解题思路本题要求实现3个不同类型的html元素选择器。实际上,通过分析可以发现,这三种选择器可以统一成一种情况,因为如果将“#”看成匹配的一部分的话,标签选择器和id选择器是一样的,而后代选择器,相当于一次选取多个有包含顺序的标签,因此,其本质上是一个标签选择器。因此,这三种选择器用一种方法即可实现
saika2k
·
2020-08-24 02:23
第四次月模拟题-
201809
-3
题目分析:本题很绕,但是关键的部分非常简洁,实际上就是对应的查找字符而已,只不过复杂一点的是可能会有分级,这样我们就要用一个树结构来储存,首先我们先要定义一个结构题,包含标签、名字。前面的点(因为这些点是要输入的,所以单独处理,而且这些点的数目也能体现所在的层次)还有它的父母(确定是在第几层)。structtree{stringtag;stringname;intdots;tree*parent;
Carbonium14
·
2020-08-24 00:20
gnu
prototype
数据结构
第四道月模csp
201809
-3 元素选择器
题目背景题目描述输入输出InputOutputSampleInputSampleOutput数据规模和约定思路分析根据题意,创建element结构体,新建element类型数组e[],用来存储结构化文档中的元素。从主函数入手,实现输入输出。输入有两部分:结构化文档和选择器。读入结构化文档时由于有属性会出现空格,所以使用getline函数直接读入一整行的数据,读入后再用split函数进行分割。spl
Sharon Li
·
2020-08-23 23:55
redis中关于使用string类型还是hash类型
例:p2d20180901-3、p2d20180902-4、p2d20180903-2...p2d20180901-10合并成p2d
201809
-$value,有两种方案。
weixin_30838873
·
2020-08-23 14:46
csp
201809
-2 买菜 使用桶
看了其他大佬们的答案很多是用的求重叠区间的方法,一开始我也想用这个方法但是奈何我太菜了没写明白…转念一想这种题可以好像可以用桶(因为和数组下标有关),用桶可以模拟出两个坐标轴,于是用桶简单粗暴地ac了(并没有,前两次因为没有注意aibicidi的取值只得了50分…)下面说一下我的思路其实原理就是用桶模拟出两个人的时间轴,让[ai,bi)这段数组的值为1(注意这个区间是左闭右开,这样才能模拟出时间的
wildg00se
·
2020-08-23 03:13
算法笔记
kettle国内镜像下载
20Integration/8.2版本http://mirror.bit.edu.cn/pentaho/Pentaho%208.2/client-tools/pdi-ce-8.2.0.0-342.zip15-Nov-
201809
嘿呀嘿呀 拔罗卜
·
2020-08-22 14:30
安装
科大讯飞
201809
笔试编程题
很菜。只做起了一道,现在把第二道写起了,分享出来,我自测了一些案例,进不了科大讯飞,但是这个周五下午学了很多小知识点。修改成绩时间限制:C/C++语言1000MS;其他语言3000MS内存限制:C/C++语言65536KB;其他语言589824KB题目描述:华老师的n个学生参加了一次模拟测验,考出来的分数很糟糕,但是华老师可以将成绩修改为[0,100]中的任意值,所以他想知道,如果要使所有人的成绩
胡二摩斯
·
2020-08-18 16:04
java学习
移植u-boot-2018.09到OK6410 (4) --- 完结篇
到今天,移植uboot-
201809
的进展总算达到了我的预期目标。
Golden_Chen
·
2020-08-18 13:13
uboot移植
CCF2018-9题解后续代码篇
第一题问题描述试题编号:
201809
-
EW_DUST
·
2020-08-18 09:39
CCF
CSP
201809
-4 再卖菜
dfs的时候注意记忆化搜索,不然会T掉只有80分。记忆化搜索的时候保存一个数组fi,j,kf_{i,j,k}fi,j,k保存填第iii天时,前两天所填的数字有没有被搜索过#include#includeconstintMAXN=300+5;intn,cnt;inta[MAXN],b[MAXN];boolf[MAXN][MAXN][MAXN];boolcheck(){for(inti=1;in){i
x_shuai
·
2020-08-18 06:25
CCF CSP
201809
-4 再卖菜
思路:1.设ai是第一天第i家店的菜价,bi是第二天第i家店的菜价;2.根据题意有:a2=2b1-a1+k(k=0,1)ai+1=3bi-ai-1-ai+k(k=0,1,2;1usingnamespacestd;#defineisOp(x,y)((x^y)>1)==s_2[n])s_1[n]=p;return;}s_1[index]=p;if(index==1){for(inti=0;i>n;rp
Yuhan の Blog
·
2020-08-18 02:36
CCF
CSP
CCF CSP真题——
201809
T3 元素选择器
题目概述原题连接输入样例115html..head....title..body....h1....p#subtitle....div#main......h2......p#one......div........p#twop#subtitleh3divpdivdivp输出样例369111602911111思路概述CSP真题中一道T3的题目,也就是大模拟。题目也的确符合大模拟一贯的风格,背景比较
XianXIANYUe123
·
2020-08-18 02:43
CSP精进之路
CCF-CSP
201809
-4再卖菜(记忆化搜索)
CCF-CSP
201809
-4再卖菜(记忆化搜索)本文参考迷你之忍的文章:ccf再卖菜试题编号:
201809
-4试题名称:再卖菜时间限制:1.0s内存限制:256.0MB问题描述:在一条街上有n个卖菜的商店
碧龗
·
2020-08-18 01:42
#
CCF-CSP
[csp-
201809
-4]再卖菜 差分约束or记忆化搜索
[csp-
201809
-4]再卖菜差分约束or记忆化搜索先更新第一个做法:差分约束转化成最长路,求出的每一个解是满足差分方程的最小值spfa求最短路对于边(x->y)有:1if(dis[y]>dis[x
KonjakJuruo
·
2020-08-18 00:59
CSP
201809
-4 再卖菜
目录CSP
201809
-4再卖菜60分dfs100分建立差分约束系统CSP
201809
-4再卖菜这场打完就忘记了。
aihuiju2691
·
2020-08-17 21:58
csp
201809
-3 元素选择器
题意:思路:这道题的解决应该分为建树+查找两部分。关于建树,为了方便后代选择器的查找,采用儿子记录父节点的方法,即每个节点记录自己的父节点位置。采用数组描述这棵树,每行的信息都在数组对应的位置上,关于每行信息,采用结构体描述structElement{stringlabel;stringid;intfather;//代表父节点位置intceng;//小数点的个数除2}label是标签信息,id如果
FoxMakarov
·
2020-08-17 19:11
CSP-
201809
-3元素选择器
CSP-
201809
-3元素选择器题目链接:http://118.190.20.162/view.page?
QiaoSu001
·
2020-08-17 11:48
程序设计思维与实践
国家授时中心标准时间NTP服务器IP
公告地址:http://www.ntsc.ac.cn/shye/tzgg/
201809
/t20180921_5086032.html国家授时中心NTP服务器域名地址:ntp.ntsc.ac.cn今天发现电脑上时间和实际差了
mi2006
·
2020-08-16 17:04
运维
ccf
201809
-2买菜
试题编号:
201809
-2试题名称:买菜时间限制:1.0s内存限制:256.0MB问题描述:问题描述小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车
PolarisYxh
·
2020-08-16 04:58
mysql 分区
PARTITIONP201807VALUESLESSTHAN(TO_DAYS(20180801)),PARTITIONP201808VALUESLESSTHAN(TO_DAYS(20180901)),PARTITIONP
201809
VALUESLESSTHA
宋佩哲
·
2020-08-14 10:50
数据库
Oracle 11g RAC实例INTERMEDIATE Stuck Archiver状态解决
报没有监听,然后查看监听状态:rac1:/home/oracle@grid>lsnrctlstatusLSNRCTLforLinux:Version11.2.0.4.0-Productionon02-5月-
201809
cuanzhen8885
·
2020-08-14 10:12
CCF-
201809
-2-买菜
CCF-
201809
-2-买菜问题描述试题编号:
201809
-2试题名称:买菜时间限制:1.0s内存限制:256.0MB问题描述:问题描述小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为
suxiaorui
·
2020-08-12 12:29
CCF
C++
CCF
201809
-1 卖菜 (python语言)
试题编号:
201809
-1试题名称:卖菜时间限制:1.0s内存限制:256.0MB问题描述:问题描述在一条街上有n个卖菜的商店,按1至n的顺序排成一排,这些商店都卖一种蔬菜。
SoftwareZhen
·
2020-08-12 00:22
CCF
ccf
python
CSP
201809
-2 买菜 暴力求解
201809
-2买菜开1000000大数组全局变量:放在全局静态区intarray[1000000];动态分配:放在堆上int*array=newint[1000000];MyAnswer#include
_lizi_
·
2020-08-11 22:32
#
CSP第二题
2018 9月 csp认证 第四题 再卖菜 (差分约束)
试题编号:
201809
-4试题名称:再卖菜时间限制:1.0s内存限制:256.0MB问题描述:问题描述在一条街上有n个卖菜的商店,按1至n的顺序排成一排,这些商店都卖一种蔬菜。
_leon1999
·
2020-08-11 04:41
差分约束
CCF CSP
201809
-4 再卖菜【DFS、差分约束系统(SPFA)】
题目链接70分解法(DFS)枚举每一个商店的菜价时判断是否满足题目要求如果(d1[s−2]+d1[s−1]+d1[s])/3#includeusingnamespacestd;intn,d1[310],d2[310];voiddfs(ints){//递归终点if(s>n){if((d1[n-1]+d1[n])/2==d2[n]){//只check最后一个,因为保证了中间合法for(inti=1;i
AristotleSDU
·
2020-08-11 00:24
CCF
CSP
认证
【CCF
201809
-3】元素选择器
思路①处理每一行:每一行都处理为一个结构体,包含3个属性:级别(rank)、元素名称(element)、id名称级别=点的数量/2元素名称&id名称都可以通过字符串处理获得,若无ID则为空注意将元素名转为小写②处理树的结构:对于每一个结点v,找到它的前驱结点u,即向上找到第一个u.rank=v.rank-1③处理查询:利用stringstream将几个单词储存进vector,元素名称全部改为小写1
Salmon_lee
·
2020-08-10 17:40
CCF-CSP
CCF-CSP
往年真题
题解
Tomcat 8.5.29启动报TldScanner.scanJars错误问题解决办法
Tomcat8.5.29启动过程中的错误信息:16-Mar-
201809
:28:45.505信息[RMITCPConnection(3)-127.0.0.1]org.apache.jasper.servlet.TldScanner.scanJarsAtleastoneJARwasscannedforTLDsyetcontainednoTLDs.Enabledebugloggingforthislo
weixin_33758863
·
2020-08-10 02:34
试题编号:
201809
-2 试题名称: 买菜
今天学校组织CCF培训,因为学校毕业需要什么分,要150分以上才行,虽然我200分过了,不过谁不想在高一些呢?反正学校给两次免费认证的机会。以下代码为海贼科技——胡船长培训所给代码(我认证时写的太麻烦了·····真的对算法好的人好生羡慕,我的代码就不拿出来班门弄斧了)#include#defineMAX_N1000005inta[1000005]={0};intmain(){intn;scanf(
lhbat
·
2020-08-08 19:12
CSP认证刷题
CCF计算机软件能力认证试题练习:
201809
-2 买菜
买菜来源:CCF标签:参考资料:相似题目:题目小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车,两人都要买n种菜,所以也都要装n次车。具体的,对于小H来说有n个不相交的时间段[a1,b1],[a2,b2]…[an,bn]在装车,对于小W来说有n个不相交的时间段[c1,d1],[c2,d2]…[cn,dn]在装车。其中,一个时间段[s,t
wingrez
·
2020-08-05 22:22
【记录】算法题解
上一页
1
2
3
4
5
6
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他