摘要: 水题~。 int w; int n,m; PII posn,posm; PII solve(int n) { n--; int row=n/w; int col; if(row % 2) col=w-1-n%w; else col=n%w; return {row,col}; } int main( 阅读全文
posted @ 2021-03-25 19:59 Dazzling! 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 枚举年份,从$1000$枚举到$9999$,构造回文日期,判断是否在给定日期范围内,以及判断日期是否合法。 int month[2][13]={ {0,31,28,31,30,31,30,31,31,30,31,30,31}, {0,31,29,31,30,31,30,31,31,30,31,30, 阅读全文
posted @ 2021-03-25 19:29 Dazzling! 阅读(42) 评论(0) 推荐(0) 编辑