제출 #1136445

#제출 시각아이디문제언어결과실행 시간메모리
1136445mychecksedad미술 수업 (IOI13_artclass)C++20
컴파일 에러
0 ms0 KiB
#include "artclass.h" #include<bits/stdc++.h> using namespace std; #define ll long long int #define MOD1 (1000000000+7) #define MOD (998244353) #define pb push_back #define all(x) x.begin(), x.end() #define en cout << '\n' #define ff first #define ss second #define pii pair<int,int> #define vi vector<int> const int N = 1e6+100, M = 1e5+10, K = 52, MX = 30; int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) { ll red = 0, blue = 0, green = 0; for(int i = 0; i < 500; ++i) for(int j = 0; j < 500; ++j) red += R[i][j]; for(int i = 0; i < 500; ++i) for(int j = 0; j < 500; ++j) green += G[i][j]; for(int i = 0; i < 500; ++i) for(int j = 0; j < 500; ++j) blue += B[i][j]; ll s = red + blue + green; if(green > s - greed) return 2; return 4; }

컴파일 시 표준 에러 (stderr) 메시지

artclass.cpp: In function 'int style(int, int, int (*)[500], int (*)[500], int (*)[500])':
artclass.cpp:22:18: error: 'greed' was not declared in this scope; did you mean 'green'?
   22 |   if(green > s - greed) return 2;
      |                  ^~~~~
      |                  green