HELP IN Registration system problem
Разница между en1 и en2, 44 символ(ов) изменены
In the registration system problem from Code forces beta round #4 it is given that the number of character in a string are not more than 32.but when i use a string of size exactly 32 character i get a wrong answer on 13 test case.and if i use s[33] my solution is accepted.can i know where I am going wrong.↵
↵
This is my code-↵
~~~~~↵
Your code here...↵
~~~~~
↵
#include<stdio.h>↵
#include<string.h>↵
int main(){↵
    int n,i,j,l=0;↵
    scanf("%d",&n);↵
    int b[1000000]={0};↵
    char s[3
23],a[n][323];↵
    for(i=0;i<n;i++){↵
        scanf("%s",s);↵
        for(j=0;j<l;j++){↵
            if(strcmp(a[j],s)==0){↵
                b[j]++;↵
                break;↵
            }↵
        }↵
        if(j>=l){↵
            l++;↵
            printf("OK\n");↵
            strcpy(a[j],s);↵
        }↵
        else{↵
            printf("%s%d\n",s,b[j]);↵
        }↵
    ↵
        ↵
        ↵
    }↵
    return 0;↵
}
↵
↵
↵

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский jweh 2020-07-12 10:28:27 600
en2 Английский jweh 2020-07-12 10:25:47 44
en1 Английский jweh 2020-07-12 10:19:42 914 Initial revision (published)