{"trustable":false,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"众所周知,一到暑假,各地都在组织漫展。作为一名敬业的coser,tty在暑假十分的忙碌,他想参加尽可能多的漫展。假如tty参加了某一场漫展,那么他一定会从头到尾的参加,不会中途离开。但是tty不能把自己掰成两半,于是他把时间安排的任务交给了你。\n现在tty提供了一份漫展的安排表,请你帮他算算这个暑假他最多能参加多少场完整的漫展。"}},{"title":"Input","value":{"format":"MD","content":"输入数据包含多个测试实例,每个测试实例的第一行只有一个整数n(n\u0026lt;\u003d100),表示漫展的总场次数,然后是n行数据,每行包括两个数据si, ei (1\u0026lt;\u003di\u0026lt;\u003dn),分别表示第i场漫展的开始和结束时间,为了简化问题,每个时间都用一个正整数表示。n\u003d0表示输入结束,不做处理。\u003cbr\u003e"}},{"title":"Output","value":{"format":"MD","content":"对于每个测试实例,输出tty最多能完整参加的漫展的场数,每个测试实例的输出占一行。"}},{"title":"Sample","value":{"format":"MD","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\u003e\u003cpre\u003e12\n1 3\n3 4\n0 7\n3 8\n15 19\n15 20\n10 15\n8 18\n6 12\n5 10\n4 14\n2 9\n0\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e5\n\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}