摘要:
原题 #include <cstdio> #include <iostream> using namespace std; int main(){ int s, v, t = 0; cin>>s>>v; //上去整, 直接算到垃圾分类的时间 if(s % v == 0) t += 10; else 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 8, M = 1e6 + 2; char p[N], s[M]; int n, m, ne[M]; int main(){ // p --> 模板串 s --> 模式串 阅读全文
摘要:
朴素Dijkstra //Dijkstra算法,用于单源最短路边都为正数的情况 int n, m; int dis[N], g[N][N]; //dis -> 最短距离 g -> 图 bool st[N]; int Dijkstra(){ memset(dis, 0x3f, sizeof(dis)) 阅读全文