摘要:
void spfa(int s)//spfa跑最长路 { memset(dis, -1, sizeof(dis)); memset(V, 0, sizeof(V)); dis[s] = sum[s]; V[s] = 1; q.push(s); while (!q.empty()) { int u = 阅读全文
posted @ 2025-12-01 20:56
Marinaco
阅读(4)
评论(0)
推荐(0)
摘要:
void exgcd(int &x,int &y,int a,int b) { if(!b) { x=1; y=0; return; } exgcd(x,y,b,a%b); int t=x; x=y; y=t-a/b*y; } void solve(){ //求解 ax+by =c 的不定方程 in 阅读全文
posted @ 2025-12-01 12:51
Marinaco
阅读(6)
评论(0)
推荐(0)

浙公网安备 33010602011771号