#include\x20 #include\x20 using\x20namespace\x20std;

int\x20main()\x20{ \x20\x20int\x20L,M; \x20\x20cin\x20>>\x20L\x20>>\x20M; \x20\x20 \x20\x20vector\x20trees(L+1,true); \x20\x20 \x20\x20for\x20(int\x20i\x20=\x200;i\x20<\x20M;i++)\x20{ \x20\x20\x20\x20int\x20start,end; \x20\x20\x20\x20cin\x20>>\x20start\x20>>\x20end; \x20\x20\x20\x20 \x20\x20\x20\x20for\x20(int\x20j\x20=\x20start;j\x20<=\x20end;j++)\x20{ \x20\x20\x20\x20\x20\x20trees[j]\x20=\x20false; \x20\x20\x20\x20} \x20\x20} \x20\x20 \x20\x20int\x20count\x20=\x200; \x20\x20for\x20(int\x20i\x20=\x200;i\x20<=\x20L;i++)\x20{ \x20\x20\x20\x20if\x20(trees[i])\x20{ \x20\x20\x20\x20\x20\x20count++; \x20\x20\x20\x20} \x20\x20} \x20\x20 \x20\x20cout\x20<<\x20count\x20<<\x20endl; \x20\x20 \x20\x20return\x200; }


原文地址: https://www.cveoy.top/t/topic/pLq1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录