寒武纪重现(HDU)- 1008(6261) - Rikka with Mutex(二分 + 错误总结)

带你学习Android中的ContentObserver 通过使用,开发者可以有效地监听系统设置的变化,例如屏幕亮度等。这种机制使得应用能够动态响应系统设置的更改,提升用户体验。在实现需要与系统设置交互的应用时,合理使用是非常重要的。 阅读详情

Rikka with Mutex
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)
Total Submission(s): 32 Accepted Submission(s): 12

Problem Description
Sometimes, technical terms implicate some life philosophy. Mutex is one of them. On your way to dream, you may be locked by some difficulties, and you need someone to stop his step, and help you get through them.

To help you know better about the life philosophy inside mutex, Rikka comes up with a simple task. Maybe some of you know little about mutex, so she uses another scene to replace it.

There are n gates in a row, several people in the left side of the gates and all of them want to go to the right side. There are two kinds of gates: black and white. These people share energy, which is represented by a non-negative number E. Initially, E=0.

If one person walks through a white gate, he will gain one point of energy, i.e., E will be added by 1. And if one person walks through a black gate, he will lose one point of energy, i.e., E will be subtracted by 1. Since E must be a non-negative integer, if E=0, no one can walk through a black gate until someone walks through a white gate. You can assume there won’t be two people moving at the same time and all the people are selfless.

We use P to represent a black gate, V to represent a white gate and use a PV string to represent the row. Initially, all the people are at the beginning of the string, and all of them want to go through the whole string. But unfortunately, sometimes it may be impossible. So, they want to send at least one person to the right side.

Your task is to find out the minimal number of people which this group needs to achieve this goal.

For example, if the row is VPP, they need at least two people: The first person walk through the first white gate and the second person can use this point of energy to go through the whole string.

Input
The first line contains a single numner t(1≤t≤103), the number of the testcases.

For each testcase, the first line contains a PV string s(1≤|s|≤105) describing the gates.

The input guarantees that there are at most 30 testcases with |S|>1000.

Output
For each testcase, output a single integer, the answer. And if it is impossible, output −1.

Sample Input
4
VPP
VPPVVVVPPPPPPPP
VPPPPPPPPPPPPPP
P

Sample Output
2
3
14
-1

Source
寒武纪ACM金牌训练营-重现赛

Recommend
liuyiding | We have carefully selected several similar problems for you: 6263 6262 6261 6260 6259

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6261


题意给你一个字符串只包含“V” 和 “P”。“V”代表走过此时,总能量加一,P 代表走过此时,总能量减一。当要走 “P”,总能量为 0 时,就不能继续走。

问:至少让一个人走完这个字符串,最少需要多少人?


解题思路:先把整个字符串相同的字符缩成 a 数组。比如 VPPVV ,缩成 :1,-2,2。然后二分一个人数 n,接着先让一个人走这个 a 序列,每走一步就看看后面 n - 1个人到当前第一个人的位置,对总能量有没有贡献。若有,则把后面 n - 1个人移到当前第一个人的位置且总能量加上贡献,否则,就接着往下走,直到走不了为止。

那怎么保证后面 n - 1 个人一定能走到当前第一个人的位置呢?
比如:当 n 个人都在 i 位置时的总能量为 E1,接着当第一个人从 i 走到了 j 且走到 j 时的总能量 E2 是大于等于之前的总能量 E1说明后面每 n - 1 个人也是能走到 j 位置的。


错误总结:不应该是走到不能走的时候把后面的 n - 1 个人移到当前不能走的位置看看有没有贡献。而是每走一步,都要看看把后面的 n - 1 个人移到当前位置看看有没有贡献,有就移,没有就不移。也就是要把每一步的状态给列出来。


代码如下:

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<queue>
#include<cmath>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

const int maxn = 1e5 + 5;
char s[maxn];
long long a[maxn];
int len,all;

