CF Theatre Square】的更多相关文章

Theatre Square time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city'…
A. Theatre Square Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is o…
A. Theatre Square time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the ci…
http://codeforces.com/problemset/problem/1/A Theatre Square time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Theatre Square in the capital city of Berland has a rectangular shape with the si…
A - Theatre Square Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 1A Description Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the…
A. Theatre Square time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Theatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the ci…
题目链接:B.New Theatre Square 题意: 你要把所有"." 都变成"*",你可以有两个选择,第一种就是一次铺一个方块(1*1),第二种就是同一行一次铺两个(1*2).第一种花费x,第二种花费y.问最少花费多少能把所有铺完 题解: 如果y>=2*x,那么就直接找到所有".",然后乘于x就行 否则就找俩俩一对就行了 代码: 1 #include<stdio.h> 2 #include<algorithm>…
A permutation of length n is an array containing each integer from 1 to n exactly once. For example, q = [4, 5, 1, 2, 3] is a permutation. For the permutation q the square of permutation is the permutation p that p[i] = q[q[i]] for each i = 1... n. F…
思路:这题的关键就是重复根只可能是整数. 这样先求出所有的根的数目,在减去重复的根. 代码如下: #include <iostream> #include <cstring> #include <cstdio> #include <cmath> #define ll long long using namespace std; ]; int main(){ ll n,m; scanf("%I64d%I64d",&n,&m)…
题目大意; 有一个广场,广场的大小是n*m,  有a*a的石砖,石砖铺广场可以比广场大,石砖不能切割.问最少需要多少个石砖. ===================================================================== #include <iostream> #include <cmath> #include <algorithm> #include <string> #include <deque>…