Search found 25 matches

by rezaeeEE
Thu Feb 28, 2008 1:49 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16518

help

thanks DP. but still WA. #include <iostream> #include <vector> #include <string> #include <algorithm> //#include <fstream> using namespace std; //fstream fout( "out.txt" ); const int ted = 62; int prime[ted], n, t; string p[ted]; int q, dp[68][17][1010]; bool pr[301] = {0}; int solve( int ptr, int c...
by rezaeeEE
Fri Feb 15, 2008 8:33 pm
Forum: Volume 111 (11100-11199)
Topic: 11125 - Arrange Some Marbles
Replies: 20
Views: 12743

got WA

i can't find any bug in my code. Can any body help me? #include <iostream> using namespace std; int dp[8][8][8][8][4][4][4][4]; int solve( int a1, int a2, int a3, int a4, int siz, int fir, int last, int firsize ){ if( dp[a1][a2][a3][a4][siz][fir][last][firsize] != -1 ) return dp[a1][a2][a3][a4][siz]...
by rezaeeEE
Thu Feb 14, 2008 9:24 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 16518

got WA

my program passed all the testcases what exist in this thread. Can any body help me? #include <iostream> #include <vector> #include <string> #include <algorithm> //#include <fstream> using namespace std; //fstream fout( "out.txt" ); const int ted = 62; int prime[ted], n, t; string p[ted]; int q, dp[...
by rezaeeEE
Sat Oct 06, 2007 9:14 pm
Forum: Volume 4 (400-499)
Topic: 437 - The Tower of Babylon
Replies: 14
Views: 7879

help

my code returns the wrong answer with the testcases that exist in this post. but i cant find my buge. can any body help me? #include <iostream> #include <algorithm> #include <queue> using namespace std; int bob[30][3]; int h[30][3][3]; int n; int height(int id, int i, int j) { int a[3] = {0}; a[i] =...
by rezaeeEE
Sun Sep 16, 2007 12:41 am
Forum: Volume 109 (10900-10999)
Topic: 10925 - Krakovia
Replies: 50
Views: 21296

got wa

i get wa. can any body find my buge? i cant find it. #include <iostream> #include <string> using namespace std; string sum(string s1, string s2) { string s3; int l1 = s1.length(); int l2 = s2.length(); int ptr1 = l1 - 1, ptr2 = l2 - 1, q = 0; while( ptr1 >= 0 || ptr2 >= 0 ) { if(ptr1 >= 0) q += s1[p...
by rezaeeEE
Fri Aug 31, 2007 2:30 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31308

help

thank u very much for your tricky test case.

i find my bug and got AC.

thank u.
by rezaeeEE
Fri Aug 31, 2007 12:22 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31308

help

my code returns this.

can u find any bug in my code?
please explain your algo.
my code returns a correct output for all the test cases .
should i sort the input?
my algo is wrong?
thanks.
by rezaeeEE
Thu Aug 30, 2007 7:09 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31308

help

what is the output for this input:
2 2 2 ?
by rezaeeEE
Thu Aug 30, 2007 6:31 pm
Forum: Volume 109 (10900-10999)
Topic: 10930 - A-Sequence
Replies: 102
Views: 31308

help

i get wa with sorting and without sorting.
can any body help me?

Code: Select all

Removed after AC
by rezaeeEE
Tue Aug 21, 2007 2:54 pm
Forum: Volume 112 (11200-11299)
Topic: 11218 - KTV
Replies: 11
Views: 6228

help

i cant find any bug in my code. can any body help me. i get WA. #include <iostream> #include <algorithm> using namespace std; int score[80]; int s[80][3]; bool gr[80][80]; int main() { int n; int t = 1; while(cin >> n, n) { memset(gr, 0, sizeof(gr)); for(int i = 0;i < n;i++) cin >> s[i][0] >> s[i][1...
by rezaeeEE
Wed Aug 15, 2007 4:50 pm
Forum: Volume 6 (600-699)
Topic: 638 - Finding Rectangles
Replies: 13
Views: 5852

help

very very silly mistake.

my program cout << endl 11 perline.

thanks mr jane.
i got accept.
by rezaeeEE
Tue Aug 14, 2007 10:54 pm
Forum: Volume 6 (600-699)
Topic: 638 - Finding Rectangles
Replies: 13
Views: 5852

help

thank u very much mr jan.

for this input:
4
B 1 1
A 0 0
C 1 0
D 0 1

the output must be : No rectangles ??

can u give me some tricky inputs.thanks.
by rezaeeEE
Tue Aug 14, 2007 1:04 pm
Forum: Volume 6 (600-699)
Topic: 638 - Finding Rectangles
Replies: 13
Views: 5852

help

i cnat understand this sentence:

"Within each set, points labels occur in alphabetical order"

can any body explain this with a example?

i get wa and i dont know which part of my program is wrong.
by rezaeeEE
Mon Jul 23, 2007 9:31 pm
Forum: Volume 8 (800-899)
Topic: 871 - Counting Cells in a Blob
Replies: 27
Views: 14511

help

i get wa in 0.000. please help. #include <iostream> #include <string> using namespace std; int mx; int ptr; string s[26]; bool visited[26][26]; int len; int isin(int i, int j) { if(i >= 0 && j >= 0 && i < ptr && j < len) return 1; return 0; } int dfs(int i, int j) { if(!isin(i, j) || visited[i][j] |...
by rezaeeEE
Mon Jul 23, 2007 2:11 pm
Forum: Volume 8 (800-899)
Topic: 871 - Counting Cells in a Blob
Replies: 27
Views: 14511

get wa

i get wa in 0.000. can aney body help me? #include <iostream> #include <string> using namespace std; int mx; int ptr; string s[26]; bool visited[26][26]; int len; int isin(int i, int j) { if(i >= 0 && j >= 0 && i < ptr && j < len) return 1; return 0; } int dfs(int i, int j) { if(!isin(i, j) || visit...

Go to advanced search