题目

链接:https://ac.nowcoder.com/acm/contest/28537/H
来源:牛客网

时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 262144K,其他语言524288K
64bit IO Format: %lld

题目描述

又到饭点了,SK同学靠着惯性走到了食堂,但长长的队伍顿时让他失去了食欲。突然,他注意到某个窗口前的队伍里明显存在插队的现象,于是他默默记录下了同学们进队和出队的变化。

对于进队,SK同学只知道队伍里多了一个人,并不知道新来的人是老老实实站到了队尾还是插到了队伍里的某个位置;对于出队,SK同学能确定是队伍里站在最前面的人出队了。

初始时队伍为空,给出n条队伍进出的信息,保证已经出队的同学不会再入队,并且最终队伍也为空,现在SK同学想知道有多少不插队的好同学。

输入描述:

第一行是一个正整数T(≤ 5),表示测试数据的组数, 对于每组测试数据, 第一行是一个整数n(1≤ n ≤ 100000),表示这个队伍进出的信息数, 接下来n行,每行是两个字符串Opt Name,其中Opt为"in"代表进队,"out"代表出队,Name为进队或出队的人的名字, 所有信息按照时间顺序给出,名字由英文字母和阿拉伯数字组成,长度不超过10,保证每个人的名字各不相同。

输出描述:

对于每组测试数据,输出一行,包含一个整数,表示不插队的人数。

示例1

输入

1
6
in quailty
in hwq1352249
out hwq1352249
in zhuaiballl
out quailty
out zhuaiballl

输出

2

题解

这道题目说实话感觉比较难

从以下分析入手:

