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;
}
相關文章
- HDU 5794 A Simple Chess (lucas定理+費馬小定理)
- HDU 5795 A Simple Nim (SG函式+打表找規律)函式
- 1088 Rational Arithmetic (20分)
- document.write()和HTML4.01的非成對標籤HTML
- A Security Analysis Of Browser Extensions
- 【Hash問題】九度OJ 1088:剩下的樹
- hdu 2111 Saving HDU (DP)
- Tor Browser 8.0 釋出
- Browser Security-css、javascriptCSSJavaScript
- MySQL double writeMySql
- [Javascript] Write .call()JavaScript
- MongoDB Write ConcernMongoDB
- hio_write
- P1088 [NOIP2004 普及組] 火星人
- Simple Neural Network
- Paxos Made Simple
- Browser Security-基本概念
- Web(Cache)Browser v1.7Web
- vs code jshint報錯或者Open browser failed!! Please check if you have installed the browser correctly!錯誤.JSAI
- django-simple-captchaDjangoAPT
- Shrio(Simple,Java,Security)Java
- simple Terracotta session 同步Session
- Simple state transition 3
- Project Three: Simple WorldProject
- uni-simple-router
- 深度解析@angular/platform-browser-dynamicAngularPlatform
- 檔案伺服器 — File Browser伺服器
- PAT-B 1088 三人行【暴力列舉】
- Shape of HDU
- HDU 3349
- MongoDB 寫安全(Write Concern)MongoDB
- How boltdb Write its Data?
- ALi CTF 2015 write up
- HDU 2052(C語言+註釋)+HDU 2090C語言
- Simple FSM 3(asynchronous reset)
- Simple FSM 3(synchronous reset)
- Homework record-Simple sorting
- [譯]A Simple CSS Animation TutorialCSS
- vits-simple-api搭建API