当前位置:网站首页>2022-7-18 summary
2022-7-18 summary
2022-07-25 04:50:00 【JSU-YSJ】
The time for this summary is 2022-7-16~2022-7-18
These two days are mainly in question brushing training :
Niuke supplement :



CF Supplementary questions :
5.00 Summer vacation Niuke adds supplementary questions :

/*
https://ac.nowcoder.com/acm/contest/33186/I
Chiitoitsu
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 7;
int n;
int dp[20][200];
int ksm(int a, int b) {
int ret = 1;
while (b) {
if (b & 1) {
ret *= a;
ret %= mod;
}
a = a * a;
a %= mod;
b >>= 1;
}
return ret;
}
int inv(int a) { return ksm(a, mod - 2); }
int mul(int a, int b) { return a * b % mod; }
void solve(int c) {
// memset(dp, 1, sizeof dp);
for (int i = 6; i >= 0; i--) {
for (int j = 1; j <= 136; j++) {
dp[i][j] = 1;
int ok = (13 - 2 * i) * 3;
dp[i][j] = dp[i][j] + mul(dp[i][j - 1], mul(j - ok, inv(j)));
dp[i][j] %= mod;
if (i != 6) { dp[i][j] = dp[i][j] + mul(dp[i + 1][j - 1], mul(ok, inv(j))); }
dp[i][j] %= mod;
}
}
string s;
cin >> s;
int cnt = 0;
std::map<string, int> mp;
for (int i = 0; i < 25; i += 2) {
string tmp = "";
tmp += s[i];
tmp += s[i + 1];
mp[tmp]++;
if (mp[tmp] == 2) { cnt++; }
}
// cout << cnt << endl;
printf("Case #%d: %ld\n", c, dp[cnt][123]);
return;
}
signed main() {
int T;
cin >> T;
for (int i = 1; i <= T; i++) { solve(i); }
return 0;
} This is a wrong topic ,
This probability DP, At first, it was (7-i) The number of cards is not considered , Consider logarithm directly , Not paying attention to , What a injustice , Another topic is

Write a wrong symbol , After a long time .... In a word, I didn't pay attention to the details , Then I returned the sample and 37.5%, Outrageous . Play well tomorrow .
边栏推荐
- MongoDB的安全认证详解
- Summary of UPR optimization suggestions of unity
- Web: compiling big refactoring from 10 to 1
- [cloud picture theory] 247 first introduction to Huawei cloud analysis service
- Geely and Daimler set up a joint venture to produce pure electric smart in China!
- 956. Highest billboard pressure DP
- HTC new VR all-in-one machine vive focus plus release: price 5699 yuan!
- LVGL 8.2 Span
- Pychart configuration pyqt5
- 很清晰的条理
猜你喜欢

2、 Mysql database foundation

Ffmpeg download and installation

The interviewer asked MySQL transactions, locks and mvcc at one go. I

Salt and ice particles cannot be distinguished

Implementation of recommendation system collaborative filtering in spark

数据链路层协议 ——— 以太网协议

The strongest JVM in the whole network is coming!

Basic knowledge of scratch crawler framework

【基于stm32f103的SHT30温湿度显示】

Introduction to CpG control network
随机推荐
GDT,LDT,GDTR,LDTR
推荐系统-协同过滤在Spark中的实现
深入掌握Pod
Sudden! Britain accuses Huawei of major defects in its equipment (with report)
How to merge cells in a table by markdown
Perspective
自然的状态最好
Kubesphere 3.3.0 offline installation tutorial
What causes the wait event of TCP socket (kgas) in oracle?
Dark king | analysis of zego low illumination image enhancement technology
Introduction to fundamentals of operations research [1]
Anaconda installs jupyter
LVGL 8.2 Tabview & Window
LVGL 8.2 Tabview
GBase JDBC 连接数据库异常
Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi
【基于stm32f103的SHT30温湿度显示】
Getting started with scratch
C# 之 FileStream类介绍
在开发或调试IP直接方案时需要注意Host的值跟直接的IP要一致