/* towctrans example */ #include #include int main () { int i=0; wchar_t str[] = L"Test String.\n"; wchar_t c; wctype_t check = wctype("lower"); /* 小写... ...
分类:
其他好文 时间:
2019-05-20 13:29:02
阅读次数:
126
#include using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAXN = 5e5 + 100; const int MAXM = 3e3 + 10; template inline... ...
分类:
其他好文 时间:
2019-05-12 13:49:12
阅读次数:
155
A.2176 给一个字符串s,问距离为D的字母对是否存在相同。 模拟 #include<bits/stdc++.h> using namespace std; int main() { string s,b; while(cin>>s) { if(s[0]=='*')break; int flag= ...
分类:
其他好文 时间:
2019-05-12 10:50:47
阅读次数:
118
"Counting swaps" 给你一个1~n的排列,问用最少的交换次数使之变为递增排列的方案数$mod\ 10^9+7$,1?≤?n?≤?10^5。 解 显然最少的交换次数不定,还得需要找到最小交换次数,而考虑到交换为复杂的过程,考虑状态的性质,所以不难想到画出,+为箭头指向方向 于是你会发现实 ...
分类:
其他好文 时间:
2019-04-30 17:16:22
阅读次数:
109
#include<stdio.h>int main(){ int a,s,d,f,g; putchar(getchar(a)); putchar(getchar(s)); putchar(getchar(d)); putchar(getchar(f)); putchar(getchar(f)); p ...
分类:
其他好文 时间:
2019-04-25 16:05:05
阅读次数:
145
#include <stdio.h>int main (){ char a,b,c,d,e; a=getchar(); b=getchar(); c=getchar(); d=getchar(); e=getchar(); putchar(a); putchar(b); putchar(c); pu ...
分类:
其他好文 时间:
2019-04-25 14:32:30
阅读次数:
106
#include #include #include #include #include #include #include #include #include #define REP(i,a,n) for(int i=a;i=a;--i) #define hr putchar(10) #defin... ...
分类:
其他好文 时间:
2019-04-23 09:36:30
阅读次数:
140
Divisibility 给定n个数,问是否能从中选出恰好k个数,使得这些数两两之差可以被m整除。 【输入格式】 第一行输入三个正数n,k,m。 接下来一行n个数。 【输出格式】 若不能选出k个数,则输出"No"(不包含引号)。 若可以,第一行输出"Yes"(不包含引号),第二行输出k正整数,用空格 ...
分类:
其他好文 时间:
2019-04-18 00:46:44
阅读次数:
155
Serval and Bonus Problem 1.转化为l=1,最后乘上l 2.对于一个方案,就是随便选择一个点,选在合法区间内的概率 3.对于本质相同的所有方案考虑在一起,贡献就是合法区间个数/(2*n+1) 4.运用条件概率或者直接解释,只需求出所有本质不同的方案的合法区间个数的和 5.DP ...
分类:
其他好文 时间:
2019-04-15 23:16:32
阅读次数:
186
大意: n个点, $i$和$j$之间可以连$c_{ij}$种无向边, 求连成连通图的方案数. 设$f_i$为状态$i$时连通图方案, $g_i$为状态$i$时所有方案. 有$f_i=g_i-\sum\limits_{j}f[j]g[i\wedge j]$ ...
分类:
其他好文 时间:
2019-04-15 16:18:48
阅读次数:
158