Search found 52 matches

by lovemagic
Thu Nov 15, 2007 5:58 am
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 43485

mohsincsedu wrote: Before post anything u must read the previous posts carefully.... i think i read them carefully. Or if i overlooked something, can u tell me the matter for which i m getting WA? p.s. i use char & modify the char value by adding 128 before using it as a array index. I think u alrea...
by lovemagic
Wed Nov 14, 2007 6:44 am
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 43485

where's my wrong?

Code: Select all


....got AC

the scanf part with %c made the trouble....
by lovemagic
Wed Oct 10, 2007 6:11 pm
Forum: Volume 112 (11200-11299)
Topic: 11260 - Odd Root Sum
Replies: 22
Views: 11375

to avoid negetive answer,u can add the modulo value(100000000) to the ans.
& also check the sqrt function. For larger input value(around 10^16 & above), sqrt doesnt work perfectly.
by lovemagic
Tue Oct 09, 2007 8:25 pm
Forum: Volume 113 (11300-11399)
Topic: 11308 - Bankrupt Baker
Replies: 17
Views: 7469

finally got AC...... :D my q-sort function works well. ya,there's no need to check the "uppercase" & "lowercase" matter in this problem.Though the word "lexicographically" means "order in the dictionary" according to the POD. The mistake was in the part if(Count==0){ printf("Too expensive!\n"); cont...
by lovemagic
Tue Oct 09, 2007 8:23 pm
Forum: Volume 113 (11300-11399)
Topic: 11308 - Bankrupt Baker
Replies: 17
Views: 7469

finally got AC...... :D my q-sort function works well. ya,there's no need to check the "uppercase" & "lowercase" matter in this problem.Though the word "lexicographically" means "order in the dictionary" according to the POD. The mistake was in the part if(Count==0){ printf("Too expensive!\n"); cont...
by lovemagic
Mon Oct 08, 2007 4:16 pm
Forum: Volume 113 (11300-11399)
Topic: 11308 - Bankrupt Baker
Replies: 17
Views: 7469

to sclo,

i used the make_lower function to compare lexicographically when the cost of more than one recipe are equal. as far as i know, in lexicographical order 'a' & 'A' are same.

thanx for ur reply. can u give me some test case or tell me if u see any wrong in my code?
by lovemagic
Mon Oct 08, 2007 10:22 am
Forum: Volume 113 (11300-11399)
Topic: 11308 - Bankrupt Baker
Replies: 17
Views: 7469

i dont know why i m getting WA. somebody help me? #pragma warning(disable:4786) #include <cstdio> #include <string> #include <cstring> #include <iostream> #include <map> #include <stdlib.h> using namespace std; struct Recipe{ char name[105]; char lower[105]; int p; }recipe[105]; int sort(const void ...
by lovemagic
Sat Sep 08, 2007 2:19 am
Forum: Volume 9 (900-999)
Topic: 962 - Taxicab Numbers
Replies: 16
Views: 10282

u can solve it without precalculation.
but remember,u have to fix the upper & lower bound carefully.
by lovemagic
Thu Jun 28, 2007 5:35 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13414

Thanx for ur reply.Now i understood.
Got AC...... :D
by lovemagic
Tue Jun 26, 2007 1:00 am
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 13414

can somebody explain when the output should be negetive? & how can i handle negetive number?
by lovemagic
Wed Jun 20, 2007 1:29 am
Forum: Volume 109 (10900-10999)
Topic: 10905 - Children's Game
Replies: 66
Views: 25699

a simple bubble sort will do as N (≤ 50).
by lovemagic
Tue Jun 19, 2007 11:39 pm
Forum: Volume 111 (11100-11199)
Topic: 11121 - Base -2
Replies: 23
Views: 14552

yeah,i already got it.
thanx :lol:
by lovemagic
Tue Jun 19, 2007 1:02 am
Forum: Volume 111 (11100-11199)
Topic: 11121 - Base -2
Replies: 23
Views: 14552

can somebody tell me where's my wrong?

Code: Select all


code removed...

by lovemagic
Mon Jun 18, 2007 1:12 am
Forum: Volume 109 (10900-10999)
Topic: 10905 - Children's Game
Replies: 66
Views: 25699

can anyone tell me why my code gets WA?

Code: Select all


AC 

:D
by lovemagic
Wed Aug 30, 2006 1:23 am
Forum: Volume 4 (400-499)
Topic: 451 - Poker Solitaire Evaluator
Replies: 18
Views: 4577

can somebody give me some test case?I passed the cases(multiple input) by Red Scorpion & it seems to me my code is right.but the OJ gives me WA..... here is my code.... #include <stdio.h> #include <string.h> int count[11]; char way[11][6][3]; char input[6][6][3],s[30]; int check_straight_flush(int i...

Go to advanced search