正题 题目链接:https://www.ybtoj.com.cn/problem/893 题目大意 给出一张$n$个点$m$条边的无向联通图,每条边正反向各有$A,B,C$三种边权。 保证满足 \(A_{x,y}=-A_{y,x}\ ,\ B_{x,y}=B_{y,x}\ ,\ C_{x,y}=-C ...
分类:
其他好文 时间:
2021-02-18 12:55:29
阅读次数:
0
没啥太难的思路,代码如下: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * List ...
分类:
编程语言 时间:
2021-02-18 12:53:10
阅读次数:
0
大水题。。。 const int N=1e5+10; struct Node { string id; string name; int grade; }a[N]; int n,m; bool cmp1(Node &a,Node &b) { return a.id < b.id; } bool cm ...
分类:
其他好文 时间:
2021-02-17 15:07:19
阅读次数:
0
写在前边 链接:Codeforces Round #701 (Div. 2) 数学场,题目描述简单粗暴,思路很妙,代码短的不行,都是好神奇的一些题目。 A. Add and Divide 链接:A题链接 题目大意: 给定两个正整数,我们可以进行两个操作: \(a = \lfloor \frac{a} ...
分类:
其他好文 时间:
2021-02-17 14:39:22
阅读次数:
0
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:
其他好文 时间:
2021-02-17 14:03:19
阅读次数:
0
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> ...
分类:
其他好文 时间:
2021-02-16 12:44:42
阅读次数:
0
typedef - 自定义类型 该语句主要用于将某种类型起名为一个别名,如 double 起名为 area,这样以后再定义area类型的变量时,就相当于定义了一个double的变量。 程序实例: 定义一个double 类的 #include <iostream> using namespace st ...
分类:
其他好文 时间:
2021-02-16 12:35:10
阅读次数:
0
不开long long见祖宗。 struct Node { LL galleon,sickle,knut; }a,b; int main() { scanf("%d.%d.%d",&a.galleon,&a.sickle,&a.knut); scanf("%d.%d.%d",&b.galleon,& ...
分类:
其他好文 时间:
2021-02-16 12:33:27
阅读次数:
0
1 #include <iostream> 2 3 using namespace std; 4 5 template <typename K, typename V> 6 class BST 7 { 8 private: 9 struct node // 类内定义类、结构体 10 { 11 K k ...
分类:
其他好文 时间:
2021-02-16 12:09:37
阅读次数:
0
package main import ( "fmt" ) type Cat struct{ Name string Age int } func main(){ // 第一种方式,先声明再初始化 var cat1 Cat cat1.Name = "cat1" cat1.Age = 1 fmt.Pr ...
分类:
其他好文 时间:
2021-02-16 12:03:03
阅读次数:
0