{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003eRaul has \u003cvar\u003e\\(N\\)\u003c/var\u003e cards with integer numbers associated to them: \u003cvar\u003e\\(X_1, X_2, ... X_N\\)\u003c/var\u003e, and a number \u003cvar\u003e\\(M\\)\u003c/var\u003e. \u003c/p\u003e \n\n\u003cp\u003eRaul is arranging the cards in pairs, such that each pair satisfies one of the following:\u003c/p\u003e \n\u003cul\u003e \n \u003cli\u003eThe integers written on the two cards are equal.\u003c/li\u003e \n \u003cli\u003eThe sum of the integers written on the two cards is a multiple of \u003cvar\u003e\\(M\\)\u003c/var\u003e.\u003c/li\u003e \n\u003c/ul\u003e \n\u003cp\u003eFind the maximum number of pairs that can be created, given that a card cannot be used in more than one pair.\u003c/p\u003e"}},{"title":"Constraints","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cul\u003e \n \u003cli\u003e\u003cvar\u003e\\(2≦N≦10^5\\)\u003c/var\u003e\u003c/li\u003e \n \u003cli\u003e\u003cvar\u003e\\(1≦M≦10^5\\)\u003c/var\u003e\u003c/li\u003e \n \u003cli\u003e\u003cvar\u003e\\(1≦X_i≦10^5\\)\u003c/var\u003e\u003c/li\u003e \n\u003c/ul\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003eOn the first line of input we have the numbers \u003cvar\u003e\\(N\\)\u003c/var\u003e and \u003cvar\u003e\\(M\\)\u003c/var\u003e\nOn the second line, we have the numbers written on the cards: \u003cvar\u003e\\(X_1\\)\u003c/var\u003e \u003cvar\u003e\\(X_2\\)\u003c/var\u003e \u003cvar\u003e\\(...\\)\u003c/var\u003e \u003cvar\u003e\\(X_N\\)\u003c/var\u003e.\n\u003c/p\u003e \n"}},{"title":"Output","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cp\u003ePrint the maximum number of pairs that can be created.\u003c/p\u003e"}},{"title":"Sample Input 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e7 5\n1 3 1 4 5 2 9\n\u003c/pre\u003e"}},{"title":"Sample Output 1","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e3\n\u003c/pre\u003e "}},{"title":"Sample Input 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e15 10\n99 94 99 1 6 5 255 11 34 44 25 25 26 11 80\n\u003c/pre\u003e"}},{"title":"Sample Output 2","value":{"format":"HTML","content":"\u003ch3\u003e\u003c/h3\u003e\n\u003cpre\u003e6\n\u003c/pre\u003e"}}]}