void Init(){
    bool flag;
    if(s[1] == 'V') flag = 1;
    else flag = 0;
    long long sum = 0LL;all = 0;
    for(int i = 1;i <= len;i++){
        if(s[i] == 'V' && flag) sum++;
        else if(s[i] == 'V' && !flag) a[++all] = -sum,sum = 1LL,flag = 1;
        else if(s[i] == 'P' && !flag) sum++;
        else if(s[i] == 'P' && flag) a[++all] = sum,sum = 1LL,flag = 0;
    }
    if(flag) a[++all] = sum;
    else a[++all] = -sum;
}

bool check(long long mid){
    long long E,sum;
    E = 1LL * a[1] * mid;
    sum = E;
    for(int i = 2;i <= all + 1;i++){
        if(E < 0) return false;
        if(i == all + 1) return true;
        E += a[i];
        if(E >= sum){
            E += (mid - 1LL) * (E - sum) * 1LL;
            sum = E;
        }
    }
}

int main(){
    int t;
    cin >> t;
    while(t--){
        cin >> s + 1;
        len = strlen(s + 1);
        Init();
        int l = 1,r = len,mid;
        while(l <= r){
            mid = (l + r) >> 1;
            if(check(mid)) r = mid - 1;
            else l = mid + 1;
        }
        if(l >= len) printf("-1\n");
        else printf("%d\n",l);
    }
}
大语言模型原理与工程实践:手把手教你训练 7B 大语言模型 自动化训练框架 近年来,大语言模型(Large Language Models,LLMs)在自然语言处理领域取得了突破性进展。从GPT-3到ChatGPT,再到最新的GPT-4,这些模型展现出了惊人的语言理解和生成能力,引发了学术界和产业界的广泛关注。然而,训练如此庞大的模型不仅需要海量的数据和计算资源,还需要复杂的工程实践和优化技巧。本文将深入探讨大语言模型的原理,并以7B参数规模的模型为例,详细介绍如何构建一个自动化训练框架,使读者能够亲自动手训练自己的大语言模型。 阅读详情

相关推荐

HITS算法详解及代码实现

占坑

蓁蓁尔的博客 7469

HDU6261:Rikka with Mutex(二分 + 贪心)

Rikka with Mutex Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 132    Accepted Submission(s): 28   Problem Description Sometimes, techni...

junior19的博客 429

手把手教你用Simulink搭建交流异步电机矢量控制模型(附完整仿真文件)

本文详细介绍了如何使用Simulink搭建交流异步电机矢量控制模型,涵盖系统架构设计、关键模块实现、PI调节器参数整定及仿真分析等核心内容。通过实战指南和完整仿真文件,帮助读者掌握矢量控制技术,提升电机控制系统的设计与调试能力。

n4o5p6q7r的博客 253

寒武纪camp Day4

补题进度:7/11 A(博弈论) 略 B 待填坑 C(贪心) 题意:   一个序列是good的当且仅当相邻两个数字不相同。给出一个长度为n的数列,每个数字是ai。定义一种操作就是把a中某个元素拿到首位去,问最少需要多少次操作才能让数列a变成good的。如果不可行则输出-1。   n<=1000,1<=ai<=n 分析:   我们先来判-1的情况,当且仅当出现次...

weixin_30951231的博客 150

Python数据爬取超详细讲解(零基础入门,老年人都看的懂)

Python数据爬取超详细讲解(零基础入门,老年人都看的懂)

python03011的博客 3763

Quartus Prime v18.1 standard-QuartusPrimeV18.1标准版安装过程

Quartus Prime v18.1 standard安装破解过程 下载方式1:官网下载: https://fpgasoftware.intel.com/18.1/?edition=standard&platform=windows 下载方式2:可以从我的网盘下载安装包(如果链接未时效的话): 链接:https://pan.baidu.com/s/1bq4_FcNPSflU1zGJv__rvA 提取码:o0in ----------------------------------.

Alonger1988的博客 2万+

HDU 6261 Rikka with Mutex (二分答案+模拟)

Rikka with MutexTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 105    Accepted Submission(s): 37Problem DescriptionSometimes, technical terms...

Rvelamen的博客 415

用 SNC 和 SAP Single Sign-On Secure Login 把 SAP 登录这件小事,变成一件安全又不用输密码的事

