poj 1236 强连通分量+缩点

html python mysql交互_干货!Python与MySQL数据库的交互实战 安装PyMySQL库如果你想要使用python操作MySQL数据库,就必须先要安装pymysql库,这个库的安装很简单,直接使用pip install pymysql;假如这种方式还是安装不上,就用如下链接找一个合适的安装包,进行安装,这个就不细说了。https://www.lfd.uci.edu/~gohlke/pythonlibs/使用Python连接MySQL数据库1)六个常用的连接参数参数... 阅读详情

Network of Schools
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 12273 Accepted: 4887

Description

A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it distributes software (the “receiving schools”). Note that if B is in the distribution list of school A, then A does not necessarily appear in the list of school B
You are to write a program that computes the minimal number of schools that must receive a copy of the new software in order for the software to reach all schools in the network according to the agreement (Subtask A). As a further task, we want to ensure that by sending the copy of new software to an arbitrary school, this software will reach all schools in the network. To achieve this goal we may have to extend the lists of receivers by new members. Compute the minimal number of extensions that have to be made so that whatever school we send the new software to, it will reach all other schools (Subtask B). One extension means introducing one new member into the list of receivers of one school.

Input

The first line contains an integer N: the number of schools in the network (2 <= N <= 100). The schools are identified by the first N positive integers. Each of the next N lines describes a list of receivers. The line i+1 contains the identifiers of the receivers of school i. Each list ends with a 0. An empty list contains a 0 alone in the line.

Output

Your program should write two lines to the standard output. The first line should contain one positive integer: the solution of subtask A. The second line should contain the solution of subtask B.

Sample Input

5
2 4 3 0
4 5 0
0
0
1 0

Sample Output

1
2

Source


5
2 4 3 0
4 5 0
0
0
1 0
#include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
using namespace std;

#define maxn 101
#define maxm 20005
int n;
int to[maxm],next[maxm],first[maxn],tot;
int rto[maxm], rnext[maxm],rfirst[maxn], rtot;
int vs[maxn],cnt=0;
bool used[maxn];
int cmp[maxn];
int ind[maxn];
int outd[maxn];

void init()
{
    memset(first, -1, sizeof(first));
    memset(rfirst, -1, sizeof(rfirst));
    tot=rtot=0;
    cnt=0;
}
void add(int u, int v)
{
    to[tot]=v; next[tot]=first[u]; first[u]=tot++;
    rto[rtot]=u; rnext[rtot]=rfirst[v]; rfirst[v]=rtot++;
}


void dfs(int u)
{
    int v;
    used[u]=1;
    for(int i=first[u]; i!=-1; i=next[i]){
        v=to[i];
        if(!used[v]) dfs(v);
    }
    vs[cnt++]=u;
}

void rdfs(int u, int k)
{
    int v;
    cmp[u]=k;
    used[u]=1;
    for(int i=rfirst[u]; i!=-1; i=rnext[i]){
        v=rto[i];
        if(!used[v]) rdfs(v, k);
    }
}

int scc(int n)
{
    cnt=0;
    memset(used,0, sizeof(used));
    for(int i=1; i<=n; i++)
        if(!used[i]){
            dfs(i);
        }

    memset(used, 0, sizeof(used));
    cnt=0;
    for(int i=n-1; i>=0; i--)
        if(!used[vs[i]])
            rdfs(vs[i], cnt++);
    return cnt;

}

int main()
{
    while(scanf("%d", &n)==1){
        init();
        int u,v;
        memset(ind, 0, sizeof(ind));
        memset(outd, 0, sizeof(outd));
        for(int i=0; i<n; i++){
            u=i+1;
            while(scanf("%d", &v)==1 && v){
                add(u,v);
            }
        }

        int num=scc(n);
        for(int i=1; i<=n; i++){
            u=i;
            for(int j=first[u]; j!=-1; j=next[j]){
                v=to[j];
                if(cmp[u]!=cmp[v])
                ind[cmp[v]]++,outd[cmp[u]]++;
            }
        }

        int ansa=0, ansb=0;
        for(int i=0; i<num; i++){
            if(!ind[i]) ansa++;
            if(!outd[i]) ansb++;
        }

        ansb=max(ansa, ansb);
        if(num==1) ansb=0;
        printf("%d\n%d\n", ansa,ansb);
    }
    return 0;
}

