HDU 1088 - Write a simple HTML Browser】的更多相关文章

Problem Description If you ever tried to read a html document on a Macintosh, you know how hard it is if no Netscape is installed. Now, who can forget to install a HTML browser? This is very easy because most of the times you don't need one on a MAC…
这题是从某个群里听别人在抱怨这题老是PE,打开status果然满眼的Presentation Error...于是闲着来做了一下. 其实挺水的,不过各种设定多一点,注意一点就行了. 一开始以为词数超过80个才换行,原来是字符数... 样例过了之后提交了结果也PE了... 于是随便弄了一下输入,胡乱复制,然后输出到文件里面检查,发现了各种字数超过80,原来还是有些细节没处理好. 于是又修改了几个地方终于A掉了. 这题的确有点恶心,考的是细节问题. 代码: #include <iostream>…
直接看sample input = = 又一道模拟. #include <iostream> #include <string> #include <cstdio> using namespace std; string s; int main() { // freopen("date.out","w",stdout); ; while(cin>>s) { if(s=="<br>") {…
意甲冠军:出现<br>总结,出现<hr>出口'-',今天的字加上各行的假设是长于80然后包,每个字之前,留下一个空白格,为了输出新行结束. #include<iostream> using namespace std; int main() { char s[100]; int len,cnt=0; while(scanf("%s",s)==1) { if(!strcmp(s,"<br>")) { cnt=0; put…
题目其实不难,但是要注意题目的要求,当前字数(>0)+当前单词长度+1若超过80则需要回车后,输出当前word,并且重新计数.这道题目的数据感觉比较水,不过测试的时候,最后使用fprintf输出在文件中,便于观察. #include <stdio.h> #include <string.h> #define MAXNUM 85 char line[MAXNUM]; char word[MAXNUM]; int main() { int i; , len; //FILE *fo…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1088 对比输出 代码: #include <stdio.h> #include <string.h> #include <math.h> #include <algorithm> #include <iostream> #include <ctype.h> #include <iomanip> #include <que…
http://acm.hdu.edu.cn/showproblem.php?pid=5795 A Simple Nim Problem Description   Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5349 MZL's simple problem Description A simple problemProblem DescriptionYou have a multiple set,and now there are three kinds of operations:1 x : add number x to set2 : delete the minimum number (if the…
A Simple Game Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/65535 K (Java/Others)Total Submission(s): 1487    Accepted Submission(s): 939 Problem Description Agrael likes play a simple game with his friend Animal during the classes. I…
题 Description Rhason Cheung had a simple problem, and asked Teacher Mai for help. But Teacher Mai thought this problem was too simple, sometimes naive. So she ask you for help. Teacher Mai has m functions f1,f2,...,fm:{1,2,...,n}→{1,2,...,n}(that mea…