Search found 25 matches

by fresher96
Sun Apr 12, 2015 12:54 pm
Forum: Volume 117 (11700-11799)
Topic: 11753 - Creating Palindrome
Replies: 8
Views: 3708

Re: 11753 - Creating Palindrome

can this problem be solvable using DP, if so how to reduce the O(n^2) complexity ?
by fresher96
Wed Oct 29, 2014 10:15 pm
Forum: Volume 100 (10000-10099)
Topic: 10036 - Divisibility
Replies: 37
Views: 10078

Re: 10036 - Divisibility

brianfry713 wrote:Change line 5 to:
#define MAXX 10001
Got it :D
thanks a lot
by fresher96
Wed Oct 29, 2014 7:56 pm
Forum: Volume 100 (10000-10099)
Topic: 10036 - Divisibility
Replies: 37
Views: 10078

Re: 10036 - Divisibility WA

i tested this code with many cases and can't find the wrong part can anyone help ? #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> /**/ #define MAXX 10000 #define KMAXX 100 int mem[MAXX][KMAXX]; int k,n; int p[MAXX]; /**/ int fix(int a) { return (a % k + k) % k; } int tryAll2(...
by fresher96
Mon Oct 20, 2014 1:27 am
Forum: Volume 101 (10100-10199)
Topic: 10152 - ShellSort
Replies: 33
Views: 8200

Re: 10152 - ShellSort

lighted wrote:The following text is written here http://www.programming-challenges.com/pg.php?page=index
thanks Mr. lighted :)
by fresher96
Sun Oct 12, 2014 3:59 am
Forum: Volume 101 (10100-10199)
Topic: 10152 - ShellSort
Replies: 33
Views: 8200

Re: 10152 - ShellSort _ WA with PC judge

if any one have interest in "programming-challenges.com" judge do you have any idea what is wrong with it. this is about the fifth problem for me that is accepted with uva and have "wrong answer" with PC judge is the problem with that judge or the test cases are different which means that uva tests ...
by fresher96
Tue Oct 07, 2014 6:43 am
Forum: Volume 101 (10100-10199)
Topic: 10191 - Longest Nap
Replies: 75
Views: 22245

Re: 10191 - Longest Nap

thanks a lot guys for the critical inputs
who would ever guess that this bastard is a multitask :3 :-?
by fresher96
Tue Oct 07, 2014 1:27 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 22714

Re: 10037 - Bridge

hey guys !
any one who got this problem accepted in "programmingchallenges.com"
can share any tips ??
or post the AC output for

Code: Select all

2

8
1
2
3
4
5
6
7
8

7
1
2
3
4
5
6
7
or know how the order of the output should be
by fresher96
Tue Sep 30, 2014 5:31 pm
Forum: Volume 8 (800-899)
Topic: 843 - Crypt Kicker
Replies: 51
Views: 24173

Crypt Kicker :Mis_Judging

Mr. saadtaame you ignored part of the problem description it says To ensure that the encryption is reversible, no two letters are replaced by the same letter. adding this to your "is_solution()" function you would get AC int QW; for(y=0;y<26;y++) for(QW=0;QW<26;QW++) if(QW != y && m[QW] != '\0' && m...
by fresher96
Mon Sep 29, 2014 10:09 pm
Forum: General
Topic: verdicts
Replies: 2
Views: 9221

Re: verdicts

Thanks a lot Master :D
by fresher96
Sun Sep 28, 2014 1:17 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 23434

Re: 195 - Anagram

hey guys
how about this trick it may help :D

Code: Select all

int alph_ord(char c)
{
	if(isupper(c))
	{
		return (c-'A')*2;
	}
	else
	{
		return (c-'a')*2+1;
	}
}
bool cmp(const char &a,const char &b)
{
	return alph_ord(a) < alph_ord(b);
}
by fresher96
Sat Sep 27, 2014 6:23 pm
Forum: General
Topic: verdicts
Replies: 2
Views: 9221

verdicts

hey guys i wounder about the online judge verdicts how does the judge do judge the submitted codes ? it gives RE if the program crashes during the test cases but i mean in general and especially for the TL does it mean that your code is right but not efficient or maybe it's wrong that means the judg...
by fresher96
Fri Sep 19, 2014 12:49 am
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 37954

Re: 10044 - Erdos Numbers

hey guys i spent a whole day solving this problem and finally got it right and want to revenge :evil: it's not really that hard but it's kind of a mystery for you who gave up here's my incompetence approach if you wish for it's very simple by the way hope to be useful #define _CRT_SECURE_NO_WARNINGS...
by fresher96
Tue Sep 16, 2014 8:40 pm
Forum: Volume 100 (10000-10099)
Topic: 10044 - Erdos Numbers
Replies: 102
Views: 37954

Re: 10044 - Erdos Numbers TL

.
by fresher96
Tue Sep 16, 2014 3:58 pm
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 22086

Re: 10205 - Stack 'em Up

brianfry713 wrote:Don't use fflush(stdin)
:D thanks a lot Master !
i'm sorry for that <dumb> mistake i almost cried
by fresher96
Mon Sep 15, 2014 2:14 am
Forum: Volume 102 (10200-10299)
Topic: 10205 - Stack 'em Up
Replies: 60
Views: 22086

Re: 10205 - Stack 'em Up WA

:cry: hey guys please help me i have got about 8 WA my code is very simple and it passed all the test cases in this forum any help ?? #include <iostream> #include <string> #include <sstream> #include <fstream> using namespace std; //ofstream fout("out.txt"); int T; int switches[101][53]; void print(...

Go to advanced search