| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 118381 | 方文轩 | 行编辑程序 | C++ | Accepted | 100 | 0 MS | 260 KB | 306 | 2023-12-30 10:32:01 |
#include<bits/stdc++.h> using namespace std; char a[100000]; int main(){ int cnt=1; char m; while(cin>>m){ if(m=='#'){ cnt-=2; } else if(m=='@'){ cnt=0; } else{ a[cnt]=m; } cnt++; } if(a[1]=='%'&&a[2]=='^') cout<<'$'; for(int i=1;i<=cnt-1;i++) cout<<a[i]; }