POJ2387-Til the Cows Come Home

POJ - 2387:Til the Cows Come Home Til the Cows Come Home 来源:POJ 标签:最短路径问题,迪杰斯特拉算法 参考资料: 相似题目: 题目 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the mor... 阅读详情

POJ2387-Til the Cows Come Home

Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 55360Accepted: 18793

Description

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible.
Farmer John’s field has N (2 <= N <= 1000) landmarks in it, uniquely numbered 1..N. Landmark 1 is the barn; the apple tree grove in which Bessie stands all day is landmark N. Cows travel in the field using T (1 <= T <= 2000) bidirectional cow-trails of various lengths between the landmarks. Bessie is not confident of her navigation ability, so she always stays on a trail from its start to its end once she starts it.
Given the trails between the landmarks, determine the minimum distance Bessie must walk to get back to the barn. It is guaranteed that some such route exists.

Input

* Line 1: Two integers: T and N
* Lines 2..T+1: Each line describes a trail as three space-separated integers. The first two integers are the landmarks between which the trail travels. The third integer is the length of the trail, range 1..100.

Output

* Line 1: A single integer, the minimum distance that Bessie must travel to get from landmark N to landmark 1.

Sample Input

5 5
1 2 20
2 3 30
3 4 20
4 5 20
1 5 100

Sample Output

90

Hint

INPUT DETAILS:
There are five landmarks.
OUTPUT DETAILS:
Bessie can get home by following trails 4, 3, 2, and 1.

Source

USACO 2004 November

很裸的最短路,攒模板用

Dijkstra还能用斐波那契堆优化的,不过我还没学会,日后补齐吧

AC代码

Dijkstra不优化(用于学习基础思想,以后都不会用)

#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#define LL long long
#define ULL unsigned long long
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
#define N 1010
#define INF 0x3f3f3f3f
#define eps 1e-9
using namespace std;
struct Edge{
    int from,to,dist;
    Edge(int u,int v,int d):from(u),to(v),dist(d){};
};
struct HeapNode{
    int d,u;
    bool operator<(const HeapNode &a) const {
        return d>a.d;
    }
};
struct Dijkstra{
    int n,m;
    vector<Edge> edges;
    vector<int> G[N];
    bool vis[N];//是否永久标号 
    int d[N];//松弛操作 
    int p[N];//最短路中的上一条弧,这个题其实没必要这个,可以全部删去,但是我懒...

    void init(int n) {
        this->n=n;
        for(int i=0;i<n;++i){
            G[i].clear();
        }
        edges.clear();
    }

    void AddEdge(int from,int to,int dist){
        edges.push_back(Edge(from,to,dist));
        m=edges.size();
        G[from].push_back(m-1);
    }

    void dijkstra(int s){
        priority_queue<HeapNode> q;
        for(int i=0;i<=n;++i){
            d[i]=INF;
        }
        d[s]=0;
        mem(vis,0);
        q.push((HeapNode){0,s});
        while(!q.empty()){
            HeapNode x=q.top();
            q.pop();
            int u=x.u;
            if(vis[u]){
                continue;
            }
            vis[u]=true;
            for(int i=0;i<G[u].size();++i){
                Edge &e=edges[G[u][i]];
                if(d[e.to]>d[u]+e.dist){
                    d[e.to]=d[u]+e.dist;
                    p[e.to]=G[u][i];
                    q.push((HeapNode){d[e.to],e.to});
                }
            }
        }
    }

