头文件 #include <algorithm> transform 函数 转大写 std::string str_write; // 全部转为大写 std::transform(str_write.begin(), str_write.end(), str_write.begin(), toupp ...
分类:
其他好文 时间:
2021-03-30 13:05:05
阅读次数:
0
//二分图匹配#include<cstdio>#include<cstring>using namespace std;const int N = 1005;int n,m,k; //a方n人 b方m人 k对关系 int u,v; int g[N][N]; //表示a,b之间有关系,赋值为0/1. ...
分类:
其他好文 时间:
2021-03-30 12:52:43
阅读次数:
0
1、c语言中计算4行3列矩阵和3行4列矩阵的乘积 #include <stdio.h> int main(void) { int i, j, k; int a[4][3], b[3][4]; puts("input the array a."); for (i = 0; i < 4; i++) { ...
分类:
编程语言 时间:
2021-03-29 12:51:06
阅读次数:
0
std::future 介绍 1 #include <iostream> 2 #include <thread> 3 #include <future> 4 5 using namespace std; 6 7 void DoWork(promise<int> thePromise) 8 { 9 / ...
分类:
其他好文 时间:
2021-03-29 12:48:41
阅读次数:
0
因为要求所有的状态,所以暴力超时 那么想想能否计算贡献。 我们对于每一个xi,xi+1,他们对于每一个fi的状态都有不同的贡献,因此我们枚举情况后用差分数组维护贡献 #include<bits/stdc++.h> typedef long long ll; using namespace std; ...
分类:
其他好文 时间:
2021-03-29 12:48:27
阅读次数:
0
#include<iostream> using namespace std; int main() { int data[1010]; int n, sum = 0; int flag = 0; cin >> n; cin >> data[0] >> data[1]; flag = (data[1 ...
分类:
其他好文 时间:
2021-03-29 12:40:26
阅读次数:
0
#define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> int main() { int num; scanf("%d", &num); printf("2049%04d\n", num); scanf("%d", &num); printf("204 ...
分类:
编程语言 时间:
2021-03-29 12:27:05
阅读次数:
0
结构体中的位结构: 1 #include <stdio.h> 2 3 typedef struct _lar{ 4 unsigned char ucA:1; 5 unsigned char ucB:1; 6 unsigned char ucC:2; 7 unsigned char ucD:4; 8 ...
分类:
其他好文 时间:
2021-03-29 12:24:59
阅读次数:
0
#include <stdio.h> #define NUMBER 100 int push(int* a, int top, int data) { a[++top] = data; return top; } int pop(int* a, int top) { if (top == -1) { ...
分类:
编程语言 时间:
2021-03-29 12:23:07
阅读次数:
0
#include <stdio.h> int main(){ int a = 100; char str[20] = "hello world!"; char *zza = "hello world!"; printf("%#X,%#X,%#X\n", *zza, &zza,zza); printf ...
分类:
编程语言 时间:
2021-03-29 12:14:44
阅读次数:
0