2026年2月8日

摘要: 使用标记数组,dfs前清空 vector<int>a[1005]; bitset<1005>f,emp; void dfs(int x){ f[x]=1; for(auto i:a[x]){ if(!f[i])dfs(i); } } f=emp,dfs(x); 阅读全文

posted @ 2026-02-08 10:28 xianggua154 阅读(2) 评论(0) 推荐(0)

2026年2月7日

摘要: uint8_t buf[1<<20],*p1,*p2; #define gc() (p1==p2 && (p2=(p1=buf)+fread(buf,1,1<<20,stdin)),*p1++) int read(){ int x=0,c=gc(); while(c<'0'||c>'9')c=gc( 阅读全文

posted @ 2026-02-07 20:38 xianggua154 阅读(3) 评论(0) 推荐(0)