    void dijkstraNoOptimize(int s){
        mem(vis,0);
        for(int i=0;i<=n;++i){
            d[i]=INF;
        }
        d[s]=0;
        int mn,pos;
        for(int i=1;i<=n;++i){
            mn=INF;
            for(int j=0;j<n;++j){
                if(!vis[j]&&d[j]<mn){
                    pos=j;
                    mn=d[j];
                }
            }
            for(int j=0;j<G[pos].size();++j){
                Edge &e=edges[G[pos][j]];
                if(d[e.to]>d[pos]+e.dist){
                    d[e.to]=d[pos]+e.dist;
                    p[e.to]=G[pos][j];
                }
            }
            vis[pos]=true;
        }
    }
};
Dijkstra Dick;
int main()
{
    ios::sync_with_stdio(false);
    int n,t,u,v,c;
    while(cin>>t>>n){
        Dick.init(n);
        while(t--){
            cin>>u>>v>>c;
            Dick.AddEdge(u,v,c);
            Dick.AddEdge(v,u,c);
        }
        Dick.dijkstraNoOptimize(1);
        /*for(int i=0;i<=n;++i){
            cout<<Dick.d[i]<<' ';
        }*/
        cout<<Dick.d[n]<<endl;
    }
    return 0;
}

Dijkstra+堆优化

#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#define LL long long
#define ULL unsigned long long
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
#define N 1010
#define INF 0x3f3f3f3f
#define eps 1e-9
using namespace std;
struct Edge{
    int from,to,dist;
    Edge(int u,int v,int d):from(u),to(v),dist(d){};
};
struct HeapNode{
    int d,u;
    bool operator<(const HeapNode &a) const {
        return d>a.d;
    }
};
struct Dijkstra{
    int n,m;
    vector<Edge> edges;
    vector<int> G[N];
    bool vis[N];//是否永久标号 
    int d[N];//松弛操作 
    int p[N];//最短路中的上一条弧

    void init(int n) {
        this->n=n;
        for(int i=0;i<=n;++i){
            G[i].clear();
        }
        edges.clear();
    }

    void AddEdge(int from,int to,int dist){
        edges.push_back(Edge(from,to,dist));
        m=edges.size();
        G[from].push_back(m-1);
    }

    void dijkstra(int s){
        priority_queue<HeapNode> q;
        for(int i=0;i<=n;++i){
            d[i]=INF;
        }
        d[s]=0;
        mem(vis,0);
        q.push((HeapNode){0,s});
        while(!q.empty()){
            HeapNode x=q.top();
            q.pop();
            int u=x.u;
            if(vis[u]){
                continue;
            }
            vis[u]=true;
            for(int i=0;i<G[u].size();++i){
                Edge &e=edges[G[u][i]];
                if(d[e.to]>d[u]+e.dist){
                    d[e.to]=d[u]+e.dist;
                    p[e.to]=G[u][i];
                    q.push((HeapNode){d[e.to],e.to});
                }
            }
        }
    }
};
Dijkstra Dick;
int main()
{
    ios::sync_with_stdio(false);
    int n,t,u,v,c;
    while(cin>>t>>n){
        Dick.init(n);
        while(t--){
            cin>>u>>v>>c;
            Dick.AddEdge(u,v,c);
            Dick.AddEdge(v,u,c);
        }
        Dick.dijkstra(1);
        /*for(int i=0;i<=n;++i){
            cout<<Dick.d[i]<<' ';
        }*/
        cout<<Dick.d[n]<<endl;
    }
    return 0;
}

Floyd(这个时间复杂度是不能过的,但是顺手写了就放一下,交的结果是TLE)

#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#define LL long long
#define ULL unsigned long long
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
#define N 1010
#define INF 0x3f3f3f3f
#define eps 1e-9
using namespace std;
int mp[N][N];
void Floyd(int n)
{
    for(int i=1;i<=n;++i){
        for(int j=1;j<=n;++j){
            for(int k=1;k<=n;++k){
                mp[j][k]=min(mp[j][k],mp[j][i]+mp[i][k]);
            }
        }
    }
    return;
}
void init(int n)
{
    for(int i=1;i<=n;++i){
        for(int j=1;j<=n;++j){
            mp[i][j]=INF;
        }
    }
}
int main()
{
    ios::sync_with_stdio(false);
    int n,t,u,v,c;
    while(cin>>t>>n){
        init(n);
        while(t--){
            cin>>u>>v>>c;
            mp[u][v]=mp[v][u]=min(mp[u][v],c);
        }
        Floyd(n);
        cout<<mp[1][n]<<endl;
    }
    return 0;
}

Bellman-Ford

