hdu 1088 Write a simple HTML Browser
#include<iostream>
#include<string>
using namespace std;
string hr = "--------------------------------------------------------------------------------";
int main()
{
string s;
int tag=0,len;
while(cin>>s)
{
len=s.size();
if(s=="<br>")
{
cout<<endl;
tag=0;
}else if(s=="<hr>")
{
if(tag!=0)
{
cout<<endl;
}
cout<<hr<<endl;
tag=0;
}else
{
if((tag+1+len)<=80)
{
if(tag)
{
cout<<" ";
tag++;
}
cout<<s;
tag+=len;
}else
{
cout<<endl;
cout<<s;
tag=len;
}
}
}
cout<<endl;
return 0;
}
相關文章
- Write a simple HTTP server in PythonHTTPServerPython
- TheBrain匯出→Simple HTMLAIHTML
- HDU 5795 A Simple Nim (SG函式+打表找規律)函式
- HDU 3600 Simple Puzzle 歸併排序 N*N數碼問題排序
- 關於Simple_html_dom的小應用HTML
- 1088 Rational Arithmetic (20分)
- document.write()和HTML4.01的非成對標籤HTML
- A Security Analysis Of Browser Extensions
- Oracle simple streamOracle
- Browser Security-css、javascriptCSSJavaScript
- Tor Browser 8.0 釋出
- How to debug Typescript in browserTypeScript
- Tor Browser 5.0釋出
- Myeclipse Db Browser使用Eclipse
- 遞推 - 動態規劃 - 百練 1088 滑雪動態規劃
- 關於Cache的write-through & write-back
- MySQL double writeMySql
- hio_write
- [Javascript] Write .call()JavaScript
- Shrio(Simple,Java,Security)Java
- django-simple-captchaDjangoAPT
- simple Terracotta session 同步Session
- SAP Simple FinanceNaN
- Oracle simple resource planOracle
- Simple definition of SAP productions
- Simple Neural Network
- Simple state transition 3
- Paxos Made Simple
- Browser Security-基本概念
- Web(Cache)Browser v1.7Web
- HDFS read and write
- document.write()方法
- db file parallel writeParallel
- commit_writeMIT
- 深度解析@angular/platform-browser-dynamicAngularPlatform
- 檔案伺服器 — File Browser伺服器
- Entity Framework Tutorial Basics(6):Model BrowserFramework
- js polyfill , to developing the cross browser jsJSdevROS