摘要:
#include<bits/stdc++.h> #pragma GCC optimize(2) #define ll long long using namespace std; ll n,m;ll a[1000001];ll tree[1000001];ll tag[1000001]; int t 阅读全文
摘要:
吊坠 import os import sys from collections import defaultdict # 请在此输入您的代码 n,m=map(int,input().split()) l=[] cnt=0 for i in range(n): a=input() a=a+a d=d 阅读全文
摘要:
区别在于图的可达性。如果由任意节点出发(以任意节点为根)可以到达所有节点, 那么遍历就只需要跑一次dfs;若可达性无法保证,则需要多次运行dfs; #include<bits/stdc++.h> using namespace std; #define N 10001 int m,n; int vt 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; #define N 10001 int m,n,t; int dp[N]; vector<pair<int,int>>v[N]; int main() { cin>>m>>n; int a,b,x; for(i 阅读全文
摘要:
样题通往奥格瑞玛的道路 #include<bits/stdc++.h> using namespace std; const int N=10001; long long f[N]; vector<pair<int,long long>>vec[N]; priority_queue<pair<lon 阅读全文