CF764B Timofey and cubes 题解】的更多相关文章

Content 有一个序列 \(a_1,a_2,a_3,...,a_n\),对于 \(i\in[1,n]\),只要 \(i\leqslant n-i+1\),就把闭区间 \([i,n-i+1]\) 内的所有数翻转.现在给定你翻转后的序列,求原来的序列. 数据范围:\(1\leqslant n\leqslant 2\times 10^5,-10^9\leqslant a_i\leqslant 10^9\). Solution 做这题之前,我们来看这个序列的规律: 首先拿出一个序列 \([2,6,8…
地址:http://codeforces.com/contest/764/problem/B 题目: B. Timofey and cubes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Young Timofey has a birthday today! He got kit of n cubes as a birthd…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents. Every cube has a number ai, which is written on…
Young Timofey has a birthday today! He got kit of n cubes as a birthday present from his parents. Every cube has a number ai, which is written on it. Timofey put all the cubes in a row and went to unpack other presents. In this time, Timofey's elder…
2.2.2017 9:35~11:35 A - Taymyr is calling you 直接模拟 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> using namespace std; typedef long long ll; ; inline int read(){ ,f=; ; c=getcha…
A. Taymyr is calling you time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinis…
今天自己模拟了一套题,只写出两道来,第三道时间到了过了几分钟才写出来,啊,太菜了. A. Taymyr is calling you 水题,问你在z范围内  两个序列  n,2*n,3*n......  和 m,2*m,3*m.....有多少个是一样的. #include<bits/stdc++.h> using namespace std; int n,m,z; int main() { cin>>n>>m>>z; int gcd=__gcd(n,m);…
这道题明显是一道暴力. 暴力枚举每一个 \(a, b, c, d\) 所以我就写了一个暴力.每个 \(a, b, c, d\) 都从 \(1\) 枚举到 \(100\) #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #define line cout << endl using namespace st…
题目 Source http://codeforces.com/contest/525/problem/E Description Anya loves to fold and stick. Today she decided to do just that. Anya has n cubes lying in a line and numbered from 1 to n from left to right, with natural numbers written on them. She…
[Uva10601]Cubes 标签: 置换 burnside引理 题意 给你12跟长度相同的小木棍,每个小木棍有一个颜色.统计他们能拼成多少种不同的立方体.旋转后相同的立方体认为是相同的. 题解 这道题难就难在他不告诉你正方体是怎么旋转的,所以只要把这个想清楚了这道题就不是很难. 有三种旋转方式: 以一个面与其对面的中心为轴旋转.这个可以旋转90,180,270度. 以一条棱与其对棱的中心为轴旋转.只能旋转180度. 以一个点与其对点的中心为轴旋转.能旋转120和240度.(其实就是以这个点为…