{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"PLAIN","content":"你有两个长度为n的数列a和b。\n\n现在我们定义,若存在i和j,满足: (i\u003cj)且(a[i]+a[j]\u003eb[i]+b[j]),则我们称数对\u003ci,j\u003e为JNU数对\n\n你的目标是统计有多少个这样的数对。"}},{"title":"Input","value":{"format":"PLAIN","content":"第一行输入n,满足:2 \u003c\u003d n \u003c\u003d 200000\n\n第二行输入a数列,满足:1 \u003c\u003d a[i] \u003c\u003d 1000000000\n\n第二行输入b数列,满足:1 \u003c\u003d b[i] \u003c\u003d 1000000000"}},{"title":"Output","value":{"format":"PLAIN","content":"一行,输出JNU数对的个数"}},{"title":"Examples","value":{"format":"PLAIN","content":"Input \n\n5\n5 9 3 7 3\n5 6 5 3 4\n\nOutput\n7"}},{"title":"Hint","value":{"format":"PLAIN","content":"提示:注意本题变量的取值范围所允许的时间复杂度(O(n)或O(logn)),然后考虑在该复杂度下有什么算法~"}}]}