C. Plasticine zebra time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spend…
Plasticine zebra time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending…
Codeforces Round #505 A. Doggo Recoloring 题目描述:给定一个字符串,每次选择一个在字符串里面出现至少两次的字符,然后将这种字符变成那一种指定的字符,问最终这个字符串能否只剩一种字符. solution 当长度为\(1\)是,答案是\(Yes\),当长度大于\(1\)时,如果有字符至少出现两次,则答案为\(Yes\). 时间复杂度:\(O(n)\) B. Weakened Common Divisor 题目描述:有\(n\)个数对,定义这\(n\)个数对的…
从这里开始 题目列表 瞎扯 Problem A Doggo Recoloring Problem B Weakened Common Divisor Problem C Plasticine zebra Problem D Recovering BST Problem E Colored Cubes Problem F Disjoint Triangles Problem G Company Acquisitions 瞎扯 打比赛,发现自己特别菜. 居然还苟且水上紫名 这个号不敢玩了.要努力学习…
B. Weakened Common Divisor time limit per test 1.5 seconds memory limit per test 256 megabytes input standard input output standard output During the research on properties of the greatest common divisor (GCD) of a set of numbers, Ildar, a famous mat…
题目链接 让你找一个数,使得这个数,可以被每个二元组的两个数中的一个数整除. 先将第一个二元组的两个数质因数分解一下,分解的质数加入set中,然后,对剩下的n-1个二元组进行遍历,每次遍历到的二元组对s中的质数进行判断是否能整除.如果某个质数可以被n-1个二元组整除(两个数中的一个). 好浅显的思路,,,可是我就是没想到,,,哭辽,xyqnb mdhnb fyznb %大佬 #include<bits/stdc++.h> #define LL long long #define fi firs…
A : A. Doggo Recoloring time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Panic is rising in the committee for doggo standardization — the puppies of the new brood have been born multi-colore…
B - Hongcow Solves A Puzzle 题目连接: http://codeforces.com/contest/745/problem/B Description Hongcow likes solving puzzles. One day, Hongcow finds two identical puzzle pieces, with the instructions "make a rectangle" next to them. The pieces can be…