上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要: 问题 D: Olympic Bus 时间限制: 1 Sec 内存限制: 128 MB 题目描述 There are N cities in JOI Kingdom, numbered from 1 to N. There are M bus lines connecting cities, numb 阅读全文
posted @ 2020-04-04 16:40 Snow_in_winer 阅读(143) 评论(0) 推荐(0) 编辑
摘要: ```c++ ll pow_mod(ll a,ll b) { ll res = 1; while (b) { if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1; } return res; } ``` 阅读全文
posted @ 2020-04-03 15:41 Snow_in_winer 阅读(132) 评论(0) 推荐(0) 编辑
摘要: ```#include using namespace std;const int maxn=1e5+10;int a[maxn];int n;int up(int n) { int i = n; while (i != 1 && a[i] a[i + 1]) { i++; } if (a[i] = 1; i--) { ... 阅读全文
posted @ 2020-04-01 20:27 Snow_in_winer 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; typedef long long ll; ll f[30][30][30]; ll n; int main() { while (~scanf("%lld",&n)) { f[0][1][1]=1; for (int i=1... 阅读全文
posted @ 2019-09-23 17:17 Snow_in_winer 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #pragma GCC optimize(3,"Ofast","inline") #include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxn=1000005; int prime[maxn/10],phi[maxn]; bool vis[maxn]; int tot; inline int gc 阅读全文
posted @ 2019-09-23 15:06 Snow_in_winer 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 问题 A: 招待 题目描述 请了两位奆老来为自己种树,小X也稍稍有些不好意思了,于是他准备了一些零食和饮料来招待奆老们。然而,小X有强迫症,他希望自己和好基友们所有的零食和饮料的质量都要完全相同。由于小X是一个奆老,所以他看不起普通商店里卖的电子秤,他决定自己做一个。他的称重工具是一架由金子制成的天 阅读全文
posted @ 2019-09-21 09:48 Snow_in_winer 阅读(262) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_42555009/article/details/87253503 阅读全文
posted @ 2019-09-18 20:49 Snow_in_winer 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 题解 有n个花坛,要选s支花,每个花坛有f[i]支花,同一个花坛的花颜色相同,不同花坛的花颜色不同,问说可以有多少种组合。 2^n的状态,枚举某些花坛的花超过了,剩下的用隔板法计算个数,再加个容斥原理就行了 ————————————————————————————————————————————- 阅读全文
posted @ 2019-09-18 19:33 Snow_in_winer 阅读(148) 评论(0) 推荐(0) 编辑
摘要: The 2019 Asia Nanchang First Round Online Programming Contest 阅读全文
posted @ 2019-09-15 18:45 Snow_in_winer 阅读(146) 评论(0) 推荐(0) 编辑
摘要: The Preliminary Contest for ICPC Asia Shanghai 2019 Light bulbs 题意:有n盏灯,初始都是灭的状态,p次操作,每次操作翻转a到b盏灯的状态,问最终操作完成后几盏灯是亮着的。 思路:内存限制8192K,显然不能用线段树,只能用数组操作,但是 阅读全文
posted @ 2019-09-15 18:24 Snow_in_winer 阅读(524) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 20 下一页