Блог пользователя Shaheer.Old

Автор Shaheer.Old, 18 месяцев назад, По-английски

is GFG(geeksforgeeks) allowed in contests?

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

yes

what is GFG
»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Yes absolutely.
But you should change the code if you are directly copy and pasting, here is a report where the user directly copy pastes gfg code, and here the gfg code directly gave the answer,didn't need to code anything more. Two person used the same code and one got skipped.

»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

whilst its allowed to copy past from gfg , gfg has got so many wrong codes and complexities alongside wrong greedy algorithms so watch it when copying from it

  • »
    »
    18 месяцев назад, скрыть # ^ |
     
    Проголосовать: нравится +55 Проголосовать: не нравится

    Fun fact: a lot of time ago I submitted something from GFG and got Time limit exceeded on test ~ 50, because that algorithm was $$$O(n^2)$$$ instead of $$$O(n)$$$ as stated on GFG.

    • »
      »
      »
      18 месяцев назад, скрыть # ^ |
       
      Проголосовать: нравится +13 Проголосовать: не нравится

      the algorithm to find number of inversions in an array using priority queue is also n^2logn although they advertise it as nlogn

    • »
      »
      »
      18 месяцев назад, скрыть # ^ |
      ← Rev. 2  
      Проголосовать: нравится +26 Проголосовать: не нравится

      Recently banned gfg form my search results cause of this. They claim pow(a,b)%c has log(b) runtime in python completely disregarding the runtime of multiplication with bigint. I'm kinda surprised they end up at the correct result pow(a,b,c) in the end.

      UDP: they only arrive at pow(a,b,c) cause they claim the modulo operation is slow...

»
18 месяцев назад, скрыть # |
← Rev. 4  
Проголосовать: нравится -8 Проголосовать: не нравится

I was also curious about this. I got AC on 2102D - Quartet Swapping in previous contest by copying inversion count template from GFG.

I wasn’t aware of a way to calculate inversions in an array in O(nlogn), so I googled it and found a GFG article using merge sort. I guessed it's within the rules though It feels a bit like cheating to copy something I didn’t previously know.

»
18 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится -15 Проголосовать: не нравится

.

»
18 месяцев назад, скрыть # |
 
Проголосовать: нравится +17 Проголосовать: не нравится

I still recommend either have your own ready to use template or not use them at all.

»
18 месяцев назад, скрыть # |
← Rev. 7  
Проголосовать: нравится 0 Проголосовать: не нравится

I wouldn't recommend GFG because when templates are difficult, many people choose to copy from sites like GFG, which leads to confusion regarding whether you cheated or not due to similar submission.

Edit: I removed the last line because Mindeveloped already said what I was thinking.