Sample Output

1
2

Source





Debian Buster 软件源失效问题 摘要:基于Debian Buster的ARM64设备因系统版本结束支持(EOL)导致apt update报错404。解决方案包括:1)改用Debian官方存档源(需禁用安全检查);2)升级至受支持的Debian 11/12版本(推荐);3)临时使用第三方镜像源(不推荐)。操作步骤涉及修改sources.list、处理NTP同步问题及清理残留配置。建议优先采用版本升级方案以获得持续安全更新,避免使用过时系统带来的安全隐患。文中提供了完整命令示例和操作记录供参考。 阅读详情

相关推荐

模型参考自适应控制(MRAC):让PID参数动态优化

本文深入解析模型参考自适应控制(MRAC)技术,它通过实时调整PID参数,使控制系统能自动适应系统特性变化和外部干扰。文章详细介绍了MRAC的工作原理、数学基础,并提供了用C语言实现的实战代码示例,帮助工程师解决传统PID控制在非线性、时变系统中参数整定繁琐的难题。

tequila的博客 902

usaco5.3.3 Network of Schools

一 原题 Network of Schools IOI '96 Day 1 Problem 3 A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of school

max_kibble的博客 335

微信自动化进阶:Python识别特定消息并自动回复(基于win32api控件操作)

本文详细介绍了如何使用Python和win32api实现微信消息的智能监控与自动回复。通过精准识别聊天记录中的特定关键词,结合多级匹配策略和性能优化技巧,构建稳定高效的自动化回复系统,适用于企业客服、个人助手等场景。

weixin_42663213的博客 441

POJ1236:强连通分量

POJ1236 题解: task A:给出多少个点,能传遍所有的点。求入度为0的点的个数 task B:加上多少个点,才能成为强连通图。即求max(sum(outdegree == 0),sum(indegree == 0))。因为强连通图每个点必须要有出度和入度,所以把度为0的都补上。 当原图已经为强连通图时,要特判为1。 代码: #include &lt;c...

FlyingJack 255

DataGridView添加新行时在单元格绑定下拉列表DataGridViewComboBoxCell

