Anonymous
Freelancers — you mean work from home?
vinícius*
We had an exercise similar to this one back when I had Discrete Mathematics in college, although trying to achieve a different thing
Vlad
Sort them all and fill the gaps?
vinícius*
To be close to your exercise, say it was something like: Given a set of 10^5 genomes of length 10^5, generate an element guaranteed to not be in the given set
vinícius*
I forgot the right name for the method used there but I guess it's something like the Gauss' diagonal method
Anonymous
It's a weird form of employment IMHO
vinícius*
Where you 'set up' a giant matrix with all these elements, then get a new one by modifying the [i][i] of your matrix, and this new element will be guaranteed to not have been in the previous set
vinícius*
I believe you could use something similar for your exercise
Cengizhan
How about thinking matrix is inverted way?
Cengizhan
Creating columns as a row?
Vlad
I see string itself is too large to compare.
Vlad
Cool. Very smart and simple indeed.
vinícius*
At least for the problem of finding a new element not on the original set, I don't think there's a better way 🤔
vinícius*
Well, if there is, my professor (and Gauss :P) didnt know about it
vinícius*
As for the rest of the problem I'm not sure
vinícius*
Ooooh, Cantor, exactly :D
vinícius*
But I don't know if repeating it 10^5 times is optimal
vinícius*
there might a better of way of generating the new ones from the set of new ones itself
vinícius*
This might be a good question for Stack Exchange :D
Anonymous
Edit: this answer was wrong. pls ignore
Anonymous
That's easy
Anonymous
Start at genome[0][0]
Then [1][0]
And so on until [10^5-1][0]
Then make a new one [0][1]
Until [10^5-1][10^5-1]
Anonymous
vinícius*
Anonymous
oh right lol
Anonymous
Well you could use Fischer Yates shuffling to randomly get sequences
Anonymous
Hmmmmm okay
Anonymous
you have to do diagonals to make sure that it's different from each of the previous strings in at least one position
Anonymous
oh
particaney 🐸🍲
Guys i have a fgets in a loop, the once i am in the second loop the fgets just passes a empty string, how can i fix?
Anonymous
hello everyone,
i need help
the output of that script is 1 , but i dont know what happening behind the scene .
#include <stdio.h>
int main()
{
char x=2;
for(;x++;);
printf("x=%d\n",x)
}
Ajay
Ok wait an important observation here is that 4^9 is 4^9 = 262144 which is > 2*10^5. So, I only need first 9 characters to be inserted into the trie and they'll all distinguish themselves from each other. So, I put the first 9 characters of each string into the trie.
Now as you've inserted all of them. I'm also storing these newly inserted strings into my string array. After all the insert operations are done, we just append 10^5-9 `A`s to the end of each newly generated string.
Anonymous
No its okay
That code is clean
Ajay
vinícius*
vinícius*
for( var-init; bool-expr; anything);
vinícius*
the for-loop will add to x until it int overflows
vinícius*
it'll go up to 127, then overflow back to -128
vinícius*
thenn it'll eventually break when it reaches 1
vinícius*
the for-loop will break, I mean, ending up with the result x=1 you can see
Ajay
Yeah, my bad. But, If we store characters in compressed form(only 9 characters needed then), memory can be saved. Still, n*n read operations needed.
BTW, how will you print all those strings, they will still take 10^5*10^5 operations?
Ajay
You know any better algorithm way without having to traverse across each character of all the strings? then do share.
Ajay
I don't get why adding to trie is problematic. It still takes the O(string_length) time complexity to insert a single string, which is similar to traversing across the entire string. Yes, it'll surely be a bit time heavy but that factor isn't big enough that should be given attention to.
Ajay
SELBIN
I need Turbo c++ software
Anonymous
vinícius*
Alex
sorry for offtop: why lots of guys consider possible to submit task and ask to write code? do other specialist receive such queries in the internet?
Alex
are you sure this code is his? he did not provide problem with the code. just posted sth
Asdew
This is why purges shouldn't happen. Important information is just removed, forever.
Alex
I suppose you should create channel 'do homework for free'. C++/C help is not about doing the whole task for free
Alex
initially he posted screens with tasks, and wrote "need help"
Alex
that`s sounds like please do work for me
V01D
I agree, as long as they ask for tips, not answers.
Alex
interesting to get reaction from interpreters for text and "need help" message
Alex
maybe I miss something
Alex
interpreter, sorry. just ask them to translate text why not
Alex
ask other professions to do job for free. curious: is it only for software engineers?
Alex
that is the question: is it only for SW Engineers? queries like "please accomplish this task" with screenshots sound weird for me
Anonymous
He was warned but since he had been already warned he got banned
Anonymous
Do i have to learn computer science for deegree
Anonymous
Abd certificate?
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
hello everyone! yesterday i sent in an issue on how to printf an array from scanf to printf etcc... and i managed to fix the issue!
although i have to declare my
char EventE[n][500] at line 35 instead of line13/22 because i have not input a number in &n at line 33
from line 62 to 74 , is basically reprinting what it did in line 50-54
but here’s the catch, i did not declare my EventE[n][500] in main and so it the info cannot be carried over
was hoping there are suggestions on how to fix this!
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
jo ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ
also, here is a photo of how it currently runs!
it shows (null) which i believe it means it is zero bc there’s no info carried over?
Anonymous
Nhật
Ajay
actually, when we have only the last 9 characters different then, the first 1e5-9 same characters will be stored something like C and its count then we can have the 9 distinct characters later on.
The generation part where I said about adding As at the end mean that on traversing through the trie, if at some point, when we encounter that there exist no string which has either one of A/C/T/G present at that position then we know that using this character at that position will make an entirely new string and the characters from there on can be any of the 4 characters that we choose. So, I just stick to using all future characters to be A.
Aitha
Hello
Ибраги́м
https://www.youtube.com/watch?v=INn3xa4pMfg
Anonymous
Thanks
/home/aleksandr/
hello. help me install tgbot pls
/home/aleksandr/
#include <tgbot/bot.h>
test.cpp:3:10: fatal error: tgbot/bot.h: Not file or dir
3 | #include <tgbot/bot.h>
Anonymous
Can we have recursive inline function in C++?