« first day (32 days earlier)    last day (15 days later) » 

3:38 AM
right, but at least, it's an unlikely place for her to visit, that's it
 
4:19 AM
So, that would be a great way, thankfully it exists :D
So, if you can create a room there, and I ll get the test cases today I believe
I am really looking to see what the 2 test case might be
 
 
1 hour later…
5:31 AM
From FAQ:
> Will these rooms exist forever?

> Rooms will exist indefinitely, so long as there is at least one person actively talking in the room. A room is considered worth retaining if it has more than 15 messages by at least 2 users.
 
I see
 
And we discussed quite a number of different regex, it's likely they might want to keep it for that reason as well.
 
right
 
And as long as this room exists, she'll read your request for a new room and knows where to look for...
 
exactly
then, this is my home then
:D
our home, if she comes, we shall be polite and says hello, and if you want to learn something, you re welcome :D
right
yes she is well structured
:D
but at least
we can get the room be frozen
like before
it will after 7 days
haha
I see
I just meant like chat room active is more susceptible
frozen no body looks for that
and then we create that one in stack exchange
it should be easy
right
like we leave this one, get another one in stack exchange, resume our discussion
 
5:42 AM
Does she have time for such activities at all??? I'd expect her to be pretty busy, and maybe she want's to enjoy a bit of private live in the evening, instead of digging through countless chat rooms here and elsewhere...
 
exactly, that's exactly what I was thinking, till, recently, she started behaving weirdly, even our classmates asked her what is going on
seeming very anxious, proof of that, 4 days ago there was exam on regex
4 of us didn't qualify for, till next month, there are levels 1-3
3 most difficult
she gave them a hard 1
one person managed to pass the least: 1
So
That's the background of why this is
you don't have to hear about this
but at least to know the sources
of why I say this
Ah and I see some coding chat rooms in stack exchange too
 
6:09 AM
Well... Just let's be nice to her here...
 
:D
I don't think shell like (well structured either) haha
 
Or at least leave criticising her to me. I do factual critisism only anyway (tasks being unprecise/leaving issues open)), and if she cannot live with that I – anyone – cannot help her...
 
right
at least, there is this very last solution
 
By the way, any new information about Jaccard index?
 
right
it's a very strange problem
I did some weird things to get from test case 3 to 7
this one
gives wrong answer 3
but this one gives wrong answer 7!
one moment
and the 7 test case is
X9 T32 +{2Fp? ZGTu-FG 😛
xWJmm<$)R3KPQ85
can you imagine?!
right answer is 0.027027027027027028527
our output is 0.052632
 
6:30 AM
if (length_s1 > length_s2)
    length_s2--;
if (length_s1 == length_s2 + 2)
    length_s1++;
What did you intend by that???
 
just seeing how inputs are
and tried to experiment with what might be the problem
like if s1 > s2, then maybe '\r' might be inserted
 
You are aware that this is not effective in most cases anyway?
 
right
but just seeing if it would pass any test case
not like all cases
but trying to catch some pattern
 
There needs to be an initial difference of exactly 3 characters!
In any other case, no effect.
 
that's the pattern?
 
6:35 AM
No.
But:
length2-- won't make length2 smaller than length1.
 
right
 
So no effect on the minimum you apply afterwards.
Then the equality check will increase length 1
Ah, wait...
ls1 == ls2 + 2 only can apply if ls1 < ls2
So if ls1 > ls2 initially, this one cannot be in effect.
So first if is egalised by minimum later, and second one is in effect only if difference is exactly 2 (not 3 – bad reading of code of mine...).
But what, if differ more or less in length? No effect at all...
Instead, this code might provoke the impression that you tried to adjust your algorithm to a very specific test case, solely not that obvious as with if(s1 == ... && s2 == ...).
 
right
so what is your proposal?
also
 
Get rid of the questionmarks we have to the algorithm.
 
you mean
if (length_s1 > length_s2)
length_s2--;
if (length_s1 == length_s2 + 2)
length_s1++;
?
 
6:44 AM
No.
That's useless.
 
what did you mean by the questionmarks?
 
How the algorithm actually is intended to work.
Apparently, it is not comparing character by character only.
But what then?
 
right
 
She mentioned number of differing substring in another task later.
 
right
can it be something to the min function
maybe there should be some adjustment to the min
 
6:46 AM
No. That's fine.
 
right,I mean based on your comparison between the first 3 WA
and 7 one
 
It prevents undefined behaviour (and possibly crash) due to reading shorter string out of bounds.
 
yes
 
Even if it doesn't crash, you might read arbitrary values afterwards, just garbage. So results might differ from programme run to programme run...
 
yes
 
6:50 AM
Comparing all substrings – remember my map approach?
 
I see
 
To me, that appears the most accurate one.
 
you think that one should work fine
 
Scientifically.
 
right
 
6:51 AM
But we cannot divide by sum of lengths that way, as this might result in division by 0.
We'd have to divide by number of total possible substrings.
 
right
you mean this
map<string, size_t> getAllSubstrings(string const& s)
{
	map<string, size_t> map;

	for (size_t i = 1; i <= s.length(); ++i)
	{
		for (size_t j = 0; j <= s.length() - i; j++)
		{
			auto sub = s.substr(j, i);
			++map[sub];
		}
	}
	return map;
}
 
Yes.
 
and actually it is the right one
 
But it produced non-matching results even for very first task.
 
