Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.004 s | 29 KBi |
#2 |
Correcto
|
0.003 s | 12 KBi |
#3 |
Correcto
|
0.004 s | 10 KBi |
#4 |
Correcto
|
0.005 s | 10 KBi |
#5 |
Correcto
|
0.004 s | 17 KBi |
#6 |
Correcto
|
0.007 s | 2 KBi |
#7 |
Correcto
|
0.004 s | 11 KBi |
#8 |
Correcto
|
0.006 s | 1 KBi |
#9 |
Correcto
|
0.006 s | 2 KBi |
#10 |
Correcto
|
0.005 s | 1 KBi |
#11 |
Correcto
|
0.004 s | 1 KBi |
#12 |
Correcto
|
0.004 s | 5 KBi |
#include <stdio.h> #define SIZE 50 int main() { char s[SIZE]; char hashtable[SIZE]; int i; for(i = 0; i < SIZE; i++) hashtable[i] = '\0'; scanf("%s", s); for(i = 0; s[i] != '\0'; i++) { if(hashtable[s[i] % SIZE] != '\0') { printf("yes"); return 0; } hashtable[s[i] % SIZE] = s[i]; } printf("no"); return 0; }