- 博客(4)
- 收藏
- 关注
原创 2020-11-27
快速幂模板,爆long long了用__int128 https://ac.nowcoder.com/acm/contest/7872/F 题目来源 #include <iostream> #include<string.h> #include<algorithm> #include<stdio.h> #include<bits/stdc++.h> using namespace std; #define ll __int128 ll fastP
2020-11-27 09:15:54 138
原创 被3整除的子序列 牛客竞赛
被3整除的子序列 给你一个长度为50的数字串,问你有多少个子序列构成的数字可以被3整除 答案对1e9+7取模 https://ac.nowcoder.com/acm/problem/21302 #include<iostream> #include<string.h> #define mod 1000000007 using namespace std; int main() { char str[100005]; scanf("%s",str); int dp[10005][
2020-11-06 20:15:51 122
原创 H Message Bomb
H Message Bomb While we enjoy chatting with friends on the internet, it is always annoying that we are overwhelmed by lots of messages in various chat groups. A great majority of these messages are actually not interesting to us, but we may miss some impor
2020-11-01 18:26:36 191
原创 Walking Machine 2020小米邀请赛A.Walking Machine dfs
Walking Machine 题意:给一个迷宫,根据它标的字符判断这个细胞在这个位置可以走的方向,答案输出有多少个细胞可以走出这个迷宫。 题解:判断细胞能不能走出去其实就是判断当前这个位置的所有细胞最终能不能走出去,用dfs去遍历,如果在这个位置的细胞可以走出去,就把value置1,最后遍历有多少个value被置为1就是答案。 #include<iostream> using namespace std; const int MaxN=1e7+10; int vis[1050][1050]
2020-11-01 17:46:38 129
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人