because I remember some last year solved it this way
not this particular way
but this one
 
6:54 AM
But you cannot divide by sum of length that way.
 
You'd need sum of all possible substrings in both strings.
s1.length() * s1.length() / 2 + s2.length() * s2.length() / 2
 
    size_t count = 0;
	for (auto& p : subs1)
	{
		count += min(p.second, subs2[p.first]);
	}

	double ratio = ((double)count / (subs1.length() + subs1.length() - count));
and this
?
@Aconcagua I see
 
Yes. Otherwise risk of division by 0.
 
So
also, 😛
this is included, isn'that strange?
 
6:59 AM
Depends on encoding.
 
but this is not ascii
 
If encoded utf-8, it's a multi-byte character.
 
yes
I was told
no multibytes
 
They might use some extended ascii flavour.
E. g. ISO latin 1.
 
You are given two strings S1 and S2 that can contain any ASCII symbols, except for the line feed character.
 
7:01 AM
Then at least first of these two bytes is in upper range of [128, 256).
But if you look with your text editor at, it might interprete these two ISO latin 1 characters as one single utf-8 one.
 
i see
 
Let's assume we have a text '[...]×[...]', including the multiplication sign of ISO latin 1.
It's value is 0xD7, i. e. 0b'1101'0111
But that's a legal unicode character as well.
It indicates start of a multibyte sequence of exactly two characters.
It needs to be followed by a character having 10 as most significant bits.
That could be e. g. inverted exclamation mark ¡.
Then we produce with ס a valid unicode character.
 
right
but i asked
I was told it shouldn't be in test case
 
屩 would produce another valid Unicode character, this time one with three bytes...
Well, yet another option:
Your editor repaced :) or ;) with a smiley...
 
7:18 AM
I see
well, let's suppose we will only have single byte characters
 
You might look at the file with most simple notepad, it won't do such replacements. It won't even recognise line breaks, if they are not exactly \r\n.
 
yes
 
emacs another nice option, would even show a special character for \r being contained.
 
so we have the map version available now
assuming only single byte characters
 
It's the scientifically most correct one probably.
But it fails to reproduce desired outputs for very first Jaccard task already.
 
7:21 AM
you mean
we tested it
I don't think we even tested it
?
because we haven't had a working version already
 
We tested it locally and had differences from 0.030303...
A variant might be, though:
n * (n + 1) / 2 <= n*n, n >= 1
sqrt((n*n + m*m) / 2) < max(n, m)
 
I see
combining all
 
And as the count is less than this sum inside, we could calculate the square root of it's half, and that value wouldn't get larger or (especially!!!) equal to n + m.
If we could allow not to devide by 2 would yet have to be proven...
In which case would we get the maximum of matches? Two equal strings, right?
So then we'd have for count: (n * (n+1) / 2) * 2, i. e. n*n + n
That's smaller than 2*n*n, and square root of is sqrt(2) * n
 
right
Well
 
That's smaller than n+n (2*n), so we wouldn't produce division by 0.
 
7:35 AM
this is true
 
So we could calculate sqrt(count)/(n + m - sqrt(count))
 
So now to put everything together
normalization function should still return ans + ' '?
 
I think so.
We didn't pass normalisation tests if we didn't add it, remember?
 
it passes too
when adding ' '
 
Interesting fact:
  sqrt(2)*n/(2*n-sqrt(2)*n) = sqrt(2)/(2-sqrt(2))
= sqrt(2)*(2+sqrt(2))/((2-sqrt(2)*(2+sqrt(2)))
= (2*sqrt(2) + 2)/(4-2)
= sqrt(2) + 1
~ 2,414
 
7:50 AM
I see
 
Sure, our actual square root will be smaller, not sure, though, if that much smaller that we cannot get a ration > 1...
 
Ok, so we might try now our implementation
so instead of the jaccard index function
I replace by the getallsubstring one
 
Two equal strings with length 7 would give a ration of:
1,14833147735
getAllSubstrings is only for getting the count of each substring! We yet need to calculate the count of all matching substrings and some ratio!
 
right
 
I'll have to leave now. Will be back in early evening (presumably).
 
7:56 AM
Ok
and might be a good idea to create that chat room in stack exchange when you re back
it ll be comfortable for me at least
Have a great day :)
 
Thank you... You might try to answer some questions here on SO to get reputation (python?). But think well about what you write, giving bad advice is worse than giving none at all (apart from, it might result in downvotes, so opposite effect...). With 100 reputation, you can create the room on your own...
 
ok
how much time it ll take?
maybe two weeks
?
I see
Ok
 
Just a few answers. In best case, a single one, each upvote will give you 10 reputation, so you only need eight of. If you're answer's are not that great, you might need 8, 12, 20, ... – depending on how many upvotes you gain.
 
I see
you have 100 for stack?
because here SO
you have of course way more
 
I get 100 extra for every site I create a new account because of high reputation here on SO...
 
8:10 AM
oh
i see
 
OK, so now away for a while...
 
right
ok
see you soon
 
 
1 hour later…
9:29 AM
can you take a look on this
4
Q: Is it possible to delete a chat conversation?

PRKI posted some sensitive information, and now I want to delete the chat conversation so it isn't public. Is there way I can remove that information? It's very urgent!

people do, by email or flagging
I created my chat room
 

« first day (32 days earlier)    last day (15 days later) »