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…
题目链接: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…
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; ];…