ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1164. Fillword

will any body help me? I am OLE
Posted by mahbubul 12 Jul 2003 23:23
I am Output Limit Exceed. my source is in C++. Here this is:

#include<iostream.h>
#include<string.h>
main()
{
int len,temp,i;
int n,m,j,p;
char ch[12][12],word[15];
char letter;
long int array[30];
for(i=0;i<27;i++)
array[i]=0;
cin>>n>>m>>p;
for(i=1;i<=n;i++)
cin>>ch[i];
for(i=1;i<=p;i++){
cin>>word;
len=strlen(word);
for(int k=0;k<len;k++){
temp=word[k];
array[temp-64]--;
}}
for(i=1;i<=n;i++)
for(j=0;j<m;j++){
temp=ch[i][j];
array[temp-64]++;
}
for(i=1;i<27;i++){
temp=array[i];
letter=i+64;
while(temp!=0){
cout<<letter;
temp--;
}}
cout<<endl;
return 0;
}
Re: will any body help me? I am OLE
Posted by George_Aloyan[PTS Obninsk] 10 Dec 2011 12:05
make temp!=0 - temp > 0; and some other changes, but it gets WA11

Edited by author 10.12.2011 12:10