hdu Web Navigation (模拟,只需注意vist后,没有forward)
2012-07-11 15:53
387 查看
#include <stdio.h> #include <string.h> char web[10000][75]; int main(){ char command[10]; int i = 0,j; memset(web,'\0',sizeof(web)); while(1){ scanf("%s",command); if(command[0] == 'V'){ i++; scanf("%s",web[i]); printf("%s\n",web[i]); for(j = i + 1;j < 10000;j++) web[j][0] = '\0'; } else if(command[0] == 'B'){ if(i == 0){ printf("Ignored\n"); } else if(i == 1){ printf("http://www.acm.org/\n"); i--; } else{ i--; printf("%s\n",web[i]); } } else if(command[0] == 'F'){ i++; if(web[i][0] != '\0'){ printf("%s\n",web[i]); } else{ printf("Ignored\n"); i--; } } else{ break; } } return 0; }
相关文章推荐
- HDU-IMNU集训六:叠筐-纯模拟(注意技巧)
- web_dynpro_ALV:(包ZLYTEST2)(alv 的事件只需注意一个R_PARAM就哦了)
- 注意除法hdu 2117 (模拟除法运算)
- hdu 1006 Tick and Tick 模拟时钟注意时间连续性!
- HDU 4782 Beautiful Soup (模拟+注意细节)
- Web Navigation poj 1028 模拟
- vue 没有再dev-servers.js情况下,在webpack.dev.conf.js模拟数据
- 简单web页面支持手机自适应,只需配置一些信息而没有用到bootstrap框架
- 最新的vue webpack模板没有dev-server.js文件,进行后台数据模拟笔记
- 【模拟,时针分针秒针两两夹角】【没有跳坑好兴奋】hdu - 5387 (多校#8 1008)
- HDU 3623 Best Cow Line, Gold(模拟,注意思路,简单)
- 可能你没有注意的Exception的属性
- YT15-HDU-字符串的模拟
- UltraWebGrid使用,注意事项集合
- maven2创建web项目,使用eclipse没有run on server的解决方法
- hdu 5186(模拟)
- Magina HDU - 3810 dfs+01背包队列模拟
- 【c语言】模拟实现strchr函数,功能:在一个字符串中查找一个字符第一次出现的位置,如果没有出现返回NULL
- HDU5842——Lweb and String(CCPC网络赛第11题)
- HDU 5386 Cover(模拟)