Search found 50 matches

by just_yousef
Thu Jun 11, 2015 2:03 pm
Forum: Volume 123 (12300-12399)
Topic: 12359 - Diccionário Portuñol
Replies: 0
Views: 2623

Re: 12359 - Diccionário Portuñol

until now I constructed prefix trie for the first group of words and a suffix trie for the second one, but I can't figure out the next step.

Any useful hints ??
by just_yousef
Sat May 09, 2015 3:53 pm
Forum: Volume 114 (11400-11499)
Topic: 11402 - Ahoy, Pirates!
Replies: 45
Views: 15528

Re: 11402 - Ahoy, Pirates!

hey,
Im getting TLE using segment tree with lazy propagation.
this is my code: http://ideone.com/3QmSt8
any help please.
by just_yousef
Wed Feb 18, 2015 7:58 pm
Forum: Volume 105 (10500-10599)
Topic: 10557 - XYZZY
Replies: 31
Views: 14718

Re: 10557 - XYZZY

Im getting RTE on this problem using this code: any help ? #include <bits/stdc++.h> using namespace std; int n, m, x, dist[111], par[111], enrg[111], vist[111][100 * 100 * 2], maxDist[111], id; bool reach; char ans[][11] = { "hopeless", "winnable" }; vector<vector<int> > arr; bool dfs(int x, int des...
by just_yousef
Wed Feb 18, 2015 9:55 am
Forum: Volume 117 (11700-11799)
Topic: 11709 - Trust groups
Replies: 9
Views: 4248

Re: 11709 - Trust groups

will i tried before and it did not terminate :evil: :evil:
I found the bug thanks :D
by just_yousef
Sat Feb 14, 2015 1:44 am
Forum: Volume 117 (11700-11799)
Topic: 11709 - Trust groups
Replies: 9
Views: 4248

Re: 11709 - Trust groups

any idea why this code gets WA ?? #include <bits/stdc++.h> using namespace std; const int N = 1001; int n, m, vist[N], low[N], disc[N], in[N], id, ans; char s[11], x[11]; map<string, int> val; vector<vector<int> > arr; vector<int> stk; void dfs(int x) { static int tim = 0; low[x] = disc[x] = ++tim; ...
by just_yousef
Fri Feb 13, 2015 12:08 am
Forum: Volume 107 (10700-10799)
Topic: 10765 - Doves and bombs
Replies: 7
Views: 4556

Re: 10765 - Doves and bombs

Never mind I found the bug :D
by just_yousef
Thu Feb 05, 2015 9:35 pm
Forum: Volume 105 (10500-10599)
Topic: 10505 - Montesco vs Capuleto
Replies: 73
Views: 37189

Re: 10505 - Montesco vs Capuleto

thanks :D
by just_yousef
Thu Feb 05, 2015 9:35 pm
Forum: Volume 100 (10000-10099)
Topic: 10085 - The most distant state
Replies: 10
Views: 3172

Re: 10085 - The most distant state

no my problem in the first place that it produces answers with longer path.
and i don't know why ??
by just_yousef
Thu Feb 05, 2015 6:21 pm
Forum: Volume 105 (10500-10599)
Topic: 10505 - Montesco vs Capuleto
Replies: 73
Views: 37189

Re: 10505 - Montesco vs Capuleto

this problem is driving me crazy :evil: :evil: :evil:
please tell me what is wrong with my code

Code: Select all

AC
by just_yousef
Thu Feb 05, 2015 4:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10085 - The most distant state
Replies: 10
Views: 3172

Re: 10085 - The most distant state

my code with map<string,int> was too slow so i tried to use hashing but i always get a path mush longer than the answer this is my code #include<bits/stdc++.h> using namespace std; int t, dx[] = { -1, 0, 1, 0 }, dy[] = { 0, 1, 0, -1 }, state[10], par[1000000], vist[1000000], id; char move[5] = "URDL...
by just_yousef
Sun Jan 25, 2015 5:59 am
Forum: Volume 119 (11900-11999)
Topic: 11926 - Multitasking
Replies: 21
Views: 6696

Re: 11926 - Multitasking

what is wrong with my code ?? I passed all test cases in this post and still getting WA :( :( #include<bits/stdc++.h> using namespace std; int n, m, a, b, c; vector<pair<pair<int, int>, int> > arr; char ans[][33] = { "CONFLICT", "NO CONFLICT" }; int test(int x, int y, int z, int g) { return ((x > z ...
by just_yousef
Wed Aug 13, 2014 1:47 am
Forum: Volume 117 (11700-11799)
Topic: 11753 - Creating Palindrome
Replies: 8
Views: 3952

Re: 11753 - Creating Palindromes

Got AC With regular DP and a special condition, Like Problem 10453 - make palindrome
But Solution is slow :/
and ideas for better solution ??
by just_yousef
Thu Aug 07, 2014 1:24 pm
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 11324

Re: problem 164 .. why WA !! ???

Thanks lighted, Finally AC :D
by just_yousef
Thu Aug 07, 2014 1:13 am
Forum: Volume 1 (100-199)
Topic: 164 - String Computer
Replies: 120
Views: 11324

Re: problem 164 .. why WA !! ???

I got 11 WA, Please Help !! :(

Code: Select all

AC
by just_yousef
Sat Aug 02, 2014 2:58 am
Forum: Volume 109 (10900-10999)
Topic: 10949 - Kids in a Grid
Replies: 30
Views: 11821

Re: 10949 - Kids in a Grid

Im sorry but is I still don't get the idea, i changed my code to this: #include<bits/stdc++.h> using namespace std; char grid[22][22], s1[20002], s2[20002]; int t, n, m, k, x, y, l1, l2, cas = 1, mem[20001][20001]; int solve() { for (int i = 0; i <= l1; ++i) { for (int j = 0; j <= l2; ++j) { if (!i ...

Go to advanced search