2019-2020 ICPC Northwestern European Regional Programming Contest (NWERC 2019) I-Inverted Deck #include<bits/stdc++.h> using namespace std; const int ...
分类:
其他好文 时间:
2020-10-07 20:36:52
阅读次数:
20
#include<bits/stdc++.h> using namespace std; struct dt{ int cs,bs; }que[210]; int n,a,b,ans=-1; int yd[205]; int book[205]; int f,r; bool fs=false; vo ...
分类:
其他好文 时间:
2020-10-07 20:27:24
阅读次数:
30
1 #include<stdio.h> 2 #include<time.h> 3 #include<stdlib.h> 4 5 int main() 6 { 7 time_t t; 8 int man,computer,sum; 9 t= time(NULL); 10 11 srand(t); 12 ...
分类:
编程语言 时间:
2020-10-06 21:12:15
阅读次数:
27
#include <queue> #include <cstdlib> #include <cmath> #include <cstdio> #include <string> #include <cstring> #include <iostream> #include <algorithm> u ...
分类:
其他好文 时间:
2020-10-06 20:54:49
阅读次数:
33
题意 统计树中的每一层有多少叶子结点,要求逐层输出 思路 逐层输出,刚好层序遍历是逐层扩展,所以我就直接用BFS了 代码 #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <v ...
分类:
其他好文 时间:
2020-10-06 20:54:35
阅读次数:
26
1 创建user/serializers.py 写序列化器 from rest_framework import serializers from user.model import User def address_validate(data): #独立校验器 #raise serializers ...
分类:
其他好文 时间:
2020-10-06 20:51:55
阅读次数:
29
Solution 这个题意思很显然,是求 \(n\) 个区间重叠最多的地方和值。 那么我们能想到用差分数组,在扫一遍的过程中维护最大值和 \(pos\) 。 但是需要注意的是,区间最大会到 $10^9$ ,直接差分是不行的,我们需要先对所有 \(b\) 和 \(d\) 进行离散化,然后再去差分。 代 ...
分类:
其他好文 时间:
2020-10-06 20:44:06
阅读次数:
25
Miku 我们只需要一个额外的点代表水库 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int head[400]; int n; int w[400]; int x,y,z; struct ...
分类:
其他好文 时间:
2020-10-06 20:27:46
阅读次数:
26
原文链接:https://www.cnblogs.com/inception6-lxc/p/8996050.html 在看书的时候有个往链表里添加节点的函数,代码中考虑到可能给出的头指针为空,并做另外一些处理。具体代码如下: [cpp] view plain copy print? #include ...
分类:
编程语言 时间:
2020-10-06 20:14:33
阅读次数:
21
#include <string.h> #include <stdio.h> #include #include using namespace std; int n,m,a[11000],c[11000]; //差分建树,区间更新 int lowbit(int x) { return x&-x; ...
分类:
编程语言 时间:
2020-10-06 20:10:09
阅读次数:
25