zoukankan      html  css  js  c++  java
  • hdu 1073

    #include<stdio.h>
    #include<string.h>
    #define N  5100
    char s[N][N],st[N][N],str[N],str1[N];
    int n;
    int main() {
    int i,j,lena,lenb,t,lea,leb,flag;
    scanf("%d",&t);
    while(t--) {
    getchar();
             gets(str);
    lena=0;
    while(gets(s[lena]),strcmp(s[lena],"END"))
    lena++;
       gets(str);
    lenb=0;
    while(gets(st[lenb]),strcmp(st[lenb],"END"))
    lenb++;
    flag=0;
    if(lena==lenb) {
    for(i=0;i<lena;i++)
    if(strcmp(s[i],st[i])!=0)
    break;
    if(i==lena) {
    printf("Accepted ");
    flag=1;
    }
    }
    if(flag==0) {
    lea=0;
    for(i=0;i<lena;i++)
    for(j=0;s[i][j];j++)
    if(s[i][j]!=' '&&s[i][j]!=' ')
    str[lea++]=s[i][j];
    str[lea]=0;
    leb=0;
    for(i=0;i<lenb;i++)
    for(j=0;st[i][j];j++)
    if(st[i][j]!=' '&&st[i][j]!=' ')
    str1[leb++]=st[i][j];
    str1[leb]=0;
    if(strcmp(str,str1)!=0)
    printf("Wrong Answer ");
    else
    printf("Presentation Error ");
    }
    }
    return 0;
    }



  • 相关阅读:
    各种读取速度
    索引倒排
    清空mysql数据
    java随机读取文件
    移动文件
    输出字符串数组
    背包问题
    使用bloomfilter
    使用hash拆分文件
    判断文件的编码格式
  • 原文地址:https://www.cnblogs.com/thefirstfeeling/p/4410868.html
Copyright © 2011-2022 走看看