搜索结果
查询Tags标签: tie,共有 9条记录-
传递闭包
传递闭包模板#include<iostream> #define maxn 10007 using namespace std; int a[maxn], dis[107][107], n, m; int main(void) {ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);cin >> n;for (int i = 1; i <= n; i++)for (int j = 1; j <= n;…
2022/5/2 23:42:43 人评论 次浏览 -
Codeforces Round #755 (Div. 2, based on Technocup 2022 Elimination Round 2) ABC
Problem - A - Codeforces题目大意:给定u,v,求x,y。要满足x/u + y/v =( x+y) / (u+v)input 4 1 1 2 3 3 5 6 9output -1 1 -4 9 -18 50 -4 9u*u *y=-x *v*v so y=-x*v*v/u*u 开longlong即可 #include<iostream> #include<cmath> #include<algori…
2021/11/16 23:39:56 人评论 次浏览 -
Codeforces Round #755 (Div. 2, based on Technocup 2022 Elimination Round 2) ABC
Problem - A - Codeforces题目大意:给定u,v,求x,y。要满足x/u + y/v =( x+y) / (u+v)input 4 1 1 2 3 3 5 6 9output -1 1 -4 9 -18 50 -4 9u*u *y=-x *v*v so y=-x*v*v/u*u 开longlong即可 #include<iostream> #include<cmath> #include<algori…
2021/11/16 23:39:56 人评论 次浏览 -
cf C.Collatz Conjecture
Dashboard - 2017 Benelux Algorithm Programming Contest (BAPC 17) - Codeforces 大意:给n个数字,求区间gcd的情况数 首先,设我们有三个数字 a b c gcd(a,b)==d,gcd(b,c)==e,gcd(d,e)==f 因为gcd(b,b)==b,gcd(gcd(a,b),gcd(b,c))=gcd(a,b,c,d)=gcd(a,…
2021/11/7 23:14:21 人评论 次浏览 -
cf C.Collatz Conjecture
Dashboard - 2017 Benelux Algorithm Programming Contest (BAPC 17) - Codeforces 大意:给n个数字,求区间gcd的情况数 首先,设我们有三个数字 a b c gcd(a,b)==d,gcd(b,c)==e,gcd(d,e)==f 因为gcd(b,b)==b,gcd(gcd(a,b),gcd(b,c))=gcd(a,b,c,d)=gcd(a,…
2021/11/7 23:14:21 人评论 次浏览 -
程序设计与算法(三)C++面向对象程序设计 第七周 相关笔记
1、cerr freopen cout输出到文件内时,cerr能输出到控制台显示 2、cin.getline() defalut -> \n#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #include<bits/stdc++.h> using namespace std; int main(){//IOS;//freopen("a.txt&q…
2021/10/23 11:10:15 人评论 次浏览 -
程序设计与算法(三)C++面向对象程序设计 第七周 相关笔记
1、cerr freopen cout输出到文件内时,cerr能输出到控制台显示 2、cin.getline() defalut -> \n#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #include<bits/stdc++.h> using namespace std; int main(){//IOS;//freopen("a.txt&q…
2021/10/23 11:10:15 人评论 次浏览 -
程序设计与算法(三)C++面向对象程序设计 第七周 相关笔记
1、cerr freopen cout输出到文件内时,cerr能输出到控制台显示 2、cin.getline() defalut -> \n#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #include<bits/stdc++.h> using namespace std; int main(){//IOS;//freopen("a.txt&q…
2021/10/23 9:39:48 人评论 次浏览 -
程序设计与算法(三)C++面向对象程序设计 第七周 相关笔记
1、cerr freopen cout输出到文件内时,cerr能输出到控制台显示 2、cin.getline() defalut -> \n#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #include<bits/stdc++.h> using namespace std; int main(){//IOS;//freopen("a.txt&q…
2021/10/23 9:39:48 人评论 次浏览