ZOJ 2857: Image Transformation

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ZOJ 2857: Image Transformation相关的知识,希望对你有一定的参考价值。

 

ZOJ - 2857

///@author Sycamore, ZJNU
///@accepted_on 2017-01-19
#include<iostream>
using namespace std;
short p[3][100][100];
int main()
{
    short N, M;
    int c = 0;
    while (cin >> N >> M&&N&&M)
    {
        for (int k = 0; k < 3; k++)
            for (int i = 0; i<N; i++)
                for (int j = 0; j < M; j++)
                {
                    cin >> p[k][i][j];
                }
        cout << "Case " << ++c << : << endl;
        for (int i = 0; i<N; i++)
            for (int j = 0; j < M; j++)
            {
                cout << (p[0][i][j] + p[1][i][j] + p[2][i][j]) / 3;
                if (j == M - 1) cout << endl;
                else cout << ,;
            }
    }
    return 0;
}

 

以上是关于ZOJ 2857: Image Transformation的主要内容,如果未能解决你的问题,请参考以下文章

UVA10998 POJ2857 Flipping ColorsDFS

pygame.transform.chop 不工作

P2857 [USACO06FEB]稳定奶牛分配Steady Cow Assignment

Paper | Recovering Realistic Texture in Image Super-resolution by Deep Spatial Feature Transform

Unity中为UGUI中的Image置空

Python制作小游戏(十九)