容斥原理 \(\because C_n^0 + C_n^1 + C_n^2 + \ldots + C_n^n = 2^n\) \(\therefore C_n^1 + C_n^2 + \ldots + C_n^n = 2^n - 1\) 实现的时候,奇数加,偶数减。 题意:给定一个整数 n 和 m ...
分类:
其他好文 时间:
2021-02-19 13:23:10
阅读次数:
0
水题。 int cnt[105]; int n,m; int main() { cin>>n; for(int i=0;i<n;i++) { int x; cin>>x; cnt[x]++; } cin>>m; for(int i=0;i<m;i++) { int x; cin>>x; if(i) ...
分类:
其他好文 时间:
2021-02-19 13:14:05
阅读次数:
0
兄弟题1084 Broken Keyboard (20 分),一样的水~。 ps:`当按键都没坏的时候,输入可能为空,要用getline而不能用cin。 bool vis[200]; string a,b; int main() { getline(cin,a); getline(cin,b); f ...
分类:
其他好文 时间:
2021-02-19 13:11:20
阅读次数:
0
兄弟题1039 Course List for Student (25 分),一样很水。 vector<string> course[2510]; int n,m; int main() { cin>>n>>m; for(int i=0;i<n;i++) { string name; name.re ...
分类:
其他好文 时间:
2021-02-19 12:59:54
阅读次数:
0
import javafx.application.Application; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos ...
分类:
编程语言 时间:
2021-02-18 13:16:42
阅读次数:
0
https://www.acwing.com/problem/content/1143/ \(裸题\) #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); c ...
分类:
其他好文 时间:
2021-02-17 14:58:39
阅读次数:
0
https://www.acwing.com/problem/content/1144/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-17 14:57:50
阅读次数:
0
未完待续……(只是给自己存个板子) 快速傅里叶变换 #include <bits/stdc++.h> using namespace std; const int maxn = 2e6 + 1e2; struct Cp { double x, y; inline Cp operator +(cons ...
分类:
其他好文 时间:
2021-02-17 14:03:19
阅读次数:
0
A - Favorite Sound #include<bits/stdc++.h> using namespace std; const int N = 1e6 + 5; typedef long long LL; int main(){ int a, b, c; cin >> a >> b >> ...
分类:
其他好文 时间:
2021-02-16 12:44:42
阅读次数:
0
水题~。 int n; int main() { cin>>n; string res; int t=n/100; for(int i=0;i<t;i++) res+='B'; t=n%100/10; for(int i=0;i<t;i++) res+='S'; t=n%100%10; for(in ...
分类:
其他好文 时间:
2021-02-16 12:32:36
阅读次数:
0