摘要:
#include<cstdio> #include<algorithm> const int N = 1e6 + 1; int n, t[N]; namespace lsh{ int lsh[N], tmp[N]; void init() { for (int i = 1; i <= n; ++i) 阅读全文
摘要:
**link:**http://poj.org/problem?id=2976 description: There are n courses, $a_i$is your grade, while the full marks is \(b_i\). The GPA calculate metho 阅读全文
摘要:
description: Color some of the cells of the \(n*n\) square's edge black, check if there exists an solution of given black cells of each edge. solution 阅读全文
摘要:
实现了进制转换的简单算法(仅限正整数). #include<cstdio> inline int power(int x, int p) { int b = 1; while (p) { if (p & 1) b *= x; p >>= 1; x *= x; } return b; } inline 阅读全文
摘要:
Cantor Expansion: \(X = \sum_{i=1}^n (n-i)!\sum_{j=i+1}^{n}[p_i>p_j]\) It is a bijection from a permutation of \(p[1..n]\) to its dictionary order. We 阅读全文
摘要:
description: There are \(3\) buckets, whose volume are \(a,b,c\) respectly. How can you get \(k\) \(L\) oil by the three buckets? (Initially, the firs 阅读全文
摘要:
description: There are two strings \(a\), \(b\) with the length \(n\), and \(m\). Find the Array <\(p_1, p_2, ..., p_m>\), such that \(a_{p_i}= b_i\), 阅读全文
摘要:
Link:https://codeforces.com/problemset/problem/1492/B description: You are given a deck of cards, numbered from \(1\) to \(n\). For each time you can 阅读全文