Vika
* Codeforces Round 885 (Div. 2) A. Vika and Her Friends
给一个 $n \times m$ 的网格,每个格子对应一个坐标 $(a, b)$ 。如果存在一个各自的坐标为 $(c, d)$ 且满足 $|a - c| + |b - d| = 1$ ,则称 $(a, b)$ 与 $(c, d)$ 相邻。 给出 $k + 1$ 个点,初始坐标分别为 $(x_0, y ......
CF1848B Vika and the Bridge 题解
# CF1848B Vika and the Bridge 题解 ## 题目大意 ~~给个题目传送门吧,感觉题意已经很清楚了~~ [题目传送门](https://www.luogu.com.cn/problem/CF1848B) ## 分析 (~~我不会告诉你我第一眼看过去是二分~~) 因为我们只能 ......
C. Vika and Price Tags
C. Vika and Price Tags Vika came to her favorite cosmetics store "Golden Pear". She noticed that the prices of $n$ items have changed since her last v ......
Codeforces Round 885 (Div. 2)D. Vika and Bonuses(数学)
题目链接:https://codeforces.com/problemset/problem/1848/D 题意: 给定正整数s和k; 你需要维护一个计数器C,并且进行k次操作,每次操作是一下俩种之一: 1:C = C + s; 2:s = s + s % 10; 输出k次后C的最大值,一开始C = ......
Codeforces Round 885 (Div. 2)E. Vika and Stone Skipping(数学,质因数分解)
题目链接:https://codeforces.com/problemset/problem/1848/E 大致题意: 打水漂,某人在海岸线以 f (正整数)的力量扔出石头,会在f,f+(f-1),f+(f-1)+(f-2),........,f+(f-1)+.....+2+1,的位置接触水面; 现 ......
Codeforces Round 885 (Div. 2) F. Vika and Wiki(数学,倍增)
题目链接:https://codeforces.com/problemset/problem/1848/F 大致题意: 长度为n(n是2的幂次),每轮让a【i】 = a【i】^a【i%n + 1】,(^为异或)问需要操作多少次后可以使得每个数为0; 解题思路: 我们来观察: 第一次相当于:a【i】 ......
Codeforces Round 885 (Div. 2) C. Vika and Price Tags
# C. Vika and Price Tags [C - Vika and Price Tags](https://codeforces.com/contest/1848/problem/C) **题意:** 初始两串数列$a, b$,对于第$i$个数,令$c_i=|a_i-b_i|$,然后将 ......
Vika and Her Friends
Smiling & Weeping 早知道思念那么浓烈,不分手就好了 题目链接:Problem - A - Codeforces 题目大意:有n个Vika的朋友在一个n*m的方格中去捉Vika,给出Vika和她朋友的初始位置(坐标),求出Vika能否逃出朋友的追捕。 思路:怎么说╮(╯▽╰)╭ 你知 ......
格雷码 && CF1848F. Vika and Wiki 题解
## 格雷码 && CF1848F. Vika and Wiki 题解 本来有个GitHub上的Hexo博客的,但是我用起来不太熟练……先在博客园里写了后到时候转移过去吧。 ### 前置知识:格雷码(了解的读者可以跳过) 格雷码是所有k-bit(含k个二进制位)的数的一个排列,使得两个循环相邻(即两 ......
CodeForces 1848E Vika and Stone Skipping
[洛谷传送门](https://www.luogu.com.cn/problem/CF1848E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1848/E "CF 传送门") 感觉比这场的 F 简单。 发现我们要进行 $x$ ......
A. Vika and Her Friends
A. Vika and Her Friends Vika and her friends went shopping in a mall, which can be represented as a rectangular grid of rooms with sides of length $n$ ......