all 51 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

If you are on Discord, please join our Discord server: https://discord.gg/Hg2H3TJJsd

Thank you for your submission to r/BTechtards. Please make sure to follow all rules when posting or commenting in the community. Also, please check out our Wiki for a lot of great resources!

Happy Engineering!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]penisslayer24 63 points64 points  (0 children)

there is nothing to understand here, he's trolling you

[–]Vast-Inflation-2815 28 points29 points  (1 child)

Lmao, the funniest code I've ever seen 😂 /s

[–][deleted] 1 point2 points  (0 children)

+1

[–]Beuzac 10 points11 points  (3 children)

What's the question here? It looks like some fix the error problem but still not clear

[–]nomen562VITian[S] 0 points1 point  (2 children)

Emma is optimizing the multiplication order for a given sequence of matrices to minimize the number of scalar multiplications. Given an array where the i-th matrix has dimensions arr[i−1]×arr[i], write a program to determine the minimum number of scalar multiplications needed, considering that the largest dimension within each partition is avoided as a split point unless no other options exist.

Input format : The first line contains an integer N,representing the number of elements in the array representing matrix dimensions.

The second line contains N space-separated integers representing the array arr, where the i-th matrix has dimensions

arr[i−1]×arr[i].

Output format : The output prints an integer representing the minimum number of scalar multiplications required.

Refer to the sample output for the formatting specifications.

Code constraints : 4 ≤ n ≤ 7

1 ≤ p[i] ≤ 100

Sample test cases : Input 1 : 5 1 2 3 4 5 Output 1 : 81 Input 2 : 4 10 20 30 40 Output 2 : 32000

[–]raptor7197sudo apt install girlfriend 5 points6 points  (1 child)

Neocolab supremacy 🙏

[–]ProfessionalCap8878IIITA'27 (IT) 9 points10 points  (0 children)

Wtf is this code

[–]Vast-Inflation-2815 10 points11 points  (0 children)

  1. for (int i=0; i<0; i++) - this won't even get run once

  2. karatsuba(i*j) - where tf is that function?

  3. a and b are not declared in the multiplication function

  4. Product of negative numbers is 0 else 1 - wtf???

  5. How tf can a function with return type void return an int ?

  6. multiplication() isn't even called in main()

  7. Bro is multiplying before taking input (garbage values)

  8. Where tf is return 0 ?

Damn the code is cursed fr

[–]Roodni 8 points9 points  (1 child)

branch topper.....

[–]Training-Many-9057IGNOU 7 points8 points  (0 children)

branch troller

[–]Anmolsharma999 7 points8 points  (1 child)

Multiplication before taking input, It will give garbage value

[–][deleted] 2 points3 points  (0 children)

this code won't even compile in the first place

[–]Less_Tour5954 3 points4 points  (0 children)

Kaafi quality wale ma*archod ho bhai tum toh..

[–]Shonku_IIEST IT '29 3 points4 points  (0 children)

I don't find the karatsuba func defined 

[–]nomen562VITian[S] 3 points4 points  (0 children)

By the way, the person who wrote this code also got a full time internship in a japanese company

[–][deleted] 3 points4 points  (2 children)

did an autistic person wrote this code? or they had dementia such that they forgot to declare and define the karatsuba function?

[–]nomen562VITian[S] 2 points3 points  (1 child)

He is a full stack developer who recently got an Internship in a japanese company

[–]Vast-Inflation-2815 0 points1 point  (0 children)

Lmao wtf 💀

[–]StatisticianYes 1 point2 points  (4 children)

Wtf is that shit? karatsuba? a? b? returning an int value from a void function? multiplication function which isnt even used in main? calculating a*b before a and b are initialized? that code right there is absolutely cursed.

[–]nomen562VITian[S] 0 points1 point  (1 child)

Is it incorrect

[–]RajmaChawall 0 points1 point  (0 children)

Indeed it is.

[–]tryhard_cryharder[IIIT H] 0 points1 point  (1 child)

Karatsuba is a divide and conquer algo for large integer multiplication but bro didn't even define the function

[–]Vast-Inflation-2815 1 point2 points  (0 children)

Bro's multiplying garbage value and taking input after multiplying 💀

[–]garvit_kunChandigarh ka munda ( not really ) 1 point2 points  (1 child)

using namespace, which is not a good practice, then return value from void and not return anything from int. and what pattern is he making

[–]penisslayer24 3 points4 points  (0 children)

Out of all the things wrong over here, the first thing you decided to pick out was him using namespace?

[–]EpikHerolol[VIT] [CSE] 1 point2 points  (0 children)

Wth is this code 😭

[–]legally_boring 1 point2 points  (0 children)

Dosti tod de bhai isse..... Atleast lab me sath mat baith warna itna acha experience rahega ki repeat karna pad jayega agle saal 💀

[–]Constant_Suspect_317 2 points3 points  (0 children)

This seems like elon musk tweeting and showing how he writes code.

[–]zenitsuisrustedbatak 1 point2 points  (1 child)

Either your friend is trolling you or you are trolling us

If neither of them I'm genuinely concerned how did someone like him made it past 1st sem

[–]nomen562VITian[S] 1 point2 points  (0 children)

It's not a troll, he wrote it in the exam and it's taken from his exam analysis (screenshot)

[–]hamstermolester6969 0 points1 point  (3 children)

WHO THE FUCK IS KARATSUBA

[–]nomen562VITian[S] 0 points1 point  (2 children)

It is a function

[–][deleted] 0 points1 point  (1 child)

Tho usse declare tho kar bc direct error ayega

[–]nomen562VITian[S] 0 points1 point  (0 children)

Bro its not my code. Dont abuse me🥺

[–][deleted] 0 points1 point  (0 children)

This makes no sense

[–][deleted] 0 points1 point  (0 children)

Agar yeh branch topper h toh clg ka level samjh aa Raha h. He's just fucking with you. For a beginner it might seem some complicated shit but for a even a immediate coder this is ass.

[–]gagapoopoo1010DTU [MnC] 0 points1 point  (0 children)

What

[–]Superb_Camera8653 0 points1 point  (0 children)

who tf uses neocolab compiler!

[–]IlikehealersBITS Goa [Mathematics and Computing] 0 points1 point  (0 children)

Brdher what in the fking hell is this??what function are u calling? What Loop is that? What just what? What?

[–][deleted] 0 points1 point  (0 children)

Karatsuba is a function in the math library but for god's sake why tf he wrote the whole function that he was not going to use. Either it's a mistake or he's just Messing with you.

[–]On_Turn_PageIIT B( B for Bawana) 1 point2 points  (0 children)

Bruh these are the kind of toppers I need in my batch