效果图如下 先在界面上添加DataGridView,添加字段no、type、param 在lord事件中新建一行 dataGridView1.Rows.Add(); 在RowsAdded事件中操作新建的行 private void dataGridView1_RowsAdded_1(object sender, DataGridViewRowsAddedEventArgs...

wuqinglaohao的博客 1986

239号资源-simulink仿真:MATLAB/Simulink教程(PDF文档)-----已提供下载资源

电网论文源程序擅长文章解读,论文与完整源程序,等方面的知识,电网论文源程序关注python,机器学习,计算机视觉,深度学习,神经网络,数据挖掘领域.电网论文源程序擅长文章解读,论文与完整源程序,等方面的知识,电网论文源程序关注python,机器学习,计算机视觉,深度学习,神经网络,数据挖掘领域.《《《《《《《《更多资源还请持续关注本专栏》》》》》》》《《《《《《《《更多资源还请持续关注本专栏》》》》》》》论文与完整源程序_电网论文源程序的博客-优快云博客。电网论文源程序-优快云博客。

LIANG674027206的博客 1076

Special topic 2

A - Network of Schools POJ - 1236 A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list of schools to which it di...

Hugokung的博客 273

Hermes V0.10.0:官方UI几乎无Bug版

如果你还在观望Hermes,现在可能是最好的入局时机。 因为网页端来了,门槛降到了最低。 如果你已经是Hermes用户,升级就对了。 因为0.9.0的更新,值得一试。

weixin_66295112的博客 2046

POJ 1236 Network of Schools (连通图 - Garbow 算法)

POJ 1236 Network of Schools ​ 校园网:给定N所学校和网络,目标是分发软件其他学校都可收到,求①所需最少分发学校数;②若任选学校都能收到,最低新增边数。 思路:同一个强连通分量内的顶点合并为一个,在这个DAG上计算出度和入度。①其实是求入度为0的顶点数,②则是求0出度和0入度顶点数的较大者,因为要将这两类顶点连起来。 #include<iostre...

橘嘉禾 196

iPhone存储空间耗尽自救指南:从“白苹果”死锁到成功保数据刷机

本文详细介绍了iPhone存储空间耗尽导致'白苹果'死锁的解决方案,通过保留数据刷机方法成功恢复设备运行。文章分享了从失败尝试到最终成功的完整流程,包括关键操作步骤和预防措施,帮助用户在紧急情况下保住重要数据。

weixin_32578161的博客 287

BurpSuite工具HaE插件好用正则收集

数据集合面板里面直接查询捕获到的相关数据内容,省去一个个翻找数据包内容的烦恼。插件捕获到匹配正则表达式的数据包后,可以在。可以对正则条目进行添加、编辑、删除。规则信息管理,我们点击。

墨痕诉清风的博客 646

POJ1236 图论 tarjan SCC

题意: 给定一个有向图,求: 1) 至少要选几个顶点,才能做到从这些顶点出发,可以到达全部顶点 2) 至少要加多少条边,才能使得从任何一个顶点出发,都能到达全部顶点 思路: 1、求出所有强连通分量; 2、每个强连通分量缩成一点,则形成一个有向无环图DAG; 3、DAG上面有多少个入度为0的顶点,问题1的答案就是多少; 4、假定有 n 个入度为0的点,m个出度为0的点,max(m

ACUNSTOPPABLE 266

R语言做一个 GM (1,1)灰色预测模型

累加生成是GM(1,1)模型的另一个重要步骤,它通过构造累加生成序列,把非线性非平稳时间序列转化为线性平稳时间序列。GM(1,1)是一种基于灰色系统理论的预测模型,通常用于中小样本的非线性、非平稳时间序列数据分析。灰色预测模型的核心是灰度处理,将原始时间序列转化为灰色时间序列。这里使用R语言中的diff函数对时间序列进行一次差分,然后对结果取累加和得到灰度序列。以上是GM(1,1)灰色预测模型在R语言中的实现步骤。需要注意的是,GM(1,1)模型适用于中小样本的时间序列预测,对于长期预测效果可能较差。

Mrrunsen的博客 3841

poj1236强连通分量+缩点

一开始脑子秀逗地算出最多边数为2

zz_ylolita 642

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

poj1236 强连通分量——缩点

【题意】 N(2 【题解】 找强连通分量,缩点。记f[i]为缩完点后的新图中各点入度,g[i]为出度,ans1为f[i]==0的点的数目,ans2为g[i]==0的点的数目则第一问为ans1,第二问则为max{ans1,ans2}。 至于第二问的解释,我的想法是对于得到的DAG图,考虑其中的出度为0的点和入度为0的点组成的点集V,将这些点相连,最多这需要max{ans1,ans2}条边

AChunter的专栏 5644

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

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

poj1236 强连通分量+缩点

有一次比赛的时候遇到了一道强连通分量+缩点的题,过的人挺多,那个时候还没有做过强连通的题,只能遗憾放弃。比赛回去,立马整理了强连通缩点的模板,做了那道题。时隔多日,再找一道强连通的题,来联系一下 题目大意:有一个有向图,第一问:从几个点开始走能够全部遍历一遍,第二问:如果要把整个有向图变成强连通至少       需要加几条边。 解法:第一问:只需要缩点之后,看入度为0的点有几个便可,入度为0的

always_here 456

深度学习工具包 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")

poj 1236强连通分量+缩点

http://poj.org/problem?id=1236 Network of Schools Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 23941   Accepted: 9504 Description A number of schools are connected t...

qq_36921652的博客 238

poj 1236 Network of Schools (强连通分量+缩点)

http://poj.org/problem?id=1236 Network of Schools Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 12991   Accepted: 5191 Description A number of schoo

大太阳 715

POJ 1236(tarjan求强连通分量 + 缩点建图 模版)

题目链接:http://poj.org/problem?id=1236 题目所求:最少需要几个点,能够从这些点到达所有点。 最少增加多少条边,能够使此有向图为强连通图。 思路:用 tarjan 求出强连通分量 然后 缩点建立有向图。设 入度为0的点总数为ans1,出度为0的点总数为ans2。 答案1:即为ans1。 答案2: 显然为 max(ans1,ans2)。 注意, 当只有一个强连通...

Error Man 的博客 326

强连通分量缩点+DAG度数测定(poj1236)

poj1236 task1,将缩点完了之后的每个块的入度为零的点的个数 task2,是在缩完点的DAG的基础上添加多少条边使得 DAG 之间的所有点能够相互到达(形成一个 SCC),套结论:入度为 0 的点的个数和出度为 0 的点个数的最大者 其中找连通分量可以通过vector储存有向图的信息,这样非常方便,就不需要开nt,to,head数组了。 // // main.cpp // 强连通_将...

Aczy156的博客 246

poj1236(*强连通分量,缩点)

/* translation: n个学校组成一个网络,给出链接情况(单向图)。求要使得报文能够发往全部学校,最少需要发送多少个报文。 要使得从任何一个学校能够到达任何一个学校,最少需要添加几条边? solution: 强联通分量,缩点 缩点后整张图就成了DAG,那么显然地第一个问题就是DAG上入度为0的点。主要在于第二个问题。如何添边才能得到最优解呢? 方法如下:首先缩点后,可以得到一个

林伏案的博客 444

【强连通分量缩点】poj 1236 Network of Schools

poj.org/problem?id=1236 【题意】 给定一个有向图,求: (1)至少要选几个顶点,才能做到从这些顶点出发,可以到达全部顶点 (2)至少要加多少条边,才能使得从任何一个顶点出发,都能到达全部顶点 【思路】 (1)强连通分量缩点后形成一个有向无环图,只要选择入度为0的顶点,其他顶点都可以被到达 (2)等价于一个有向无环图加最少加多少条边能够变成一个强连通...

weixin_30399797的博客 149

poj 1236 Network of Schools(又是强连通分量+缩点)

http://poj.org/problem?id=1236 Network of Schools Time Limit:1000MS Memory Limit:10000K Total Submissions:9481 Accepted:3767 Description A number of schools a...

diansitao5461的博客 158

POJ 1236 强连通分量+缩点+入度出度

题意:给出一些学校之间的关系,即有向边。 问题1:最少需要多少个学校可以到达所有学校。 问题2:最少需要加多少条边,可以使所有学校互相到达,即整个图强连通。 对于问题1:我们只需缩点后求出入度为0的强连通分量个数。 对于问题2:求出入度为0的个数,出度为0的个数,输出较大值即可。 需要说明的是,当整个图已经是强连通时,问题2的答案是0,需要特判。这里WA了一次。 #include

just_water 1056

POJ1236 Network of Schools(强连通分量、缩点)

原题地址 花了一晚上看了karjan,就拿这道题做一下模板题练练手吧,相关的东西都写到注释里面去了。 #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stack> using nam...

weixin_30892037的博客 156

POJ 1236 Network of Schools(强连通分量缩点)

Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions:20899 Accepted: 8245DescriptionA number of schools are connected to a computer network. Agreements have been developed among ...

albertluf的博客 209
上一篇: poj 2774 后缀数组模板
下一篇: hdu 2222 ac自动机模板题
HuanTongH
博客等级 码龄12年 7粉丝 110原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值