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 1563. Bayan

Wht TL?
Posted by jhgkhdlkjsgfsjhfdhkhj 31 Mar 2008 23:51
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include<string>
#include<iostream>
// Namespace
using namespace std;
// SETIO function
int setio()
{
// seting input
#if FILE_INPUT
// freopen(FILE_INPUT_NAME,"r",stdin);
#endif
// seting output
#if FILE_OUTPUT
// freopen(FILE_OUTPUT_NAME,"w",stdout);
#endif

// Done,exiting
return 0;
}
// Functions,Procedures,etc



// Main function
int main()
{
#ifndef ONLINE_JUDGE
setio();
#endif
int e[1000];
int n,i,a,b,c;
string s[1000];
a=0;b=0;c=0;
cin>>n;
char y[81];
for(i=0;i<n;i++)
{
    int j=0;
 while ((scanf("%c",&y[j]))!=EOF)
 {
     j++;
 }
 s[i]=y;
 e[i]=1;
}
cout<<'e';
for (i=0;i<n;i++)
if (e[i]==1)
{ e[i]=0;

    for (a=i;a<n;a++)
    {
        if (s[a]==s[i]&&e[a]==1)
        {    c++;
             e[a]=0;
        }
    }
}
cout<<c<<endl;


//while (!NULL) cin>>a;
//system("pause");
return 0;
}