比赛链接:https://codeforces.com/contest/1436 ##A.Reorder ##题解 经过模拟计算,观察到 \(\sum_{i=1}^n \sum_{j=i}^n \frac{a_j}{j}=\sum_{i=1}^n a_i\) 判断每个n个数的和sum与m是否相等即可 ...
分类:
其他好文 时间:
2020-11-02 10:35:02
阅读次数:
17
#include <bits/stdc++.h> using namespace std; const int mn=1e6+7; const int mod=1e9+7; int v[mn],p[mn],s[mn]; int main() { int n,tot=0; cin>>n; for(in ...
分类:
其他好文 时间:
2020-11-02 10:09:59
阅读次数:
47
我们很容易理解两个超级大的整数的相加或者相乘不能用int,long, long long 来承载,因为还是很可能溢出。 我们c,c++语言起步的,很容易想到用char数组或者string来无限承载超大数。我开始也这么想的。后面突然想到vector<int>也可以承载。其实没有差别。 很多同学写不出两 ...
分类:
其他好文 时间:
2020-11-01 22:23:05
阅读次数:
25
题目链接:https://www.acwing.com/problem/content/102/ 求出$a[i]$的差分数列$b[i]$,题目的目的是使$b_2,\ldots,b_n$都变为$0$, 令 \(p,q\) 分别为${b_i}$中正数和负数之和的绝对值, 优先在$b_2,\ldots,b ...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System. ...
好题: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e6 + 5; const LL Mod = 1e9 + 7; #define INF 1e9 #define dbg(x) c ...
分类:
其他好文 时间:
2020-11-01 22:04:43
阅读次数:
23
帮助类: using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using MySq ...
分类:
数据库 时间:
2020-11-01 21:58:38
阅读次数:
29
3.2 settings.py 外加跨域 """ Django settings for django01 project. Generated by 'django-admin startproject' using Django 2.2. For more information on this ...
分类:
其他好文 时间:
2020-11-01 21:33:22
阅读次数:
23
小小分个类 #一:图论 ##1. tarjan 这里推荐这篇博客:[https://blog.csdn.net/mengxiang000000/article/details/51672725] ####例:受欢迎的牛[https://www.luogu.com.cn/problem/P2341] ...
分类:
其他好文 时间:
2020-11-01 21:28:37
阅读次数:
18
方法:双链表 #include<iostream> using namespace std; const int N = 100010; int e[N], l[N], r[N], idx; int value_node[N]; int n; void add(int x, int v){ valu ...
分类:
其他好文 时间:
2020-11-01 20:56:06
阅读次数:
15