在传统的 SAP 系统里,登录这件事看起来很朴素:用户打开 SAP GUI,输入一个 SAP 用户名,再输入一个 SAP 密码,点回车,进系统,开始干活。表面上没毛病,但从安全角度看,这种老办法问题很大。默认情况下,这些用户名和密码在网络上传输时是明文,也就是不加密传输。攻击者如果在公司网络里做监听,理论上可以直接截取到口令信息,这种风险对今天任何一家合规要求高、审计严格的企业来说,基本是不可接受的。(SAP Help Portal)SAP 给出的答案叫做 ,全称是 。SNC 做的事情可以概括成两类:一类是

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 395

寒武纪第一届ACM金牌训练营网络测试赛 C题 math

传送门:Math 题目大意: 对于一个数对 (a,b),如果满足 a%b=a/b,则称这个数对为“好的数对”。  如果 a 输入样例: 5 8 3 65 498 513 115 10 80 100 输出样例: 3 7 1 131 1556 1611 268 10 172 227 思路: 这个题算是个找规

zuzhiang的博客 1535

影楼精修-高低频磨皮算法解析

本文介绍了像素蛋糕软件中的高低频磨皮算法原理及实现思路,抛砖引玉。

Trent1985的专栏 2271

KEPServerEX作为MQTT客户端

打开软件: 测试没有连接上MQTT代理。

低码开发 1685

hdu 6092 Rikka with Subset

先放代码,去吃个饭,= = Rikka with Subset Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 231    Accepted Submission(s): 99 Problem Descrip

twh233的算法blog 490

【2027最新版】python点云处理算法汇总(长期更新版)

python点云处理算法整理。博客长期更新,最近一次更新时间为:2026年11月29日。

点云侠的博客 42万+

[随机化 || 黄金分割] HihoCoder #1461 Challenge 26 Rikka with Number

这个东西啊 逆过程是一个辗转相减 然后随机化以下最后状态另一个数就好了 比赛的时候被windows的rand坑死 windows下RAND_MAX是32768 被dls教导似乎windows下random_shuffle也有问题? 要不是rand不出来 就拿到奖品了233 #include #include #include #include using namespace std; i

雯舞 1074

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

第一届ACM金牌训练营网络测试赛 C. Math(简单数学)

Description 对于一个数对 (a,b),如果满足 a%b=a/b,则称这个数对为“好的数对”。如果 a≤n,b≤n" role="presentation" style="position: relative;">a≤n,b≤na≤n,b≤na\le n,b\le n, 那么有多少对数对是“好的数对”呢? Input 多组数据。 每组数据一行,一个数表

so_so_y的博客 714

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

寒武纪测试赛E题题解-Travel

链接:http://aiiage.hustoj.com/contest.php?cid=1000 题意: 给你n(n 第一行输入n,表示n个点 接下来n-1行,输入u,v,w,表示一条边,w是权值,点从1开始 输入一个Q,表示询问次数(Q 接下来Q行,输入u,k(2 对于每次询问,输出在距离mod k的意义下,距离 u 点最远的点有多远 样例如下: 输入: 3 1 2 7 1

mMingfunnyTree的博客 1349

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

寒武纪测试赛1 C(取模和整除的性质 经典)

problem 对于一个数对(a,b)(a,b) ,如果满足a%b=a/ba \% b = a/b,则称这个数对为“好的数对”。 如果 a⩽n,b⩽na\leqslant n,b\leqslant n,那么有多少对数对是“好的数对”呢? 1⩽n⩽1e91\leqslant n\leqslant 1e9 pdf题面 Sample Input 5 8 3 65 Sample

Feynman1999的博客 749

HDU - 6261 Rikka with Mutex(二分)

Sometimes, technical terms implicate some life philosophy. Mutex is one of them. On your way to dream, you may be locked by some difficulties, and you need someone to stop his step, and help you get t...

weixin_43896680的博客 215

寒武纪camp网络测试赛

