Anonymous
Google banned you?
Björn
Salty
Anonymous
VS Codium is a text editor CodeBlocks is bad as an IDE
why is VSCode not an IDE? what stops it from being one?
Anonymous
i have never understood this. like i get when Notepad is gatekeeped from being an IDE, but what stops vscode
Семён
i have never understood this. like i get when Notepad is gatekeeped from being an IDE, but what stops vscode
also what about vim and neovim? I think all of that can be IDE but with plugins and other things )
Asad
i have never understood this. like i get when Notepad is gatekeeped from being an IDE, but what stops vscode
Because, by default (without extensions and stuff), it is file oriented while IDEs are project oriented.
Anonymous
also what about vim and neovim? I think all of that can be IDE but with plugins and other things )
even with Visual Studio, you need to install the Desktop development with C++ components to program in C++. but the project vs file distinction makes perfect sense.
Roxifλsz 🇱🇹
Dima
Björn
xD
Dima
Hmm
Anonymous
Hmm
P — privacy
infi ptr
https://www.codechef.com/viewsolution/37372509 can anyone let me know why codechef is giving wrong answer... i tried to cover every corner cases i could think of... please help
infi ptr
omg, no please tell !
infi ptr
will update you soon !, right now busy into something imp.
Anonymous
Can anyone of you give me 2 minutes
Cold
/notes
Cold
best-book
Cold
#best-book
Arseny
/get noendl
Asad
#rose_as_my_girlfriend
Asad
Roxifλsz 🇱🇹
Haha trolled
Death Killer
/getnotename
Death Killer
struct node{ int64_t s; bool v1,v2; vector<int> e; node(int x) : v1(0),v2(0), s(x) {} }; what does last line do
Alex
constructor
Death Killer
constructor
would initialize onlly s?
Death Killer
Alex
would initialize onlly s?
everything would be initialized
Death Killer
everything would be initialized
what effect on vector
Alex
what effect on vector
vector will be inited with default constructor
Death Killer
vector will be inited with default constructor
it wont have any effect with last line then?
Alex
it wont have any effect with last line then?
vector will be inited after calling last line
Alex
every constructor has initializing list. you don`t pass anything for vector, thus it will be inited with def constr
Death Killer
everything will be 0 initialized
Death Killer
could have directly written = 0 in front of those variable in struct defination
Alex
better to use false for bool
infi ptr
// from 4th didit its a cycle of 2,4,8,6 this assumption is not correct
I didn't assumed this, sorry if i mentioned like that in comments. To get the 1st left-over after the cycle completion i am multiplying the 3rd digit with 2. Also sample test cases are getting passed. Thanks for your time.
infi ptr
Which sample test cases are you using?
Input: 3 5 3 4 13 8 1 760399384224 5 1 Output: NO YES YES
infi ptr
Input: 3 5 3 4 13 8 1 760399384224 5 1 Output: NO YES YES
From the problem statement... Also i am assuming that it will form a cycle of the 2,4,8,6 in order but can start from any of the no. Depending upon the third_digit.
olli
Input: 3 5 3 4 13 8 1 760399384224 5 1 Output: NO YES YES
I see, you could try some of these inputs as well 5 2 7 (27986) 5 2 8 (28000) 3 6 6 (662) 5 3 2 (32500)
infi ptr
I see, you could try some of these inputs as well 5 2 7 (27986) 5 2 8 (28000) 3 6 6 (662) 5 3 2 (32500)
i missed the cases when third digit is zero in that case rest all the elements will be zero. addedd that case in my code( hopefully correctly ) now the code is giving correct output wil athe test cases including yours. BUT codefChef still giving wrong ans (❌) https://ideone.com/LaXXjv
olli
i missed the cases when third digit is zero in that case rest all the elements will be zero. addedd that case in my code( hopefully correctly ) now the code is giving correct output wil athe test cases including yours. BUT codefChef still giving wrong ans (❌) https://ideone.com/LaXXjv
your code still has issues with input length 2, e.g. 2 9 4 2 9 1 2 8 7 2 4 6 and with consecutive zeros (there are cases where the third is not zero but the forth is), e.g. 477 5 0 94 1 4 926 8 7 13 6 9 (6950000000000)
Anonymous
/get
Anonymous
/get cout
Anonymous
/get cbook
Anonymous
...
Anonymous
pubg?
-Bs¬
/get goodgoogling
Ustad
/get
Anonymous
infi ptr
wrong answer
My ans is coorect, but execution time is 1.01 sec and limit is 1 second
silver
Hey guys I need help with something
Alex
Hi! I hope you will get help soon!
silver
So I've need doing some research on data compression and I came across something called the Huffman tree and how it reduces the number of bits in a set off data... But I have two questions... Does the Huffman tree itself take up storage space since it's included on the file once it's compressed and if it does how much space would it take. Thank you in advance.
Kushal
Check the array is Sorted or Not ? If Sorted so in which order Ascending or descending? I/P:- 1,1,1,1,2,3,4,4,5,6,7 O/P:- Ascending order Sorted I/P:- 9,9,8,7,6,5,5,5,5,4,3 O/P :- Descending order Sorted I/P:- 1,1,2,3,3,4,3,3,4,5,6,7 O/P :- Not Sorted I/P :- 9,9,9,8,7,6,5,5,6,4,3,2,1 O/P:- Not Sorted Time Complexity :- O(n) Note :- if you sort the input then match, sort function time Complexity is O(nlogn) Expected time Complexity is O(n)
Vlad
Vlad
It will be still O(N) btw
Kushal
Required time Complexity is O(n) I stuck there Otherwise best approach is Make 2 new array A is input B is sorted A C is reversed sorted B If A==B then Ascending order Sorted Else if A==C then descending order Sorted Else Not Sorted
Vlad
Also comparing two arrays one by one is slow also
Kushal
I don't know much about fast sort It's time Complexity is O(n)
Vlad
So you've got two heuristics, one that elements have positive progression and another that they have negative progression
Alex
It maybe sorted in descending order
initial: asc sorted = true desc sorted = true traverse array one time: check i vs i + 1 if i > i + 1 asc sorted = false if i < i + 1 desc sorted = false
Vlad
If it's non satisfied it will be O(1) in the best case. And O(N) if an array is sorted