Thanks @vijju123
https://www.codechef.com/viewsolution/13976703
Can any one tell me any tc on which this soln fails???
I have tried alot to solve this problem
I implemented it using nested dictionaries. I realise this is inefficient, but can someone tell me what testcase mine isnāt working on ?
Hi
I am using Trie for solving thisā¦ Total 3 TCs are failing . Could somebody help meā¦
https://www.codechef.com/viewsolution/14361002
Please help meā¦
Hi I have tried all below TCs all are running fine . but I am getting WA in two TCs Please suggest any TC which I am missing
4
+ youtube
+ abcd
+ abcdchef
+ zzyy
Output
0
//// all negative
5
- abcdchef
- youtube
- youtubeisbest
- google
- googled
Output :
3
a
g
y
/// show strings in sorted order
6
+ google
+ googld
- googles
- googlea
- googlds
- googldr
OUTPUT :
4
googldr
googlds
googlea
googles
/////////
Any mathched -ve string shorter then positive
4
+ google
+ googld
- goog
- googles
OUTPUT :
-1
//////
Any mathched +ve string Longer then negative
3
- goog
- googles
+ google
OUTPUT :
-1
//same string its not allowed but still i checked this
2
- abc
+ abc
OUTPUT
-1
enter code here
this weird , the setterās and testerās solution link is just the link to editorial again
Yes. This editorial only has editorialistās solution at the moment.
Hiļ¼anyone can help me figure out the problem below ?
the only difference for this two solution is
int n;
char c;
scanf("%d",&n);
for(int i = 0; i < n; i++)
{
getchar();
c = getchar();
cin >> s;
and
int n;
char c;
scanf("%d",&n);
for(int i = 0; i < n; i++)
{
cin >> c >> s;
the first one gets wrong answer, but the second one gets accepted.
the first solution link text
the second solution link text
but in local enviroment, I tested the first one , it can input and output normally with the samples.
thanks XD