#mermaid-svg-lbhoyhpuHWMy1dM6 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .label text{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .node rect,#mermaid-svg-lbhoyhpuHWMy1dM6 .node circle,#mermaid-svg-lbhoyhpuHWMy1dM6 .node ellipse,#mermaid-svg-lbhoyhpuHWMy1dM6 .node polygon,#mermaid-svg-lbhoyhpuHWMy1dM6 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-lbhoyhpuHWMy1dM6 .node .label{text-align:center;fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .node.clickable{cursor:pointer}#mermaid-svg-lbhoyhpuHWMy1dM6 .arrowheadPath{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-lbhoyhpuHWMy1dM6 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-lbhoyhpuHWMy1dM6 .edgeLabel rect{opacity:0.9}#mermaid-svg-lbhoyhpuHWMy1dM6 .edgeLabel span{color:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-lbhoyhpuHWMy1dM6 .cluster text{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-lbhoyhpuHWMy1dM6 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-lbhoyhpuHWMy1dM6 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .actor-line{stroke:grey}#mermaid-svg-lbhoyhpuHWMy1dM6 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .sequenceNumber{fill:#fff}#mermaid-svg-lbhoyhpuHWMy1dM6 #sequencenumber{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .messageText{fill:#333;stroke:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-lbhoyhpuHWMy1dM6 .labelText,#mermaid-svg-lbhoyhpuHWMy1dM6 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .loopText,#mermaid-svg-lbhoyhpuHWMy1dM6 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-lbhoyhpuHWMy1dM6 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-lbhoyhpuHWMy1dM6 .noteText,#mermaid-svg-lbhoyhpuHWMy1dM6 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-lbhoyhpuHWMy1dM6 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-lbhoyhpuHWMy1dM6 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-lbhoyhpuHWMy1dM6 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .section{stroke:none;opacity:0.2}#mermaid-svg-lbhoyhpuHWMy1dM6 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-lbhoyhpuHWMy1dM6 .section2{fill:#fff400}#mermaid-svg-lbhoyhpuHWMy1dM6 .section1,#mermaid-svg-lbhoyhpuHWMy1dM6 .section3{fill:#fff;opacity:0.2}#mermaid-svg-lbhoyhpuHWMy1dM6 .sectionTitle0{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .sectionTitle1{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .sectionTitle2{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .sectionTitle3{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-lbhoyhpuHWMy1dM6 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .grid path{stroke-width:0}#mermaid-svg-lbhoyhpuHWMy1dM6 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-lbhoyhpuHWMy1dM6 .task{stroke-width:2}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText:not([font-size]){font-size:11px}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-lbhoyhpuHWMy1dM6 .task.clickable{cursor:pointer}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText0,#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText1,#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText2,#mermaid-svg-lbhoyhpuHWMy1dM6 .taskText3{fill:#fff}#mermaid-svg-lbhoyhpuHWMy1dM6 .task0,#mermaid-svg-lbhoyhpuHWMy1dM6 .task1,#mermaid-svg-lbhoyhpuHWMy1dM6 .task2,#mermaid-svg-lbhoyhpuHWMy1dM6 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutside0,#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutside2{fill:#000}#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutside1,#mermaid-svg-lbhoyhpuHWMy1dM6 .taskTextOutside3{fill:#000}#mermaid-svg-lbhoyhpuHWMy1dM6 .active0,#mermaid-svg-lbhoyhpuHWMy1dM6 .active1,#mermaid-svg-lbhoyhpuHWMy1dM6 .active2,#mermaid-svg-lbhoyhpuHWMy1dM6 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-lbhoyhpuHWMy1dM6 .activeText0,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeText1,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeText2,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeText3{fill:#000 !important}#mermaid-svg-lbhoyhpuHWMy1dM6 .done0,#mermaid-svg-lbhoyhpuHWMy1dM6 .done1,#mermaid-svg-lbhoyhpuHWMy1dM6 .done2,#mermaid-svg-lbhoyhpuHWMy1dM6 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-lbhoyhpuHWMy1dM6 .doneText0,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneText1,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneText2,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneText3{fill:#000 !important}#mermaid-svg-lbhoyhpuHWMy1dM6 .crit0,#mermaid-svg-lbhoyhpuHWMy1dM6 .crit1,#mermaid-svg-lbhoyhpuHWMy1dM6 .crit2,#mermaid-svg-lbhoyhpuHWMy1dM6 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCrit0,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCrit1,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCrit2,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCrit0,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCrit1,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCrit2,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-lbhoyhpuHWMy1dM6 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-lbhoyhpuHWMy1dM6 .milestoneText{font-style:italic}#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCritText0,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCritText1,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCritText2,#mermaid-svg-lbhoyhpuHWMy1dM6 .doneCritText3{fill:#000 !important}#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCritText0,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCritText1,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCritText2,#mermaid-svg-lbhoyhpuHWMy1dM6 .activeCritText3{fill:#000 !important}#mermaid-svg-lbhoyhpuHWMy1dM6 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-lbhoyhpuHWMy1dM6 g.classGroup text .title{font-weight:bolder}#mermaid-svg-lbhoyhpuHWMy1dM6 g.clickable{cursor:pointer}#mermaid-svg-lbhoyhpuHWMy1dM6 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-lbhoyhpuHWMy1dM6 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-lbhoyhpuHWMy1dM6 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-lbhoyhpuHWMy1dM6 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .dashed-line{stroke-dasharray:3}#mermaid-svg-lbhoyhpuHWMy1dM6 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 .commit-id,#mermaid-svg-lbhoyhpuHWMy1dM6 .commit-msg,#mermaid-svg-lbhoyhpuHWMy1dM6 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-lbhoyhpuHWMy1dM6 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-lbhoyhpuHWMy1dM6 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-lbhoyhpuHWMy1dM6 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-lbhoyhpuHWMy1dM6 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-lbhoyhpuHWMy1dM6 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-lbhoyhpuHWMy1dM6 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-lbhoyhpuHWMy1dM6 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-lbhoyhpuHWMy1dM6 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-lbhoyhpuHWMy1dM6 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-lbhoyhpuHWMy1dM6 .edgeLabel text{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-lbhoyhpuHWMy1dM6 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-lbhoyhpuHWMy1dM6 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-lbhoyhpuHWMy1dM6 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-lbhoyhpuHWMy1dM6 .note-edge{stroke-dasharray:5}#mermaid-svg-lbhoyhpuHWMy1dM6 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-lbhoyhpuHWMy1dM6 .error-icon{fill:#522}#mermaid-svg-lbhoyhpuHWMy1dM6 .error-text{fill:#522;stroke:#522}#mermaid-svg-lbhoyhpuHWMy1dM6 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-lbhoyhpuHWMy1dM6 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-lbhoyhpuHWMy1dM6 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-lbhoyhpuHWMy1dM6 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-lbhoyhpuHWMy1dM6 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-lbhoyhpuHWMy1dM6 .marker{fill:#333}#mermaid-svg-lbhoyhpuHWMy1dM6 .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-lbhoyhpuHWMy1dM6 {
color: rgba(0, 0, 0, 0.75);
font: ;
}

判断有没有插队
将每一个人按照入队顺序进行编号,按照出队顺序写出编号
某一处编号是不是小于所有的它的后面的编号
yes
这个人没有插队
no
这个人插队了
考虑使用单调栈进行快速判断

单调栈详解

1.用于求数列中每一个数往右数直到大于它的数的个数问题以及推广

2.用于根据剩余的结果来求有没有插队的问题

代码

#include <iostream>
#include <string>
#include <map>
#include <stack>
using namespace std;
int out[50009];
int main()
{
ios::sync_with_stdio(false);
int T;
cin >> T;
while (T--)
{
map<string, int>mp;
int no = 0;//入队时候的编号
int cnt = 0;//出队时候的计数
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
string name, option;
cin >> option >> name;
if (option == "in")
{
mp[name] = no++;
}
else
{
out[cnt++] = mp[name];
} }
mp.clear();
stack<int>st;
for (int i = 0, pos = 0; i < n / 2; i++)
{ if (st.empty() || out[pos] > st.top())
{
st.push(out[pos]);
}
else
{
while (!st.empty() && out[pos] <= st.top())
{
st.pop();
}
st.push(out[pos]);
}
pos++;
}
cout << st.size() << endl;
}
return 0;
}

