{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cimg src\u003d\"CDN_BASE_URL/d903c9a08afdf3b6dfac35b18da4660b?v\u003d1715856580\" align\u003d\"right\"\u003eGiven S, a set of integers, find the largest d such that a + b + c \u003d d where a, b, c, and d are distinct elements of S. "}},{"title":"Input","value":{"format":"HTML","content":"Several S, each consisting of a line containing an integer 1 \u0026lt;\u003d n \u0026lt;\u003d 1000 indicating the number of elements in S, followed by the elements of S, one per line. Each element of S is a distinct integer between -536870912 and +536870911 inclusive. The last line of input contains 0. "}},{"title":"Output","value":{"format":"HTML","content":"For each S, a single line containing d, or a single line containing \"no solution\". "}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\r\n2 \r\n3 \r\n5 \r\n7 \r\n12\r\n5\r\n2 \r\n16 \r\n64 \r\n256 \r\n1024\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\r\nno solution\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}