- 博客(5)
- 收藏
- 关注
原创 B. Avoid Local Maximums
description You are given an array a of size n. Each element in this array is an integer between 1 and 109. You can perform several operations to this array. During an operation, you can replace an element in the array with any integer between 1 and 109.
2022-02-22 23:05:56
341
原创 C - Differential Sorting (CodeForces - 1635C )(补题)
题目如下: You are given an arrayaofnelements. Your can perform the following operation no more thanntimes: Select three indicesx , y , z (1≤ x < y < z ≤ n)and replace axwith ay − az. After the operation, ∣ax∣need to be less than10^18. Y...
2022-02-21 23:54:09
413
原创 G - 迷宫(一)
一天蒜头君掉进了一个迷宫里面,蒜头君想逃出去,可怜的蒜头君连迷宫是否有能逃出去的路都不知道。 看在蒜头君这么可怜的份上,就请聪明的你告诉蒜头君是否有可以逃出去的路。 输入格式 第一行输入两个整数 n 和 m,表示这是一个 n × m 的迷宫。 接下来的输入一个 n 行 m 列的迷宫。其中 'S' 表示蒜头君的位置,'*'表示墙,蒜头君无法通过,'.'表示路,蒜头君可以通过'.'移动,'T'表示迷宫的出口(蒜头君每次只能移动到四个与他相邻的位置——上,下,左,右)。 输出格式 输出一个字符串,如果
2022-02-20 22:36:22
1481
原创 B - Squares and Cubes(补题)
题目如下: Polycarp likes squares and cubes of positive integers. Here is the beginning of the sequence of numbers he likes:1,4,8,9, .... For a given numbernn, count the number of integers from1tonthat Polycarp likes. In other words, find the number ...
2022-02-19 20:49:27
641
1
原创 全排列(模板+一道题“组合数”)
一、模板 找出从自然数 1、2、⋯、n(0<n<10)中任取 r(0<r ≤n) 个数的所有组合。 输入格式 输入 n、r。 输出格式 输出所有组合。 二、题目:组合数 找出从自然数 1、2、⋯、n(0<n<10)中任取 r(0<r≤n) 个数的所有组合。 输入格式 输入 n、r。 输出格式 按特定顺序输出所有组合。 特定顺序:每一个组合中的值从大到小排列,组合之间按逆字典序排列。 Input: ...
2022-02-18 18:14:50
387
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