Keep In Line_via牛客网的更多相关文章

  1. 牛客网 --java问答题

    http://www.nowcoder.com/ 主要是自己什么都不怎么会.在这里可以学习很多的! 第一天看题自己回答,第二天看牛客网的答案! 1 什么是Java虚拟机?为什么Java被称作是“平台无 ...

  2. 牛客网《BAT面试算法精品课》学习笔记

    目录 牛客网<BAT面试算法精品课>学习笔记 牛客网<BAT面试算法精品课>笔记一:排序 牛客网<BAT面试算法精品课>笔记二:字符串 牛客网<BAT面试算法 ...

  3. C++版 - HDUoj 2010 3阶的水仙花数 - 牛客网

    版权声明: 本文为博主Bravo Yeung(知乎UserName同名)的原创文章,欲转载请先私信获博主允许,转载时请附上网址 http://blog.csdn.net/lzuacm. C++版 - ...

  4. 牛客网第9场多校E(思维求期望)

    链接:https://www.nowcoder.com/acm/contest/147/E 来源:牛客网 题目描述 Niuniu likes to play OSU! We simplify the ...

  5. 牛客网暑期ACM多校训练营(第七场)Bit Compression

    链接:https://www.nowcoder.com/acm/contest/145/C 来源:牛客网 题目描述 A binary string s of length N = 2n is give ...

  6. Beautiful Numbers(牛客网)

    链接:https://ac.nowcoder.com/acm/problem/17385来源:牛客网 题目描述 NIBGNAUK is an odd boy and his taste is stra ...

  7. 牛客网华为机试题之Python解法

    牛客网华为机试题之Python解法 第1题 字符串最后一个单词的长度 a = input().split(" ") print(len(a[-1])) 第2题 计算字符个数 a = ...

  8. 牛客网Wannafly挑战赛25A 因子(数论 素因子分解)

    链接:https://www.nowcoder.com/acm/contest/197/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言5242 ...

  9. 牛客网 2018年东北农业大学春季校赛 L题 wyh的天鹅

    链接:https://www.nowcoder.com/acm/contest/93/L来源:牛客网 时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 262144K,其他语言524288 ...

随机推荐

  1. 干货|带你体验一次原生OpenStack云平台发放云主机的过程

    一个执着于技术的公众号 1 前言 上一章节我们完成了OpenStack云平台的搭建工作,今天就带大家一起学习下如何发放一台云主机 点击查看:如何搭建一套OpenStack云平台 2 发放OpenSta ...

  2. nacos 详细介绍(二)

    五.nacos的namespace和group namespace:相当于环境,开发环境 测试环境 生产环境 ,每个空间里面的配置是独立的默认的namespace是public, namespace可 ...

  3. Windows UIA自动化测试框架学习--获取qq好友列表

    前段时间应公司要求开发一款针对现有WPF程序的自动化测试工具,在网上查资料找了一段时间,发现用来做自动化测试的框架还是比较多的,比如python的两个模块pywinauto和uiautomation, ...

  4. Centos 7以上安装Docker (亲测有效)

    一.安装前的准备 我的环境是VMware15虚拟机安装的Centos7,Linux内核是3.10.0-1062.4.1.e17.x86_64 1. 用root账户登录查看操作系统内核版本及相关信息 [ ...

  5. 思科,华为l2tp组网,家庭宽带,公司内网数据分离

    拓扑 简介 办公网使用专线接入,拥有固定IP地址,网络出口使用防火墙做NAT,下联交换机接入服务器,办公电脑等,旁挂思科路由器做L2TP LNS 家庭宽带使用ADSL线路,华为路由器做拨号设备与DHC ...

  6. 在Windows2003 server 64位系统上使用ArcEngine开发的WCF服务

    之前大篇文章提到,ESRI说AE10.0以后已经不支持WebService的发布,经过一段时间的测试,发现目前10.2.2版本开始的WCF服务都可以正常发布,且运行正常. 先说一下之前遇到的问题,本机 ...

  7. 使用 Flutter 与 Firebase 制作 I/O 弹球游戏

    文/ Very Good Ventures 团队,5 月 11 日发表于 Flutter 官方博客 为了今年的 Google I/O 大会,Flutter 团队使用 Flutter 以及 Fireba ...

  8. 第06组 Alpha冲刺 (1/6)

    1.1 基本情况 队名:守护(发际)线程 组长博客:郝雷明 作业博客:郝雷明 组员人数:10 1.2 冲刺概况汇报 1. 郝雷明(组长) 过去两天完成了哪些任务 学习了微信开发平台的文档内容,熟悉微信 ...

  9. AI趋势量化系统(Binance升级版)

    更多精彩内容,欢迎关注公众号:数量技术宅,也可添加技术宅个人微信号:sljsz01,与我交流. B圈大跌行情,如何应对? 近期,伴随着美联储持续的加息进程,数字货币市场不论是市场焦点LUNA,还是BT ...

  10. sklearn练习1 回归

    from sklearn.svm import SVR from sklearn.pipeline import make_pipeline from sklearn.preprocessing im ...