zoj 1259,例子过了,wa,程序有注释哦~
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/07/16 13:26:15
zoj 1259,例子过了,wa,程序有注释哦~
Rails
--------------------------------------------------------------------------------
Time Limit:1 Second Memory Limit:32768 KB
--------------------------------------------------------------------------------
There is a famous railway station in PopPush City.Country there is incredibly hilly.The station was built in last century.Unfortunately,funds were extremely limited that time.It was possible to establish only a surface track.Moreover,it turned out that the station could be only a dead-end one (see picture) and due to lack of available space it could have only one track.
The local tradition is that every train arriving from the direction A continues in the direction B with coaches reorganized in some way.Assume that the train arriving from the direction A has N
Rails
--------------------------------------------------------------------------------
Time Limit:1 Second Memory Limit:32768 KB
--------------------------------------------------------------------------------
There is a famous railway station in PopPush City.Country there is incredibly hilly.The station was built in last century.Unfortunately,funds were extremely limited that time.It was possible to establish only a surface track.Moreover,it turned out that the station could be only a dead-end one (see picture) and due to lack of available space it could have only one track.
The local tradition is that every train arriving from the direction A continues in the direction B with coaches reorganized in some way.Assume that the train arriving from the direction A has N
#include
#include
#include
using namespace std;
int b[1100];//数组用来存输入的序列
int main()
{
stack a;//保存序列的栈
stack xb;//序列中元素对应的下标的栈
int n,i,p,x;
while(scanf("%d",&n)!=EOF&&n)//序列的个数
{
while(scanf("%d",&b[0])!=EOF&&b[0])//序列的第一个数不为0就继续
{
while(!a.empty())//把栈清空
{
a.pop();
}
while(!xb.empty())//把栈清空
{
xb.pop();
}
p=1;//用来判断序列是否能变成1 2 3 ···n,假设能,p=1,不能,p=0
for(i=1;i=0;i--)//从序列的后面往前来
{
while(!a.empty()&&b[i]
#include
#include
using namespace std;
int b[1100];//数组用来存输入的序列
int main()
{
stack a;//保存序列的栈
stack xb;//序列中元素对应的下标的栈
int n,i,p,x;
while(scanf("%d",&n)!=EOF&&n)//序列的个数
{
while(scanf("%d",&b[0])!=EOF&&b[0])//序列的第一个数不为0就继续
{
while(!a.empty())//把栈清空
{
a.pop();
}
while(!xb.empty())//把栈清空
{
xb.pop();
}
p=1;//用来判断序列是否能变成1 2 3 ···n,假设能,p=1,不能,p=0
for(i=1;i=0;i--)//从序列的后面往前来
{
while(!a.empty()&&b[i]
zoj 1259,例子过了,wa,程序有注释哦~
真心求解!浙大ZOJ平台上3168题,觉得很简单啊,但一直WA.坐等哭求大牛!
我想要一个c++程序,有题目和注释的
哪位帮我注释下下面的程序是什么意思?稍微注释下就可以了,
给一个程序注释,程序如下
我下过很多次订单了,貌似每次都有一个移仓的程序.
求牛人帮忙注释程序请尽量详细点,实在看不懂了//Vector.h#ifndef _QT_VECTOR_H_INCLUDE
一件好事做过了头变坏事了 有哪些?随便举一些例子
请教matlab大神,这段程序有什么用处?能不能在后面详细地注释一下?
c程序中有这样一个句子,麻烦把句子注释改正确,
notepad++编写程序显示注释下面都有下划线,怎么把那个下划线去掉?
有关杂质的化学方程式怎么计算?(有几个例子就再好不过了)