该文被密码保护。 阅读全文
摘要:
最近在帮忙搭建学校CG平台的CSP题库,这道题是我的任务之一。读完题后有了一些思路,又看了看网上的题解,感觉基本一致。 思路:本题求1到n的单源最短路,和最普通的单源最短路的区别是:路分为大道和小道两种。我们可以将到达每个节点的最短路分成两部分,一部分是到达该点的上一条路是大路的最短路,另一部分是到 阅读全文
摘要:
https://blog.csdn.net/qq_41021816/article/details/81428225?utm_medium=distribute.pc_feed_404.none-task-blog-BlogCommendFromMachineLearnPai2-3.nonecase 阅读全文
摘要:
线性求逆元 #include<bits/stdc++.h> #define ll long long using namespace std; ll n, p, inv[3000005]; int main(){ cin >> n >> p; inv[0] = inv[1] = 1; cout << 阅读全文
摘要:
#include<bits/stdc++.h> #define ri register int #define ll long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std 阅读全文
摘要:
#include<bits/stdc++.h> #define ri register int #define ll long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std 阅读全文
摘要:
Kruskal #include<bits/stdc++.h> #define ri register int #define ll long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using names 阅读全文
摘要:
#include<bits/stdc++.h> #define ri register int #define ll long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std 阅读全文
摘要:
#include<bits/stdc++.h> #define ri register int #define ll long long #define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std 阅读全文
摘要:
第九题 序列计数题目【问题描述】小明想知道,满足以下条件的正整数序列的数量:1. 第一项为 n;2. 第二项不超过 n;3. 从第三项开始,每一项小于前两项的差的绝对值。请计算,对于给定的 n,有多少种满足条件的序列。【输入格式】输入一行包含一个整数 n。【输出格式】输出一个整数,表示答案。答案可能 阅读全文