#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#define LL long long
#define ULL unsigned long long
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
#define N 1010
#define INF 0x3f3f3f3f
#define eps 1e-9
using namespace std;
struct Edge{
    int from,to,dist;
    Edge(int u,int v,int d):from(u),to(v),dist(d){};
};
struct BellmanFord{
    int n,m;
    vector<Edge> edges;
    vector<int> G[N];
    int d[N];//松弛数组
    int pre[N];

    void init(int n) {
        this->n=n;
        for(int i=0;i<=n;++i){
            G[i].clear();
        }
        edges.clear();
    }

    void AddEdge(int from,int to,int dist){
        edges.push_back(Edge(from,to,dist));
        m=edges.size();
        G[from].push_back(m-1);
    }

    bool bellmanford(int s){
        for(int i=0;i<=n;++i){
            d[i]=INF;
        }
        d[s]=0;
        for(int i=1;i<n;++i){
            for(int j=0;j<m;++j){
                d[edges[j].to]=min(d[edges[j].to],d[edges[j].from]+edges[j].dist);
            }
        }
        bool hascycle=false;
        for(int j=0;j<m;++j){
            if(d[edges[j].to]>d[edges[j].from]+edges[j].dist){
                hascycle=true;
                break;
            }
        }
        return hascycle;
    }
};
BellmanFord bilibili; 
int main()
{
    ios::sync_with_stdio(false);
    int t,n,u,v,c;
    while(cin>>t>>n){
        bilibili.init(n);
        while(t--){
            cin>>u>>v>>c;
            bilibili.AddEdge(u,v,c);
            bilibili.AddEdge(v,u,c);
        }
        bilibili.bellmanford(1);
        cout<<bilibili.d[n]<<endl;
    }
    return 0;
}

SPFA

#include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector> 
#define LL long long
#define ULL unsigned long long
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
#define N 1010
#define INF 0x3f3f3f3f
#define eps 1e-9
using namespace std;
struct Edge{
    int from,to,dist;
    Edge(int u,int v,int d):from(u),to(v),dist(d){};
};
struct SPFA{
    vector<Edge> edges;
    vector<int> G[N];
    bool inque[N];
    int d[N];
    int n,m;

    void init(int n){
        this->n=n;
        for(int i=0;i<=n;++i){
            G[i].clear();
        }
        edges.clear();
    }

    void AddEdge(int from,int to,int dist){
        edges.push_back(Edge(from,to,dist));
        m=edges.size();
        G[from].push_back(m-1);
    }

    bool spfa(int s){
        queue<pair<int,int> > que;
        memset(inque,0,sizeof(inque));
        memset(d,INF,sizeof(d));
        que.push(make_pair(s,1));
        inque[s]=true;
        d[s]=0;
        while(!que.empty()){
            int temp=que.front().first,cnt=que.front().second;
            if(cnt==n){
                return true;
            }
            que.pop();
            for(int i=0;i<G[temp].size();++i){
                if(d[edges[G[temp][i]].to]>d[edges[G[temp][i]].from]+edges[G[temp][i]].dist){
                    que.push(make_pair(edges[G[temp][i]].to,cnt+1));
                    d[edges[G[temp][i]].to]=d[edges[G[temp][i]].from]+edges[G[temp][i]].dist;
                }
            }
        }
        return false;
    }
};
SPFA SMF;
int main()
{
    ios::sync_with_stdio(false);
    int n,t,u,v,c;
    while(cin>>t>>n){
        SMF.init(n);
        while(t--){
            cin>>u>>v>>c;
            SMF.AddEdge(u,v,c);
            SMF.AddEdge(v,u,c);
        }
        SMF.spfa(1);
        cout<<SMF.d[n]<<endl;
    }
    return 0;
}
LabVIew串口收发的一些问题 LabView串口收发实验总结 阅读详情

相关推荐

微信小程序测试号开发后上传按钮灰色?三步快速切换正式AppID

