CodeChef is a non-commercial competitive programming community
Login
Username (New User? Signup) Password (Forgot Password?)
Signup
Login or
Signup with
Connect
Note
  • Publicize your achievements on your Facebook Wall.
  • Challenge your friends or ask them for help.

Site Navigation

  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Challenge
    • Peer
  • COMPETE
    • All Contests
    • June Long 2012
    • May Cook-Off
    • May Long 2012
  • DISCUSS
    • Forums
    • Blog
    • Wiki
    • Facebook
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host your Contest
    • User Groups
    • CodeChef TechTalks
    • All Educational Initiatives
  • HELP
    • Frequently Asked Questions
    • FAQ for problem setters
    • Problem Setting
    • Tutorials
    • Long Contest Ranks
    • Short Contest Ranks
    • Event Calendar
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CodeChef Financials
    • CodeChef Sponsorships
    • CEO's Corner
    • Contact Us
    • About Directi
Home » Compete » EMA 2010 » Flames

Flames

Problem code: EMA09

  • All Submissions

We all have played a game called FLAMES during our childhood. In this we take input as two names, eliminate the similar alphabets in both the words and count the remaining number of alphabets and calculate the corresponding relationship according to FLAMES(Friend, Love, Affection, Marriage, Enemy or Sister)

Input

Input description... Name of you and your partner

Output

Output description... Count the number of remaining dissimilar alphabets and according to flame find the corresponding relationship F- Friend L- Love A-Affection M- Marriage E - Enemy S- Sister

Example

Input:
RAHUL
PREETI

Output:
E- ENEMY


Author: rajneeshrana
Date Added: 31-03-2010
Time Limit: 1 sec
Source Limit: 50000 Bytes
Languages: C, C99 strict, CPP 4.3.2, CS2, JAR, JAVA, NICE, PAS fpc, PAS gpc


  • Submit

Comments

  • Login or Register to post a comment.

if similar alphabet has

vishnoi_nitesh @ 2 Apr 2010 12:41 AM

if similar alphabet has different no. of occurences in both the string, then sud we remove all the occurence or the no. of time it matches in both string.

e.g aanand  & arushi

now sud we remove all a from both or one from each.

is the o/p correct???

code.freak @ 2 Apr 2010 01:09 AM

is the o/p correct???

Please correct the sample

Manoharprabhu @ 2 Apr 2010 02:19 AM

Please correct the sample output format.

F- Friend L- Love A-Affection M- Marriage E - Enemy S- Sister

all outputs have different number of spaces before and after (-)

somebody please tell what is

cybersharp @ 2 Apr 2010 12:00 PM

somebody please tell what is the correct output format???

@vikas: i see that your

cybersharp @ 2 Apr 2010 01:01 PM

@vikas: i see that your solution to flames just got accepted after several WAs. Can u plz tell whether it is a corner case that we are overlooking or something wrong in output format?? I am not asking for any direct answers.

April Fool's day being

malcolmc @ 2 Apr 2010 01:19 PM

April Fool's day being extended here on April 2... I submitted an empty function and it was accepted as a solution. I am out of here guys.

THAT'S TRUE!!!! .... IT

cybersharp @ 2 Apr 2010 01:28 PM

THAT'S TRUE!!!! .... IT ACCEPTED AN EMPTY FUNCTION. AND THATS NOT JUST WITH THIS PROBLEM ALONE. WHAT IS HAPPENING???!!!

even i submitted an empty

justfor @ 2 Apr 2010 01:34 PM

even i submitted an empty program which outputs nothing..

but still got it corrected and i got graded...

codechef lost n forgot the recipe i suppose...!!!!!

I DOUBT IF THIS IS A CONTEST

cybersharp @ 2 Apr 2010 01:40 PM

I DOUBT IF THIS IS A CONTEST AT ALL!!!

HAVE BEEN READING SIMILAR THINGS ABOUT THE "APRIL ALGO CHALLENGE".

I HOPE CODECHEF ADMINS SEE TO IT AND RECTIFY.

ha ha... utter nonsense... i

justfor @ 2 Apr 2010 01:46 PM

ha ha...

utter nonsense...

i won the contest in 2 min by submitting an empty program with one statement (return 0) in my program..

plz guys stop wasting ur brain cells on this nonsense..

seriously  whats the need to

madhav_iiith @ 2 Apr 2010 04:29 PM

seriously  whats the need to conduct the contest!. An empty program which o/p's nothin is getting accepted. !!!!!! Rectify this bug admins.

This is awful!!

cranil @ 2 Apr 2010 04:56 PM

This is awful!!

What is happening here. Even

rajesh10408 @ 2 Apr 2010 05:23 PM

What is happening here. Even I submitted the empty file and got all as correct answer.

What is the output format. In

