HELP IN Registration system problem
Разница между en2 и en3, 600 символ(ов) изменены
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↵
~~~~~↵
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[33],a[n][33];↵
    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;
This is my code-↵
[Your text to link here...](https://codeforces.me/contest/4/submission/86627694)
↵
}↵
↵
↵

История

 
 
 
 
Правки
 
 
  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)