hdu 1022】的更多相关文章

A - Train Problem I Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1022 Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to…
http://acm.split.hdu.edu.cn/showproblem.php?pid=1022 题意:给出火车的进站与出站顺序,判断是否可以按照给出的出站顺序出站. #include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <vector> #include <algorithm> #include <ma…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1022 又是一道栈的练习,这次也是没有用到STL中的栈来实现.用来保存操作过程的数组(process[])一定要开得足够大(一开始开小了导致wa) #include <iostream> #include <string.h> #include <stdio.h> using namespace std; ; int main() { char o1[maxn], o2[ma…
 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1022 题目大意: 题目大概意思:有N辆火车,以序列1方式进站,判断是否能以序列2方式出栈.进站不一定是一次性进入,也就是说中途可以出站. #include <cstdio> #include <stack> #include <iostream> #include <algorithm> using namespace std; int main() { ],…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1022 Train Problem I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45375    Accepted Submission(s): 16966 Problem Description As the new term come…
Train Problem I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 53352    Accepted Submission(s): 20006 Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays…
传送门 Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a pr…
#include<stdio.h> #include<stack> #include<string.h> #define N 20 using namespace std; int main() { stack<char>S; int n, i, j, k, a[N]; char s1[N], s2[N]; while(scanf("%d", &n) != EOF) { while(!S.empty())//清空栈 S.pop()…
Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes…
// hdu1022 这题算是我做的第一道栈的题目,之前看过栈的一些内容,做这道题的时候,可以模拟出过程,但是具体的代码不会写...所以决定练习一些栈和队列的问题,大概思路就是有三个数组和一个栈,先把第一个数组的第一个元素放进栈里,每次判断第二个数组和栈顶元素是否相等,如果相等就弹出,如果不相等就压入,大概就是这个思路.... #include <iostream> #include <stack> using namespace std; int main() { stack&l…