本文详细解析了微信小程序测试号开发后上传按钮灰色的原因,并提供了三步快速切换正式AppID的解决方案。通过注册正式小程序账号、修改项目配置和重新编译上传,开发者可以轻松解决上传按钮不可用的问题,确保小程序顺利上线。

weixin_29291185的博客 1598

POJ 2387 Til the Cows Come Home【dijkstra模板题】

POJ 2387 Til the Cows Come Home 题目大意: 无向图中,从点n到点1的最短路径 具体思路: dijkstra,考虑重边 注意下标减1,建议下次还是不使用0号,便于理解 具体代码: #include<iostream> #include<cstdio> #include<stdlib.h> #include<string>...

指弹键盘哼民谣 893

手把手教你用FPGA+AD9822搭建300DPI的CIS高速图像采集系统(附时序调试心得)

本文详细介绍了如何利用FPGA作为核心控制器,结合AD9822三通道采样保持放大器/ADC,构建一套完整的300DPI CIS高速图像采集系统。内容涵盖从CIS传感器驱动时序、AD9822寄存器配置与协同调试,到采用千兆以太网替代USB实现稳定高速数据传输的完整实战指南,并分享了关键的时序调试心得与系统集成经验。

weixin_29306261的博客 139

【POJ 2387 --- Til the Cows Come Home】dijkstra

【POJ 2387 --- Til the Cows Come Home】dijkstra 题目来源:点击进入【POJ 2387 — Til the Cows Come Home】 Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible bef...

来日浅谈的博客 514

Ubuntu22.04下,用Fast-LIVO2+3DGS重建桌面小物件:从点云到高清模型的保姆级避坑实录

本文详细介绍了在Ubuntu22.04环境下,使用Fast-LIVO2与3DGS技术进行桌面小物件三维重建的完整流程。从环境配置、数据采集到点云-图像对齐和3DGS训练,提供了针对小物件优化的参数设置和避坑指南,帮助用户实现媲美商业扫描仪的高清模型重建效果。

weixin_30897233的博客 404

SQLSTATE58030

在优化一条SQL的时候遇到了执行错误 gtlions =# select t1.telnumber,t2.ua,t2.url,t1.apply_name,t2.apply_name from tb1 t1 gtlions -# left outer join tb2 t2 on t1.sid = t2.ipsid gtlions-# where t1.sum_date=20141128 a

Gtlions Tracker 3661

POJ2387 Til the Cows Come Home【最短路径+Dijkstra算法】

Til the Cows Come Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 110837 Accepted: 35583 Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the mornin

海岛Blog 1129

RHEL 8 与 RHEL 7 与 RHEL 6 的比较,RHEL 8强到离谱!

Red Hat Enterprise Linux(RHEL)是企业级 Linux 发行版中最受欢迎的操作系统之一。RHEL 为服务器和企业环境提供了高性能、稳定性和安全性,适用于各种数据中心和云计算平台。自 RHEL 6 以来,Red Hat 对其操作系统进行了多次重大更新,RHEL 7 和 RHEL 8 带来了许多新的特性、工具和架构变化。

网络技术联盟站 719

[POJ2387](最短路dijkstra)Til the Cows Come Home

POJ2387Til the Cows Come Home 题目 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her be...

Z7784562的博客 282

热视觉2:使用Python和OpenCV从图像中测量温度

这篇博客将介绍学习热/中远红外视觉的基础知识,gray8 和 gray16 图像(即最常见的热成像格式)之间的差异,学习如何使用Python和OpenCV从热图像中的每个像素点测量温度,并以不同的调色板显示结果。以及如何实时计算视频流和UVC热像仪的每个像素温度。

qq_40985985的博客 6716

基于STM32、HAL库的IP5356M_DBZ_CA快充协议芯片简介及驱动程序设计

IP5356M_BATTERY_LEVEL_25 = 1, /* 电池电量25% */IP5356M_CHARGE_STATE_CHARGE_DONE = 4, /* 充电完成 */IP5356M_CHARGE_STATE_FAST = 2, /* 快速充电 */IP5356M_CHARGE_STATE_NONE = 0, /* 无充电 */IP5356M_CHARGE_STATE_PRE = 1, /* 预充电 *//* 延时1秒 */

