#include\x20 #include\x20

using\x20namespace\x20std;

bool\x20compare(int\x20a,\x20int\x20b)\x20{ \x20\x20if\x20(a\x20%\x202\x20!=\x200\x20&&\x20b\x20%\x202\x20!=\x200)\x20{ \x20\x20\x20\x20return\x20a\x20<\x20b; \x20\x20}else\x20if\x20(a\x20%\x202\x20!=\x200\x20&&\x20b\x20%\x202\x20==\x200)\x20{ \x20\x20\x20\x20return\x20true; \x20\x20}else\x20if\x20(a\x20%\x202\x20==\x200\x20&&\x20b\x20%\x202\x20!=\x200)\x20{ \x20\x20\x20\x20return\x20false; \x20\x20}else\x20{ \x20\x20\x20\x20return\x20a\x20>\x20b; \x20\x20} }

int\x20main()\x20{ \x20\x20int\x20n; \x20\x20cin\x20>>\x20n; \x20\x20 \x20\x20int*\x20cards\x20=\x20new\x20int[n]; \x20\x20for\x20(int\x20i\x20=\x200;\x20i\x20<\x20n;\x20i++)\x20{ \x20\x20\x20\x20cin\x20>>\x20cards[i]; \x20\x20} \x20\x20 \x20\x20sort(cards,\x20cards\x20+\x20n,\x20compare); \x20\x20 \x20\x20for\x20(int\x20i\x20=\x200;\x20i\x20<\x20n;\x20i++)\x20{ \x20\x20\x20\x20cout\x20<<\x20cards[i]\x20<<\x20"\x20"; \x20\x20} \x20\x20 \x20\x20delete[]\x20cards; \x20\x20 \x20\x20return\x200; }


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

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