码迷,mamicode.com
首页 >  
搜索关键字:struct enum    ( 22969个结果
Rust模块化
Rust模块化 模块化有助于代码的管理和层次逻辑的清晰 Rust模块化有多种方式: 1.嵌套模块 嵌套模块就是直接在要使用模块的文件中声明模块 mod food{//声明模块 pub struct Cake; pub struct Smoothoe; pub struct Pizza; } use ...
分类:其他好文   时间:2021-02-18 13:35:09    阅读次数:0
YbtOJ#893-带权的图【高斯消元,结论】
正题 题目链接: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
leetcode 82 删除排序列表中重复元素
没啥太难的思路,代码如下: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * List ...
分类:编程语言   时间:2021-02-18 12:53:10    阅读次数:0
1028 List Sorting (25 分)
大水题。。。 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
多项式重工业基地
未完待续……(只是给自己存个板子) 快速傅里叶变换 #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
1058 A+B in Hogwarts (20 分)
不开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
mapbox中 变长参数的宏函数
// // variadic_template.h// template <typename T>class Enum {public: using Type = T; static const char * toString(T); static T toEnum(const std::strin ...
分类:其他好文   时间:2021-02-16 12:24:36    阅读次数: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
Golang种结构体的5种初始化方式
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
Go 语言测试
1.断言 标准库 testing "github.com/stretchr/testify/assert" func TestDemo(t *testing.T) { assert.Nil(t, nil) assert.NotNil(t, struct{}{}) assert.Equal(t, 5, ...
分类:编程语言   时间:2021-02-16 12:02:30    阅读次数:0
22969条   上一页 1 ... 25 26 27 28 29 ... 2297 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!