rajesh10408 @ 2 Apr 2010 06:01 PM

What is the output format. In output it is given F- Friend L- Love A-Affection M- Marriage E - Enemy S- Sister.

But in example it is given E- ENEMY.

In example, everything is in capital letters and there is different number of spaces in between.

Please specify what to do.

Is any registration needed

mehrotra.akash @ 2 Apr 2010 07:32 PM

Is any registration needed for this contest?

@everyone i forgot this game

manohar_bhattarai @ 2 Apr 2010 08:31 PM

@everyone

i forgot this game can anyone elaborate how to calculate after eliminating similar alphabets???

how was ENEMY the answer o/p in the question above???

how did E came??

@admin please give the exact

manohar_bhattarai @ 3 Apr 2010 02:24 AM

@admin

please give the exact input and output desired...

the output should b this

F- Friend L- Love A-Affection M- Marriage E - Enemy S- Sister

or this

Input:
RAHUL
PREETI

Output:
E- ENEMY



Should the words Input: and Output: be displayed in the output???
Somewhere u hav given Uppercase output and before thar u hav given autput as Proper case

Please reply immediately...

Sample output of my PC is as

manohar_bhattarai @ 3 Apr 2010 02:26 AM

Sample output of my PC is as follows:

 

RAHUL

PREETI

E- ENEMY

 

Is this wrong output???

Please justify....

I am new to codechef. What

manohar_bhattarai @ 4 Apr 2010 03:15 PM

I am new to codechef.

What happens after successful submission???

Does any1 gets prize in this contest?

and if we want to know what went wrong with our answer which run successfully in our system bt got "Wrong answer" by codechef.

How can we review what went wrong so that we can take care frm next time?

Please admin tell or the users who got right answer please give hints.

I am askin this as this contest is over...

SUCCESSFUL SUBMISSIONS FOR THIS PROBLEM:

Programming Competition Fetching successful submissions
Directi Go for Gold
CodeChef is a global programming communityCodeChef hosts online programming competitions
CodeChef is a non-commercial competitive programming community
  • About CodeChef
  • About Directi
  • CEO's Corner
  • C-Programming
  • Programming Languages
  • Contact Us
© 2009 Directi Group. All Rights Reserved. CodeChef uses SPOJ © by Sphere Research Labs
In order to report copyright violations of any kind, send in an email to copyright@codechef.com
CodeChef a product of Directi
The time now is:
CodeChef - A Platform for Aspiring Programmers

CodeChef was created as a platform to help programmers make it big in the world of algorithms, computer programming and programming contests. At CodeChef we work hard to revive the geek in you by hosting a programming contest at the start of the month and another smaller programming challenge in the middle of the month. We also aim to have training sessions and discussions related to algorithms, binary search, technicalities like array size and the likes. Apart from providing a platform for programming competitions, CodeChef also has various algorithm tutorials and forum discussions to help those who are new to the world of computer programming.

Practice Section - A Place to hone your 'Computer Programming Skills'

Try your hand at one of our many practice problems and submit your solution in a language of your choice. Our programming contest judge accepts solutions in over 35+ programming languages. Preparing for coding contests were never this much fun! Receive points, and move up through the CodeChef ranks. Use our practice section to better prepare yourself for the multiple programming challenges that take place through-out the month on CodeChef.

Compete - Monthly Programming Contests and Cook-offs

Here is where you can show off your computer programming skills. Take part in our 10 day long monthly coding contest and the shorter format Cook-off coding contest. Put yourself up for recognition and win great prizes. Our programming contests have prizes worth up to Rs.20,000 and $700lots more CodeChef goodies up for grabs.

Discuss

Are you new to computer programming? Do you need help with algorithms? Then be a part of CodeChef's Forums and interact with all our programmers - they love helping out other programmers and sharing their ideas. Have discussions around binary search, array size, branch-and-bound, Dijkstra's algorithm, Encryption algorithm and more by visiting the CodeChef Forums and Wiki section.

CodeChef Community

As part of our Educational initiative, we give institutes the opportunity to associate with CodeChef in the form of Campus Chapters. Hosting online programming competitions is not the only feature on CodeChef. You can also host a coding contest for your institute on CodeChef, organize an algorithm event and be a guest author on our blog.

Go For Gold

The Go for Gold Initiative was launched about a year after CodeChef was incepted, to help prepare Indian students for the ACM ICPC World Finals competition. In the run up to the ACM ICPC competition, the Go for Gold initiative uses CodeChef as a platform to train students for the ACM ICPC competition via multiple warm up contests. As an added incentive the Go for Gold initiative is also offering over Rs.8 lacs to the Indian team that beats the 29th position at the ACM ICPC world finals. Find out more about the Go for Gold and the ACM ICPC competition here.

Domain Name Registration, Web hosting, and Website Design provided by BigRock.com