寒武纪camp网络测试赛 地址:oj点我进入 A(树形dp+树链剖分) 题意: 分析:   考虑树形dp,f0(x)和f1(x)分别表示以x为根的子树,不取x点或取x点的最大合法子集的元素个数   那么对于一个询问来说,答案就是max(f0(x),f1(x)),我们的任务就是对于每次修改操作维护所有f数组的变化   假设我们新加入了一个x节点,很明显只有x以及x的祖先们的f...

weixin_30342827的博客 260

ICPCCamp2017 Preview

寒假在失落和迷惘里玩了过去。 既然来到了Camp,终于也要写点什么了。 相当于记笔记,记下学习的过程和尚未掌握的问题吧。 接下来几天的日程大概是这样子—— 有这么几个信息—— 1,3场比赛 + 1天广告 + 3场比赛 2,早上时间比较随意,午餐被省略掉了!晚上没有自由活动了。 此外队伍名单如下—— 共计66个队伍,强队很多。 我和学弟钱哲琦还有

snowy_smile的博客 2092

2018.1.14 寒武纪测试赛

这次比赛的题好难啊,,,我们一共做了两个题,C和D, C算是简单的了,就是按照题意推的两个公式,按判断公式x^2+x>n,找到最小的x,1—x的for循环代公式求解即可 D题A的有点莫名其妙,我是将所有的字符串全部变长50倍,排序后比较相邻两个相同的长度,输出最大长度,比赛的时候就是抱着试试的态度,因为500倍超内存了,就试了50,后来看了题解,应该是长度变到1000就稳过了 还做了E,但是

AAAAAAAC的博客 636

Rikka with Badminton

Problem Description In the last semester, Rikka joined the badminton club. There are n students in the badminton club, some of them have rackets, and some of them have balls. Formally, there are a st...

海绵的博客 351

hdu 6090 Rikka with Graph(公式)

题目链接:hdu 6090 Rikka with Graph 题意: 给你一个n和m,让你用这m条边将n个点链接起来,使得对于全部的pair<i,j>的最短路之和最小。没有路的值就为n。 题解: 还是和题解说的一样 1 #include<bits/stdc++.h> 2 #define mst(a,b) memset(a,b,sizeof(a))...

weixin_30469895的博客 150

HDU 6419 Rikka with Rain (暴力)

题意: 有一个多边形,提问m个圆,求圆被多边形完全包含需要移动的最少距离。 题解: 做过的一道目前最难的几何题,充分发挥了暴力的思想。 看到这个问题的第一想法就是,多边形向内缩R(圆的半径),然后求圆心到缩小的多边形的最短距离即可。方法就是枚举新的多边形的线段,求点到线段的最短距离。 那么我们的目标就成了求新的多边形,但细思极恐...... 最理想的情况是这样: 但是,这...

Spy97的博客 485

VPP基本操作练习

目录 基本操作 启动 输入命令到vpp1 开启vpp shell 接口操作 创建veth 创建vpp接口 设置vpp接口IP Trace数据包 连接两个VPP实例 查看ARP 查看VPP路由表 启动第二个VPP实例 创建memif 路由操作 添加主机路由 添加vpp2路由 Trace Ping SWITCHING 重新启动两个VPP实例 建立veth为vp...

jacicson1987的专栏 1万+

【暑假集训】之被ACM金牌大神虐的第二天之图论篇

【感想1】:今天是ACM金牌大神来讲的第二天,话说第一天的内容都还没写完。。QAQ,不过还是先写今天的吧。。。 Electricity 2(Gym 100345C) 给出一个简单无向图G,对于图G上的任意一个点P,设N(P)为和P直接相邻的点的集合。对于任意的v,w属于N(P),都存在一条从v到w只经过N(P)上点的路径。问是否存在一种只用3种颜色的染色方案,使得每条边两端点颜色不同?

Fighting!! 836
上一篇: AtCoder - Petrozavodsk - Contest - 001 - D (缩点 + 贪心 + 错误总结)
下一篇: AT - Grand - 004 - B - Colorful Slimes(思维理解)
dwenhu___
博客等级 码龄10年 8粉丝 62原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值