Submission #117710

#TimeUsernameProblemLanguageResultExecution timeMemory
117710GioChkhaidzeArt Class (IOI13_artclass)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "artclass.h"

using namespace std;

int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
	
	return 3;
  
  	int S=H*W;
	
	for (int i=0; i<H; i++)
		for (int j=0; j<W; j++)
		{
			int Mx=max(max(R[i][j],G[i][j]),B[i][j]);
			
            if (Mx!=G[i][j]) continue;
          	if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++;
		}
  
  	if (Green>S/3) return 3;
	
	
    return 2;
}

Compilation message (stderr)

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:18:50: error: 'Green' was not declared in this scope
            if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++;
                                                  ^~~~~
artclass.cpp:18:50: note: suggested alternative: 'free'
            if (G[i][j]-max(R[i][j],B[i][j])>=30) Green++;
                                                  ^~~~~
                                                  free
artclass.cpp:21:8: error: 'Green' was not declared in this scope
    if (Green>S/3) return 3;
        ^~~~~
artclass.cpp:21:8: note: suggested alternative: 'free'
    if (Green>S/3) return 3;
        ^~~~~
        free