18 lines
377 B
C
18 lines
377 B
C
#include <stdio.h>
|
|
int main(){
|
|
int arr[26] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
|
|
int temp=0;
|
|
char s[101];
|
|
scanf("%s",s);
|
|
for(int i=0; s[i]!='\0'; i++){
|
|
temp = (int)(s[i]-'a');
|
|
if(arr[temp]==-1) arr[temp]=i;
|
|
}
|
|
|
|
for(int i=0; i<26; i++){
|
|
printf("%d ",arr[i]);
|
|
}
|
|
|
|
return 0;
|
|
|
|
} |