corlin6688的博客 1425

POJ2387-Til the Cows Come Home-最短路

POJ2387-Til the Cows Come Home-最短路DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie n

君安在AreYouWell 454

mapbox 从入门到精通 - 目录

欢迎大家来到gis分享者的《mapbox 从入门到精通》专栏。博主列出学习大纲,如果有什么问题,欢迎留言。

我哎GIS博客 5885

[POJ2387] Til the Cows Come Home(最短路)

传送门:POJ 2387 Til the Cows Come Home 千万看清点数和路径数的输入顺序。否则。你会像我一样WA和RE一个下午。 #include <iostream> #include <vector> #include <queue> #include <string.h> #define INF 0x3f3f3f3f us...

坤斤拷的博客 184

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

【POJ 2387 --- Til the Cows Come Home】dijkstra || dijkstra堆优化 || SPFA

【POJ 2387 --- Til the Cows Come Home】dijkstra || dijkstra堆优化 || SPFA Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes ...

来日浅谈的博客 511

贝叶斯统计 [韦来生编]

贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。  本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。  大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。  作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。  本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。

POJ2387::Til the Cows Come Home dijkstra算法

Dijkstra算法 Dijkstra算法大致上是利用贪心思想实现的,首先把起点到所有点的距离存下来找个最短的,然后遍历一遍看通过刚刚找到的距离最短的点作为中转点会不会更近,如果更近了就更新距离,这样把所有的点遍历之后就存下了起点到其他所有点的最短距离。然后将最短点的距离输出。 下面咱们来看一下这个题: Til the Cows Come Home POJ - 2387 Bessie is out...

weixin_43620849的博客 894

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

POJ 2387 Til the Cows Come Home

题目链接&lt;http://poj.org/problem?id=2387&gt;题意&amp;题解:先一共有n个点,输入T条边,求从点1到点n的最短路。注意:1、数据量较大,不适宜用Floyd。          2、会有重边(链式前向星可忽略这点)。#include &lt;iostream&gt; #include &lt;cstdio&gt; #include &lt;algorithm...

Eliot的博客 206

poj 2387 Til the Cows Come Home

直接spfa处理即可 //poj 2387 Til the Cows Come Home /* * spfa */ //licatweijei #include using namespace std; #define INF 1000000 #define MAXE 10100 #define MAXV 1010 #include #include double

LiWeiJie的专栏 608

POJ T2387 Til the Cows Come Home

                 POJ T2387 Til the Cows Come Home   模板裸题,注意点都在注释了....... Spfa写法 #include&lt;cstdio&gt; #include&lt;algorithm&gt; #include&lt;queue&gt; #define maxn 1005 #define INF 0x3f3f3f3f usi...

Mr__Charles的博客 192

最短路练习1 poj 2387 Til the Cows Come Home

题目链接:http://poj.org/problem?id=2387 Til the Cows Come Home Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 51700   Accepted: 17474 Description Bessie is o

Accepted 512

POJ 2387 Til the Cows Come Home

题目描述: Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants t

Sino_Crazy_Snail的小窝 1253

POJ 2387 Til the Cows Come Home(dijkstra)

Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep...

邵光亮的博客 13万+

【POJ】2387 Til the Cows Come Home

题目链接:http://poj.org/problem?id=2387 题意:求从1到n的最短路 题解:板子题。spfa。 代码: 1 #include<iostream> 2 #include<stack> 3 #include<vector> 4 #include<queue> 5 #in...

deze1991的专栏 106

poj 2387 Til the Cows Come Home

Til the Cows Come Home Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 25791   Accepted: 8677 Description Bessie is out in the field and wants to get back to

笨小孩的专栏 540

Til the Cows Come Home(POJ-2387)

POJ - 2387 传送门 Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible.

Silence的博客 225
上一篇: POJ2387-Til the Cows Come Home-最短路
下一篇: POJ1511-Invitation Cards-最短路
普通网友
博客等级 码龄10年 20粉丝 87原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值