Search found 21 matches

by porker2008
Sat Nov 08, 2008 10:43 pm
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 21393

To abid_iut

Please try this case: *abcd * means a space My AC code produce: 00199897923 But your code just produce 2 blank lines. Also, there are some problems in decoding. your code cannot handle the number bigger than 99. Such as: 001 My AC code produce: d However, your code did nothing but output 2 blank lin...
by porker2008
Fri Nov 07, 2008 6:27 am
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 18331

Re: Help me about 306 (CE)

Maybe u are using VC6 as your compiler...

VC6 will not complain if you use a variable that had been declared but blinded.

However, gcc & g++ will complain.
by porker2008
Thu Nov 06, 2008 7:36 pm
Forum: Volume 5 (500-599)
Topic: 562 - Dividing coins
Replies: 73
Views: 29914

To naffi

i think there are some misunderstandings between u and LIMON. u thought programmers should not show their acc code, and LIMON just want to let others who can not pass the questions get help. If u are serious and confident that u can solve the problem, u should not refer to the website. However, if u...
by porker2008
Thu Nov 06, 2008 7:21 pm
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 18331

Re: Help me about 306 (CE)

Please look at this for-loop. i is blinded. You can't use it before declare it. for(i=0;i<lomba;i++) { c_char[key[i]-1] = d_char[i]; } I suggest you change it like this way as you use before: for(int i=0;i<lomba;i++) { c_char[key[i]-1] = d_char[i]; } Hope it helps. :D
by porker2008
Wed Nov 05, 2008 1:47 pm
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17089

Re: 369 WA even if it works for every test case i found :S

Keep trying...

You will succeed anyway...

If you have further questions, please feel free to ask. :D
by porker2008
Wed Nov 05, 2008 11:49 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17089

Re: 369 WA even if it works for every test case i found :S

This problem is the same as Problem 530. You can find some test cases on thread 530. ------------------------ I recommand you to use long long integer to record the result. Also, you can not assume m could not be ZERO. If n!=0 && m=0, you should output 1. Sample input: 10 0 0 0 Sample output: 10 thi...
by porker2008
Tue Nov 04, 2008 1:08 pm
Forum: Volume 5 (500-599)
Topic: 591 - Box of Bricks
Replies: 80
Views: 11122

To "vinocit"

Hi. This is an easy problem. But please be careful about its output standard. Output a blank line after each set. That's why you get WA. You didn't put any blank line after them. I have tested for you. if this line cout<<"The minimum number of moves is "<<mov<<".\n"; changes to cout<<"The minimum nu...
by porker2008
Tue Nov 04, 2008 12:51 pm
Forum: Volume 1 (100-199)
Topic: 118 - Mutant Flatworld Explorers
Replies: 68
Views: 9143

To "sakhassan".

Your solution even can not handle the example input!!! Sample input: 5 3 1 1 E RFRFRFRF 3 2 N FRRFLLFFRRFLL 0 3 W LLFFFLFLFL Sample output: 1 1 E 3 3 N LOST 2 3 S Your code produces: 1 1 E 3 3 N LOST 0 3 S LOST Please check your program. If the preview robots leave a "scent" on a block, the latter r...
by porker2008
Mon Nov 03, 2008 5:07 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 35318

Re: 272 -WA-Plz help to debug it!!!

To "mahmoud.helmy" Actually, you need not to memorize what the input is. You just need to make an integer to memorize what the quato is. For example, you can use this code to finish the job. char c; int num=0; while((c=getchar())!=EOF){ if(c=='"'&&num==0) {num=1; printf("``");} else if(c=='"'&&num==...
by porker2008
Mon Oct 20, 2008 9:58 am
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 9154

Re: 227 puzzle

After reading so many suggestions, I got AC now. However, I found a very serious problem. The first character of the puzzle might be Z !!! When you use getchar(), you can't know whether there will be any characters following 'Z'. I think most of you will search the character and if you found it was ...
by porker2008
Mon Oct 20, 2008 8:14 am
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 4925

Re: proble-200,rare-order - why presentation error?

You must loss the endl at the end of the output.

However, I don't think your algorithm is good enough.

But it will be ok if the time limit is not exceeded.
by porker2008
Fri Oct 17, 2008 10:01 am
Forum: Volume 3 (300-399)
Topic: 302 - John's trip
Replies: 20
Views: 4829

Re: Why 302 TLE?

#include<iostream> #include<vector> using namespace std; void check(int i,int loc); vector<int> a1,a2,street; int order[2000]; bool finish=false,pass=false; int num; bool used[2000]; bool checked[2000]; int main(){ int b1,b2,st; while(cin>>b1>>b2){ a1.clear(); a2.clear(); street.clear(); if(b1==0&&...
by porker2008
Fri Oct 17, 2008 9:53 am
Forum: Volume 3 (300-399)
Topic: 302 - John's trip
Replies: 20
Views: 4829

Why 302 TLE?

I have solved 302 by using DFS Algorithm. However, I get TLE.

I don't know what kind of cases will lead to TLE. Can somebody tell me.

I find my program run fast on my computer even though the cases are very complicated.

I think I must ignore some special cases that beyond my thinking.
by porker2008
Fri Oct 17, 2008 7:36 am
Forum: Volume 1 (100-199)
Topic: 148 - Anagram checker
Replies: 31
Views: 3902

Re: 148 - Anagram checker (TLE)

Is It built by youself?
That's great.

However, I can't find the solution of 148.
But now I have got AC.

Thank you anyway.
by porker2008
Fri Oct 17, 2008 7:27 am
Forum: Volume 1 (100-199)
Topic: 114 - Simulation Wizardry
Replies: 80
Views: 7473

Re: MY GOD!!! - Problem about Q114

I got AC now.

Anyway, thank you very much.

Go to advanced search