296

AtCoder Beginner Contest(abc) 296

B - Chessboard 难度: ⭐ 题目大意 给定一个8*8的字符矩阵, 其中只有一个' * ', 输出它的坐标; 其坐标的列用字母表示, 行用数字表示, 具体看样例解释; 解题思路 签到题不多嗦了; 神秘代码 #include<bits/stdc++.h> #define int long ......
Beginner AtCoder Contest 296 abc

AtCoder Beginner Contest 296 C - Gap Existence

# C - Gap Existence [原题链接](https://atcoder.jp/contests/abc296/tasks/abc296_c) 题意:是否存在Ai - Aj = x 思路:排序,双指针 ```c++ #include using namespace std; const ......
Existence Beginner AtCoder Contest 296

ABC296D题解

简单题。 考虑 `-1` 的情况,即为 $n^2 #include #define ll unsigned long long ll n,m; ll ans=1llm) ans=min(ans,a*b); } printf("%llu",ans); } return 0; } ``` ......
题解 296D ABC 296

[ABC296E] Transition Game

题意:给定$n$个数,$a_i$为$i$的后继,有$n$轮游戏中,若第$i$轮游戏,对于$1~n$中任意一个后继次数$j$,都能选择一个数$x$使得$x$后继$j$次之后都为$i$,则称之赢一局,问赢的局数。 首先可以肯定一个数的后继是唯一确定的,我们可以从任意$1~n$中的连向它的后继。考虑如果当 ......
Transition 296E Game ABC 296

AtCoder Beginner Contest 296 Ex Unite

[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc296_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc296/tasks/abc296_h "AtCoder 传送门") 不错的 dp。 考 ......
Beginner AtCoder Contest Unite 296

#296. 最强大脑 题解

2021-09-22 22:16:56 星期三 # #296. 最强大脑 题解 这是一道非常简单的`bfs`水题。。。。但是为什么没有人做呢? ~~难道是因为网上搜不到?~~ ## 理解题意: 输入为 **2** 个 `n * m` 大小矩阵。 第一个矩阵表示每个点的**分数值**, 第二个矩阵则表 ......
题解 大脑 296

AtCoder Beginner Contest 296

# [AtCoder Beginner Contest 296](https://atcoder.jp/contests/abc296/tasks) ## D ### 题意 给出n和m,问$1\leq i,j\leq n$,使得$ij\geq m$,求出这个乘积的最小值 ### 思路 这两个乘数至少 ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296

Transition Game 给定序列$a$,$1<=a_i<=n$,一场游戏有$n$个回合,第$i$回合时,第一个人先指定一个任意数$k$,第二个人任意选定一个$x$,$1<=x<=n$,然后$x:=a_x$执行$k$次,如果最后$x=i$,那么第二个人获胜,否则第一个人获胜 对于$n$个回合, ......
Beginner AtCoder Contest 296

[ABC296Ex] Unite 题解

考虑状压 dp。 设 $f_{i,j,s}$ 表示当前正在决策坐标为 $(i,j)$ 的格子,且列状态为 $s$。其中列状态维护了当前轮廓线上的连通块,我们可以使用最小表示法来简单维护。 (为什么不用广义括号序列?因为其涉及到 $5$ 个可选值,由于 $m\le 7$,所以这两个都需要用到八进制,而 ......
题解 Unite ABC 296 Ex

「题解」ABC296Ex Unite

考虑一行一行往下 dp,一个状态需要记录每个格子是否是黑色,对于黑色还有记录其并查集。爆搜跑一下本质不同状态数不是很多,dp 就行了。 $m=7$ 的时候状态数只有 324. #include<cstdio> #include<vector> #include<queue> #include<cst ......
题解 Unite ABC 296 Ex

练习记录-AtCoder Beginner Contest 296(A-F)

vp的 感觉整场挺智慧 A - Alternately 找有没有连续的男女 #include<bits/stdc++.h> #define close std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0) using namespace st ......
Beginner AtCoder Contest 296 A-F

abc296-F

题目链接:https://atcoder.jp/contests/abc296/tasks/abc296_f 思维题,自己想的时候真没啥思路,看了很多题解才渐渐明白,也能大致证明正确性。 前置知识: 交换一个排列中的两个元素一次,会改变它的奇偶性。 思路: 1.当两个数组的数的数量都不相等时,肯定是 ......
abc 296

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 比赛连接 好久没写题解了~~ D - M<=ab 题意就是给定N,M, 求一个最小的数x同时满足x>=M且x=a*b(a<=N,b<=N); N,M<=1e12 开始脑瘫想了二分,仔细一想很明显x不满足单调性,想了下暴力的时间复杂度巨大... ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 A-E

AtCoder Beginner Contest 296 A - Alternately 1 void solve(){ 2 int n=read(); 3 string s; 4 cin>>s; 5 int ans=1; 6 for(int i=0;i<s.size()-1;i++){ 7 if( ......
Beginner AtCoder Contest 296 A-E

AtCoder Beginner Contest 296

AtCoder Beginner Contest 296 赛时代码 A - Alternately // Problem: A - Alternately // Contest: AtCoder - AtCoder Beginner Contest 296 // URL: https://atcod ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 做题记录

D - M<=ab 题意:求最小的正整数,不小于 $m$,且能被表示为两个不大于 $n$ 的正整数的数,不存在输出 -1。$n,m\le10^{12}$。 直接枚举 $a$,计算最小的满足 $ab\ge m$ 的 $b$,如果 $a>b$ 则后面的情况一定是重复的。时间复杂度 $\text{O}(\ ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296

E Transition Game 拓扑跑环。 C++ Code #include "bits/stdc++.h" using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false); cin.ti ......
Beginner AtCoder Contest 296

AtCoder Beginner Contest 296 ABCD

https://atcoder.jp/contests/abc296 ###A - Alternately #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<LL,LL> PII; cons ......
Beginner AtCoder Contest ABCD 296

AtCoder Beginner Contest 296

295? 上周ECF玩去了,咕咕咕 A - Alternately (abc296 a) 题目大意 给定一个包含$MF$的字符串,问是否是 $M,F$交替出现的。 解题思路 判断相邻字母是否相等即可。 神奇的代码 ```cpp #include using namespace std; using ......
Beginner AtCoder Contest 296

Yaroslav and Two Strings CF296B

如果两个只包含数字且长度为 nn 的字符串 ss 和 ww 存在两个数字 1≤i,j≤n 使得 si<wi,sj>wj 则称 ss 和 ww 是不可比的。现在给定两个包含数字和问号且长度为 nn 的字符串, 问有多少种方案使得将所有问号替换成0到9的数字后两个字符串是不可比的 明显的容斥原理 但注意 ......
Yaroslav Strings 296B Two 296
共20篇  :1/1页 首页上一页1下一页尾页