摘要: //https://www.acwing.com/problem/content/1174 //http://ybt.ssoier.cn:8088/problem_show.php?pid=1557 #include <bits/stdc++.h> using namespace std; cons 阅读全文
posted @ 2025-05-04 09:05 九三青梧 阅读(15) 评论(0) 推荐(0)
摘要: //https://leetcode.cn/problems/Jf1JuT/ const int N=26,M=110; class Solution { private: int head[N],Next[M],to[M],cnt; int indegree[N]; int h,t; int q[ 阅读全文
posted @ 2025-05-01 18:25 九三青梧 阅读(5) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/U107394 #include <bits/stdc++.h> using namespace std; const int N=1e5+10,M=N; int n,m; int head[N],Next[M],to[M],cn 阅读全文
posted @ 2025-05-01 17:57 九三青梧 阅读(10) 评论(0) 推荐(0)
摘要: //https://leetcode.cn/problems/course-schedule-ii/ const int N=2e3+10,M=N*(N-1); class Solution { private: int n,m; int head[N],Next[M],to[M],cnt; int 阅读全文
posted @ 2025-05-01 17:40 九三青梧 阅读(8) 评论(0) 推荐(0)
摘要: //https://www.nowcoder.com/practice/88f7e156ca7d43a1a535f619cd3f495c #include <bits/stdc++.h> using namespace std; const int N=2e5+10,M=N; int n,m; in 阅读全文
posted @ 2025-05-01 17:29 九三青梧 阅读(4) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/P4926 #include <bits/stdc++.h> using namespace std; const int N=1e3+10,M=3*N; int vow[N][4],score[N][2]; int head[N 阅读全文
posted @ 2025-05-01 12:30 九三青梧 阅读(10) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/P4878 //https://www.acwing.com/problem/content/description/1172/ //http://ybt.ssoier.cn:8088/problem_show.php?pid=1 阅读全文
posted @ 2025-04-26 22:39 九三青梧 阅读(9) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/P1993 #include <bits/stdc++.h> using namespace std; const int N=5e3+100,M=N*2; int head[N],to[M],weight[M],cnt,Next 阅读全文
posted @ 2025-04-26 20:10 九三青梧 阅读(6) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/P5960 #include <bits/stdc++.h> using namespace std; const int N=5e3+10,M=2*N; int head[N],Next[M],to[M],weight[M],c 阅读全文
posted @ 2025-04-26 20:08 九三青梧 阅读(10) 评论(0) 推荐(0)
摘要: //https://www.luogu.com.cn/problem/P5960 #include <bits/stdc++.h> using namespace std; const int N=5e3+10,M=2*N; int head[N],Next[M],to[M],weight[M],c 阅读全文
posted @ 2025-04-26 20:08 九三青梧 阅读(7) 评论(0) 推荐(0)