Super Resolution

Accepted : 121   Submit : 187
Time Limit : 1000 MS   Memory Limit : 65536 KB 

Super Resolution

Bobo has an n×m picture consists of black and white pixels. He loves the picture so he would like to scale it a×b times. That is, to replace each pixel with a×b  block of pixels with the same color (see the example for clarity).

Input

The input contains zero or more test cases and is terminated by end-of-file. For each test case,

The first line contains four integers n,m,a,b . The i-th of the following n lines contains a binary string of length m which denotes the i-th row of the original picture. Character "0" stands for a white pixel while the character "1" stands for black one.

  • 1≤n,m,a,b≤10
  • The number of tests cases does not exceed 10.

Output

For each case, output n×a rows and m×b columns which denote the result.

Sample Input

  1. 2 2 1 1
  2. 10
  3. 11
  4. 2 2 2 2
  5. 10
  6. 11
  7. 2 2 2 3
  8. 10
  9. 11

Sample Output

  1. 10
  2. 11
  3. 1100
  4. 1100
  5. 1111
  6. 1111
  7. 111000
  8. 111000
  9. 111111
  10. 111111

/简单模拟题,将一个 n*m 矩阵放大 a,b 倍

  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <string.h>
  4. using namespace std;
  5. #define MX 205
  6.  
  7. int num[MX][MX];
  8. int ans[MX][MX];
  9.  
  10. int main()
  11. {
  12. int n,m,a,b;
  13. while (scanf("%d%d%d%d",&n,&m,&a,&b)!=EOF)
  14. {
  15. for (int i=;i<=n;i++)
  16. {
  17. char str[];
  18. scanf("%s",str);
  19. for (int j=;j<=m;j++)
  20. num[i][j]=str[j-]-'';
  21. }
  22. for (int i=;i<=n;i++)
  23. for (int j=;j<=m;j++)
  24. for (int x=;x<=a;x++)
  25. for (int y=;y<=b;y++)
  26. ans[(i-)*a+x][(j-)*b+y]=num[i][j];
  27. for (int i=;i<=n*a;i++)
  28. {
  29. for (int j=;j<=m*b;j++)
  30. printf("%d",ans[i][j]);
  31. putchar();
  32. }
  33. }
  34. return ;
  35. }

Super Resolution的更多相关文章

  1. Computer Vision Applied to Super Resolution

    Capel, David, and Andrew Zisserman. "Computer vision applied to super resolution." Signal ...

  2. ASRWGAN: Wasserstein Generative Adversarial Network for Audio Super Resolution

    ASEGAN:WGAN音频超分辨率 这篇文章并不具有权威性,因为没有发表,说不定是外国的某个大学的毕业设计,或者课程结束后的作业.或者实验报告. CS230: Deep Learning, Sprin ...

  3. Speech Super Resolution Generative Adversarial Network

    博客作者:凌逆战 博客地址:https://www.cnblogs.com/LXP-Never/p/10874993.html 论文作者:Sefik Emre Eskimez , Kazuhito K ...

  4. Google Pixel 超分辨率--Super Resolution Zoom

    Google Pixel 超分辨率--Super Resolution Zoom Google 的Super Res Zoom技术,主要用于在zoom时增强画面细节以及提升在夜景下的效果. 文章的主要 ...

  5. RAISR: rapid and accurate image super resolution

      准确地说,RAISR并不是用来压缩图像的,而是用来upsample图像的. 众所周知,图片缩小到半分辨率后,在拉回原大小,会出现强烈的锯齿.从80年代开始就有很多super sampling的方法 ...

  6. 使用深度学习的超分辨率介绍 An Introduction to Super Resolution using Deep Learning

    使用深度学习的超分辨率介绍 关于使用深度学习进行超分辨率的各种组件,损失函数和度量的详细讨论. 介绍 超分辨率是从给定的低分辨率(LR)图像恢复高分辨率(HR)图像的过程.由于较小的空间分辨率(即尺寸 ...

  7. 【论文学习】A Fuzzy-Rule-Based Approach for Single Frame Super Resolution

    加尔各答印度统计研究所,作者: Pulak Purkait (pulak_r@isical.ac.in) 2013 年 代码:CodeForge.cn http://www.codeforge.cn/ ...

  8. Atitit 图像处理和计算机视觉的分类 三部分 图像处理 图像分析 计算机视觉

    Atitit 图像处理和计算机视觉的分类 三部分 图像处理 图像分析 计算机视觉 1.1. 按照当前流行的分类方法,可以分为以下三部分:三部分 图像处理 图像分析 计算机视觉1 1.2. 图像处理需要 ...

  9. (转) The major advancements in Deep Learning in 2016

    The major advancements in Deep Learning in 2016 Pablo Tue, Dec 6, 2016 in MACHINE LEARNING DEEP LEAR ...

随机推荐

  1. Appstore 提交Ipad 和Iphone版

  2. 修改注册表实现Windows自动登陆

    昨天再修一条case时无意间发现这个case竟然要重启机器,并且要用指定的账户自动登陆Windows.然后就发现了,简单的修改下注册表就可以完成自动登陆了. 首先,在“run”里输入“regedit” ...

  3. redux-actions

    其作用都是用来简化action.reducer. 1.安装 npm install --save redux-actions // 或 yarn add redux-actions 2.使用 crea ...

  4. vue scoped 解决样式不生效问题

    对于添加样式不能影响子组件样式的情况使用:>>> <style scoped> .sti-inline{ display: inline; } .sti-searchfo ...

  5. 一站式学习Wireshark(转载)

    一站式学习Wireshark(一):Wireshark基本用法 2014/06/10 · IT技术 · 4 评论 · WireShark 分享到: 115 与<YII框架>不得不说的故事— ...

  6. android:id="@android:id/tabhost" 、android:id="@+id/llRoot" 、android:id="@id/llRoot" 之间的区别

    由于快要放暑假了,所以最近这俩周把Android方面的知识复习一下,准备找个实习工作. 顺便把自己的总结更大家分享一下,共同进步,谢谢.... 一. android:id="@android ...

  7. Centos下安装JDK、Maven和Git

    原文地址:https://github.com/eacdy/spring-cloud-book/blob/master/3%20%E4%BD%BF%E7%94%A8Docker%E6%9E%84%E5 ...

  8. 通过xsd schema结构来验证xml是否合法

    import sys import StringIO import lxml from lxml import etree from StringIO import StringIO # Constr ...

  9. TCP/IP ---互联网的地址

    互联网上的每个接口必须有一个唯一的I n t e r n e t地址(也称作I P地址). I P地址长32 bit.I P地址具有一定的结构,五类不同 的互联网地址格式如图1 - 5所示. 这些3 ...

  10. vb.net版机房收费——助你学会七层架构(二)反射+抽象工厂

    上一篇咱们做好了准备工作.数据库设计和Entity层,如今介绍 4.反射+抽象工厂 反射:用来消除Switch和if的,这里我尽量简单地介绍,以便大家理解.反射其有用起来非常easy.你就觉得他就是决 ...