CSClubIIITDM-org / bughunt-2024

Repo for BugHunt vashisht2024
0 stars 35 forks source link

[CodeToads] c/c++ 14 #161

Open TheKrakeninKSP opened 6 months ago

TheKrakeninKSP commented 6 months ago

b"{8X%\xb6\xb0M\xd8\x95\xb6\x98\xf7\xe3\xb0\x9d\xe6\xd4\xe0\xcc\xb8'\xf6[p\xbet\x87\xb1\x18\xb8\xf8\x85\xc9e\xe6\xd6$\xf3$\xf1z\xbc\x84\xfb!UB\xb5@\xfe\xe7\xd8N\x16\xc9\x1e\x04b8R\xa4\xed\xcb\xb7\x1a\x8d\x86'H\x11\x99\x82\xac\xbb\xd9'^O>\x14\x97\xbc\x86X@\xa2\xbd\x91t\xcd\x1c\xfbF\x82\rR;0\x8bUd\x17\x06h\x06p,,\xf0\\xc0\x08\xeb\xecF\x17\x1d\x99M\xddB.d\xad\x00\xe5"

b'gAAAAABl9SlYCPME_Li-3AS3McT_j53z0jqAE2ceRjsZdOpF_7I0A42SAq6o9wmgY5QPIFCbgZFu8NYLVV2dctVVerfEDLrDcNI-i5L7ugKrKl-kT27t0i-Fe_wP3vADf2TNoPPuZq8cte0lAqCAqOciUHAFp9b07Zos-5Akja-yDHioG0WSGmuerkP8FuXG6llhLf4jby1fYMk0REJYAktPOxJg8BcQOLPqIwOtHeMiYmsLzU4uenfrXhr3Ze7VksvB6HxOJmvaO-uylYZVph5JTOqgLC01ry-g7eNHU-1RJT1Qlhxnzak17vvECvd7rwZ6HJIiIu84pWnJ3tznlfy2lt-BWGGKUPhmkpREPZZ2mHjGZagoMbKiPbKzWhgNrAqsAit3UXzxCQFXOjapCA_Fl4IJoTP0L-Rg7A1_16a77XDG7O6yIU1RSgFDZ8I55B_0wc8awtJW0hzHzwEQySdWz1a-HIph6IchWMDOnZLrbWfcVtSL8IZ1COlcQndx5KFmDhHUIVFC8qWMSvqAsf8x2BPRh1AKBrj0-hGfuoyFFn7cvkyY8bE='

bughunt-bot[bot] commented 6 months ago

Team Name: CodeToads File Name: c/c++ 14 Line Number: [23] Bug Description: When checking for condition if(a[i]<a[i+1]), if condition evaluates as true, then we subtract a[i+1]-=a[i] but then add a[i] to the final ans, which is incorrect. Solution: Add continue statement when if condition evaluates as true to skip the ans+=a[i] statement.

bughunt-bot[bot] commented 6 months ago

Bug Hunt Evaluation: Answer: ((23,), (25,)) Correctness: 1/1 Points: 100/100