{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"Click Here --\u003e \u003cstyle type\u003d\"text/css\"\u003e h1,h2,h3,h4,h5,h6 { margin-bottom:0; } div.textBG p { margin: 0 0 0.0001pt; }\u003c/style\u003e\u003cspan style\u003d\u0027float:right\u0027\u003e \u003ca target\u003d\u0027_blank\u0027 href\u003d\u0027CDN_BASE_URL/cb5f0106ff383cb109815fc3ccc24413?v\u003d1706309564\u0027\u003e \u003cimg width\u003d\u0027100\u0027 height\u003d\u002726\u0027 border\u003d\u00270\u0027 title\u003d\u0027Download as PDF\u0027 alt\u003d\u0027Download as PDF\u0027 src\u003d\u0027CDN_BASE_URL/6d679b24335f6891d328af320270f504?v\u003d1706309564\u0027\u003e \u003c/a\u003e\u003c/span\u003e\u003cdiv style\u003d\u0027clear:both\u0027\u003e\u003c/div\u003e\u003ciframe src\u003d\"CDN_BASE_URL/cb5f0106ff383cb109815fc3ccc24413?v\u003d1706309564#view\u003dFitH\" style\u003d\"width:100%; height:1400px;\" frameborder\u003d\"0\"\u003e\u003c/iframe\u003e"}},{"title":"Verdict","value":{"format":"HTML","content":"Wrong Answer"}},{"title":"Bugged Code (C++)","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eFix This\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n\u003cpre\u003e\n#include \u0026lt;bits/stdc++.h\u0026gt;\n#define ll long long\n#define pb push_back\n\nusing namespace std;\n\nvector\u0026lt;int\u0026gt; find_neighbour(int index, int N)\n{\n vector\u0026lt;int\u0026gt; ret;\n for(int i\u003d0; i\u0026lt;N; i++)\n {\n //Using XOR to flip i-th bit\n index \u003d index ^ (1\u0026lt;\u0026lt;i);\n ret.pb(index);\n }\n\n return ret;\n}\n\nint main()\n{\n //Comment these three lines out if you want to test the code locally.\n ios_base::sync_with_stdio(false);\n cin.tie(nullptr);\n cout.tie(nullptr);\n\n while(true)\n {\n int N;\n cin \u0026gt;\u0026gt; N;\n if(cin.eof()) break;\n\n int n \u003d 1\u0026lt;\u0026lt;N;\n vector\u0026lt;int\u0026gt; a(n);\n for(int i\u003d0; i\u0026lt;n; i++) cin \u0026gt;\u0026gt; a[i];\n\n vector\u0026lt;int\u0026gt; potency(n, 0);\n for(int i\u003d0; i\u0026lt;n; i++)\n {\n for(int j: find_neighbour(i, N))\n {\n //If node i and j are neighbours we add the potency of node i by the weight of node j\n potency[i] +\u003d a[j];\n }\n }\n\n int ans \u003d 0;\n for(int i\u003d0; i\u0026lt;n; i++)\n {\n for(int j: find_neighbour(i, N))\n {\n //If node i and j are neighbours we find the sum of their potencies\n ans \u003d max(ans, potency[i] + potency[j]);\n }\n }\n cout \u0026lt;\u0026lt; ans \u0026lt;\u0026lt; \"\\n\";\n }\n}\n\u003c/pre\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Bugged Code (JAVA)","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eFix This\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n\u003cpre\u003e\nimport java.util.Scanner;\nimport java.util.ArrayList;\n\npublic class Main{\n public static ArrayList\u0026lt;Integer\u0026gt; find_neighbour(int index, int N)\n {\n ArrayList\u0026lt;Integer\u0026gt; ret \u003d new ArrayList\u0026lt;\u0026gt;();\n for(int i\u003d0; i\u0026lt;N; i++)\n {\n //Using XOR to flip i-th bit\n index \u003d index ^ (1 \u0026lt;\u0026lt; i);\n ret.add(index);\n }\n return ret;\n }\n\n public static void main(String[] args)\n {\n Scanner s \u003d new Scanner(System.in);\n\n while(s.hasNextInt())\n {\n int N \u003d s.nextInt();\n int n \u003d 1 \u0026lt;\u0026lt; N;\n \n int[] a \u003d new int[n];\n for(int i\u003d0; i\u0026lt;n; i++) a[i] \u003d s.nextInt();\n\n int[] potency \u003d new int[n];\n for(int i\u003d0; i\u0026lt;n; i++)\n {\n for(int j: find_neighbour(i, N)) \n {\n //If node i and j are neighbours we add the potency of node i by the weight of node j\n potency[i] +\u003d a[j];\n }\n }\n\n int ans \u003d 0;\n for(int i\u003d0; i\u0026lt;n; i++)\n {\n for(int j: find_neighbour(i, N)) \n {\n //If node i and j are neighbours we find the sum of their potencies\n ans \u003d Math.max(ans, potency[i] + potency[j]);\n }\n }\n System.out.println(ans);\n }\n\n s.close();\n }\n}\n\u003c/pre\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Bugged Code (Python)","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eFix This\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\n\u003cpre\u003e\ndef find_neighbour(index, N):\n ret \u003d []\n for i in range(N):\n #Using XOR to flip i-th bit\n index \u003d index ^ (1 \u0026lt;\u0026lt; i)\n ret.append(index)\n return ret\n\nwhile True:\n try:\n N \u003d int(input())\n except EOFError:\n break\n\n n \u003d 1 \u0026lt;\u0026lt; N\n a \u003d []\n for _ in range(n):\n a.append(int(input()))\n \n potency \u003d [0 for _ in range(n)]\n for i in range(n):\n for j in find_neighbour(i, N):\n #If node i and j are neighbours we add the potency of node i by the weight of node j\n potency[i] +\u003d a[j]\n\n ans \u003d 0\n for i in range(n):\n for j in find_neighbour(i, N):\n #If node i and j are neighbours we find the sum of their potencies\n ans \u003d max(ans, potency[i] + potency[j])\n\n print(ans)\n\u003c/pre\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}