构造

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; int a[][][];
int main()
{
a[][][]=;
a[][][]=;
a[][][]=;
a[][][]=-; int len=;
for(int i=; i<=; i++)
{
len=len*;
for(int r=; r<=len/; r++)
for(int c=; c<=len/; c++)
a[i][r][c]=a[i-][r][c]; for(int r=; r<=len/; r++)
for(int c=len/+; c<=len; c++)
a[i][r][c]=a[i-][r][c-len/]; for(int r=len/+; r<=len; r++)
for(int c=; c<=len/; c++)
a[i][r][c]=a[i-][r-len/][c]; for(int r=len/+; r<=len; r++)
for(int c=len/+; c<=len; c++)
a[i][r][c]=-a[i-][r-len/][c-len/];
} int n;
while(~scanf("%d",&n))
{
int len=pow(,n);
for(int i=; i<=len; i++)
{
for(int j=; j<=len; j++)
{
if(a[n][i][j]==) printf("+");
else printf("*");
}
printf("\n");
}
}
return ;
}

CodeForces 610C Harmony Analysis的更多相关文章

  1. Codeforces Round #337 (Div. 2) 610C Harmony Analysis(脑洞)

    C. Harmony Analysis time limit per test 3 seconds memory limit per test 256 megabytes input standard ...

  2. 【53.57%】【codeforces 610C】Harmony Analysis

    time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  3. Codeforces Round #337 (Div. 2) C. Harmony Analysis 构造

    C. Harmony Analysis 题目连接: http://www.codeforces.com/contest/610/problem/C Description The semester i ...

  4. Codeforces Round #337 (Div. 2) C. Harmony Analysis 数学

    C. Harmony Analysis   The semester is already ending, so Danil made an effort and decided to visit a ...

  5. Codeforces 610C:Harmony Analysis(构造)

    [题目链接] http://codeforces.com/problemset/problem/610/C [题目大意] 构造出2^n个由1和-1组成的串使得其两两点积为0 [题解] 我们可以构造这样 ...

  6. Codeforces Round #337 (Div. 2) C. Harmony Analysis

    题目链接:http://codeforces.com/contest/610/problem/C 解题思路: 将后一个矩阵拆分为四个前一状态矩阵,其中三个与前一状态相同,剩下一个直接取反就行.还有很多 ...

  7. Codeforces Round #337 (Div. 2)

    水 A - Pasha and Stick #include <bits/stdc++.h> using namespace std; typedef long long ll; cons ...

  8. Codeforces Round #596 (Div. 2, based on Technocup 2020 Elimination Round 2)

    A - Forgetting Things 题意:给 \(a,b\) 两个数字的开头数字(1~9),求使得等式 \(a=b-1\) 成立的一组 \(a,b\) ,无解输出-1. 题解:很显然只有 \( ...

  9. cf 337 div2 c

    C. Harmony Analysis time limit per test 3 seconds memory limit per test 256 megabytes input standard ...

随机推荐

  1. App Store 升级问题

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launc ...

  2. Ubuntu 14.04 Nvidia显卡驱动手动安装及设置

      更换主板修复grub 引导后,无法从Nvidia进入系统(光标闪烁), 可能是显卡驱动出了问题. 1. 进入BIOS设置, 从集成显卡进入系统 将显示器连接到集显的VGI口, 并在BIOS中设置用 ...

  3. 关于video.js

    网址:http://www.cnblogs.com/webenh/p/5815741.html

  4. psy 2

    PSY,心理线,顾名思义,庄家要洗筹必须打破市场尤其是散户的心理防线,才能让大家乖乖的交出筹码.月线的心理线尤其重要,PSY有几个数值,16,25,33,41,50,66,75.PSY的运用也是抓大黑 ...

  5. make 命令执行时,报错“missing separator stop”

    在Makefile文件中,命令必须以[tab]键开始.

  6. UIImageView 的contentMode属性 浅析

    UIImageView 的contentMode这个属性是用来设置图片的显示方式,如居中.居右,是否缩放等,有以下几个常量可供设定:UIViewContentModeScaleToFillUIView ...

  7. Android Studio相关的坑

    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi ...

  8. MFC实现为窗体添加的背景图片

    将一个bmp图片添加到资源中 在资源视图中更改位图资源的ID为IDB_BITMAP_BACKGROUND. 第一种方法: 在Dialog中添加一个Picture Control控件,将Picture ...

  9. 快速部署Python应用:Nginx+uWSGI配置详解

    在PHP里,最方便的就是deployment了,只要把php文件丢到支持PHP的路径里面,然后访问那个路径就能使用了:无论给主机添加多少PHP应用,只要把目录改好就没你的事了,完全不用关心php-cg ...

  10. Android Stduio的使用(七)--Structure窗口

    1.本篇博文介绍Android查看.Java文件中所有属性和类方法的工具:Structure窗口 2.我们知道Eclipse的OutLine窗口可以查看.java文件所有的属性和方法. 2.Andro ...