BAPC2010-I Keylogger
来源:互联网 发布:淘宝a0图纸扫描仪 编辑:程序博客网 时间:2024/05/17 15:06
链表模拟
#include <iostream>#include <cstdio>#include <cstring>#include <cmath>#include <cstdlib>#include <algorithm>using namespace std;const int N=1e6+10;int arr[N],arrh;struct Node{ int L,R,v;}a[N];char str[N];int Now,st,ed;int n;void work(){ scanf("%s",str);n=strlen(str); Now=0;//当前指针 st=0;ed=1; a[0].L=-1;a[0].R=ed; a[1].L=st;a[1].R=-1; arrh=2; for (int i=0;i<n;i++){ if (str[i]=='<'){ if (Now==st)continue; Now=a[Now].L; }else if (str[i]=='>'){ if (a[Now].R==ed)continue; Now=a[Now].R; }else if (str[i]=='-'){ if (Now==st)continue; arrh--;arr[arrh]=Now; Now=a[Now].L; int tmp=a[a[Now].R].R; a[Now].R=tmp; a[tmp].L=Now; }else { int id=arr[arrh];arrh++; a[id].L=Now;a[id].R=a[Now].R;a[id].v=str[i]; a[a[Now].R].L=id; a[Now].R=id; Now=id; } } st=a[st].R; while (st!=ed){ if (st!=0 && st!=1){ arrh--;arr[arrh]=st; } printf("%c",a[st].v); st=a[st].R; } puts("");}int main(){ //freopen("1.txt","r",stdin); for (int i=0;i<N;i++)arr[i]=i; arrh=0; int Case;scanf("%d",&Case); while (Case--)work(); return 0;}
0 0
- BAPC2010-I Keylogger
- KeyLogger
- Good keylogger
- Keylogger Gym
- [C++]Ftp keylogger Code
- windows python keylogger
- 某Keylogger分析
- keylogger, runs as a Service
- [sh2log]Linux键盘记录 keylogger notes
- Writing a Linux Keylogger in C
- 卡巴总是显示keylogger ,检测到威胁,怎样排除
- BlazingTools.Keylogger.Detector.v1.35.Incl.Keygen-BRD
- Max Keylogger - #1 Keystroke Logger & Computer Monitoring Software
- Skype-Type:一款通过声音窃取键盘记录的Keylogger工具
- Hack Like a Pro: How to Remotely Install a Keylogger onto Your Girlfriend's Computer
- I
- I
- ++i
- 最大网络流(Ford-Fulkerson算法)(hihicoder)
- session跨域共享
- _fastmath HAVE_DECL error
- 共享进程id,sharedpreferences 共享资源
- scala学习-trait学习
- BAPC2010-I Keylogger
- activemq - 集群 - 基于zookeeper的levelDB集群方式
- CodeForces 612D - The Union of k-Segments(模拟)
- A*寻路算法
- 前端开发不得不知道的十大ES6新特性
- java环境变量配置
- vim脚本调试
- C语言中extern的用法
- Spring:SpringMVC 视图解析 - ViewResolver&View