C. Cave Painting time limit per test 1 second memory limit per test 256 megabytes Problem Description Imp is watching a documentary about cave painting. Some numbers, carved in chaotic order, immediately attracted his attention. Imp rapidly proposed…
CF922 CodeForces Round #461(Div.2) 这场比赛很晚呀 果断滚去睡了 现在来做一下 A CF922 A 翻译: 一开始有一个初始版本的玩具 每次有两种操作: 放一个初始版本进去,额外得到一个初始版本和一个复制版本 放一个复制版本进去,额外得到两个复制版本 一开始有\(1\)个初始版本,是否能恰好得到\(x\)个复制版本和\(y\)个初始版本 Solution 傻逼题 要特判一些特殊情况(没有\(1A\)...) #include<iostream> #includ…
题目链接:http://codeforces.com/contest/922 B. Magic Forest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Imp is in a magic forest, where xorangles grow (wut?) A xorangle of order n is such a…
A - Cloning Toys /* 题目大意:给出两种机器,一种能将一种原件copy出额外一种原件和一个附件, 另一种可以把一种附件copy出额外两种附件,给你一个原件, 问能否恰好变出题目要求数量的原件和附件 题解:注意当附件需求不为0的时候,原件需求必须大于1 */ #include <cstdio> #include <algorithm> int main(){ int a,b; scanf("%d%d",&a,&b); if((a-…
B. Restoring Painting 题目连接: http://www.codeforces.com/contest/675/problem/B Description Vasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he h…
C. Tile Painting Ujan has been lazy lately, but now has decided to bring his yard to good shape. First, he decided to paint the path from his house to the gate. The path consists of…
D. Robot Vacuum Cleaner time limit per test 1 second memory limit per test 256 megabytes Problem Description Pushok the dog has been chasing Imp for a few hours already. Fortunately, Imp knows that Pushok is afraid of a robot vacuum cleaner. While mo…
B. Magic Forest time limit per test 1 second memory limit per test 256 megabytes Problem Description Imp is in a magic forest, where xorangles grow (wut?) A xorangle of order n is such a non-degenerate triangle, that lengths of its sides are integers…
A. Cloning Toys time limit per test 1 second memory limit per test 256 megabytes Problem Description Imp likes his plush toy a lot. Recently, he found a machine that can clone plush toys. Imp knows that if he applies the machine to an original toy, h…
Magic Forest 题意:就是在1 ~ n中找三个值,满足三角形的要求,同时三个数的异或运算还要为0: , where  denotes the bitwise xor of integers x and y. 我已开始没想到a^b^c=0相当于c = a^b; 这样的转化就可以是三次的变成二次的: #include <cstdio> #include <algorithm> #include <iostream> using namespace std; ];…