O - Masha and Bears】的更多相关文章

A. Masha and Bears time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car…
Description A family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car and he likes it. Also, mother bear can climb into the middle car and she likes it. Moreover, son bear can climb into…
Problem description A family consisting of father bear, mother bear and son bear owns three cars. Father bear can climb into the largest car and he likes it. Also, mother bear can climb into the middle car and she likes it. Moreover, son bear can cli…
A. Masha and bears 题意 人的体积为\(V\),车的大小为\(size\),人能钻进车的条件是\(V\leq size\),人对车满意的条件是\(2V\geq size\). 现知道 熊爸爸能钻进最大的车并且满意 熊妈妈能钻进中等的车并且满意 熊宝宝能钻进最小的车并且满意 Masha能钻进最小的车并且只对它满意 给定四人的体积(保证\(V1\gt V2\gt V3\)),要求给出三辆车的大小. 思路 考思维严谨性的题.// 还是有些怕的 假设三辆车大小分别为\(a,b,c\),…
Masha and Bears Tic-Tac-Toe Shockers Seating of Students Party Power Tower Reverses…
题目链接: D. Delivery Bears time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Niwel is a little golden bear. As everyone knows, bears live in forests, but Niwel got tired of seeing all the trees…
B. Cubes for Masha time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Absent-minded Masha got set of n cubes for her birthday. At each of 6 faces of each cube, there is exactly one digit from…
B. Masha and geometric depression 题意 在黑板上写数列,首项是b,公比是q,超过l时就停止不写.给定m个数,遇到后跳过不写.问一共写多少个数,如果无穷个输出inf. 题解 分类讨论要注意b大于l,则一个也不会写.(仔细读题!! 暴力的话,可以用map或者set,然后遇到重复的就是inf. 代码 const int N = 2000001; ll b,q,u,m; ll a[N]; int main(){ while(~scanf("%lld%lld%lld%ll…
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string.h> using namespace std; int num[4][10],n; int vis[1100],exa[10]; void dfs(int ceng,int s) { vis[s]=1; if(ceng>=n) return; for(int i=1;i<=n;i++) { if(…
Codeforces Round #524 (Div. 2) C. Masha and two friends 题目链接 题意:较为简单,初始给定这个白黑相交的格子,第一遍把坐标范围内的全部涂白,第二遍把坐标范围内的全部涂黑,问最终各个颜色的数目. 思路:写一个函数,求白黑相间矩阵内的黑色格子的数目,如果格子数为偶数,白=黑.如果为奇数,当矩阵左下角坐标x1+y1为奇数,黑色多一.然后黑色格子数处理三次,第一次减少,第二次增加,第三次(重叠的部分)增加,数目为范围内的原来的黑色格子数. 知识点,…