题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1073

数据判断,主要是如何判断WA和PE,吸收字符!

代码:

 #include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <iostream>
#include <ctype.h>
#include <iomanip>
#include <queue>
#include <stdlib.h>
using namespace std; char tmp[]; void shuru(char p[])
{
getchar();
gets(tmp);
while(gets(tmp))
{
if(strcmp(tmp,"END")==) break;
if(strlen(tmp)!=) strcat(p,tmp);
strcat(p,"\n");
}
} void duibi(char a[]){
int k=;
for(int i=;a[i];i++){
if(a[i]==' '||a[i]=='\t'||a[i]=='\n')
continue;
else
a[k++]=a[i];
}
a[k]='\0';
} int main()
{
int n;
char a[];
char b[];
while(~scanf("%d",&n)){
while(n--){
a[]='\0';
b[]='\0';
shuru(a);
shuru(b);;
if(strcmp(a,b)==){
cout<<"Accepted"<<endl;
continue;
}
else{
duibi(a);
duibi(b);
if(strcmp(a,b)==){
puts("Presentation Error");
continue;
}
}
puts("Wrong Answer");
}
}
return ;
}

hdu Online Judge的更多相关文章

  1. HDU——1073Online Judge(string类以及其对应函数)

    Online Judge Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tot ...

  2. 致初学者(一): HDU 2000~ 2013题解

    对于开始学习C语言程序设计或C++程序设计面向过程部分的同学来说,利用在线OJ网站进行实践训练,对提高自己的编程能力很有好处.国内外OJ网站很多,每个都去看看,去刷个题,是不现实的,也没必要.即使一个 ...

  3. 上POJ刷题

    Online Judge系统      Online Judge系统(简称OJ)是一个在线的判题系统.用户可以在线提交给定问题的多种程序(如C.C++.Pascal.Java)源代码,系统对源代码进行 ...

  4. 解题报告:hdu 1073 Online Judge

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1073 Problem Description Ignatius is building an Onli ...

  5. HDOJ/HDU 1073 Online Judge(字符串处理~)

    Problem Description Ignatius is building an Online Judge, now he has worked out all the problems exc ...

  6. HDU 1073 Online Judge (字符串处理)

    题目链接 Problem Description Ignatius is building an Online Judge, now he has worked out all the problem ...

  7. HDU 1073 Online Judge(字符串)

    Online Judge Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Tot ...

  8. HDU 1073 - Online Judge

    模拟评测机判断答案 先判断有没有不一样的 有的话再提取出 有效子列 看看有没有错的 #include <iostream> #include <cstdio> #include ...

  9. hdu 2769 uva 12169 Disgruntled Judge 拓展欧几里德

    //数据是有多水 连 10^10的枚举都能过 关于拓展欧几里德:大概就是x1=y2,y1=x2-[a/b]y2,按这个规律递归到gcd(a,0)的形式,此时公因数为a,方程也变为a*x+0*y=gcd ...

随机推荐

  1. js字的数目的计算方法(与word计算公式为)

    [背景] 用户往往需要一定数量的单词填写必填字段限制,但js由value.length取出来的往往差异很大,与实际的话.通常真正的用户抱怨.很显然,我没有写那么多字,但系统提示超过字数限制.然后,我学 ...

  2. ZOJ3827 ACM-ICPC 2014 亚洲区域赛的比赛现场牡丹江I称号 Information Entropy 水的问题

    Information Entropy Time Limit: 2 Seconds      Memory Limit: 131072 KB      Special Judge Informatio ...

  3. DataGridView显示数据的两种方法

    1.简介 DataGridView空间是我们经常使用的显示数据的控件,它有极高的可配置性和可扩展性. 2.显示数据 DataGridView显示数据一般我们经常使用的有两种方法,一种是直接设置Data ...

  4. LatinIME输入法分析

    输入法的设置在res/xml/method.xml的<input-method>标签中,主要设置两个属性: android:settingsActivity,输入法的设置程序入口. and ...

  5. ListView 实现多选/无线电

    ListView本身与无线电.多选模式.由listview.setChoiceMode设置: listview.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE) ...

  6. 关于苹果公司最新的语言Swift

    Swift供IOS和OSX新的编程语言开发的应用程序,吸取C和Objective-C质朴的语言.但没有损失C兼容性语言.Swift使用安全的编程模型.增加各种现代编程语言功能,使语言更容易掌握.更具可 ...

  7. Socket tips: UDP Echo service - Client code

    #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/soc ...

  8. 七天来学习ASP.NET MVC (两)——ASP.NET MVC 数据传输

    通过第一天的学习之后,我们相信您已经对MVC有一些基本了解. 本节所讲的内容是在上节的基础之上.因此须要确保您是否掌握了上一节的内容. 本章的目标是在今天学习结束时利用最佳实践解决方式创建一个小型的M ...

  9. 探索static——不需要能够使用该类实例?

    在一般情况下.需要使用一个上课时间.你必须先实例化类,它调用的能力.在编程过程中发现.有些类不能直接实例来使用,利用其场.法等等. 这时候.靠的就是static作用.static英文意思为" ...

  10. boostrap-非常好用但是容易让人忽略的地方------input-group-btn

    1.正常的使用 <div class="form-group"> <div class="input-group"> <input ...