Submission #748257

# Submission time Handle Problem Language Result Execution time Memory
748257 2023-05-26T01:58:45 Z coding_snorlax Art Class (IOI13_artclass) C++14
Compilation error
0 ms 0 KB
#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]){
    srand(time(0));
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            int tmp1,tmp2,tmp3;
            cin>>tmp1>>tmp2>>tmp3;
            Max1=max(Max1,tmp1);
            Min1=min(Min1,tmp1);
        }
    }
    if(Min1>15) return 4;
    else return 1;
}

Compilation message

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:11:13: error: 'Max1' was not declared in this scope
   11 |             Max1=max(Max1,tmp1);
      |             ^~~~
artclass.cpp:12:13: error: 'Min1' was not declared in this scope
   12 |             Min1=min(Min1,tmp1);
      |             ^~~~
artclass.cpp:15:8: error: 'Min1' was not declared in this scope
   15 |     if(Min1>15) return 4;
      |        ^~~~
artclass.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^