Submission #18932

#TimeUsernameProblemLanguageResultExecution timeMemory
18932dltldls95올림픽 피자 (tutorial5)C++98
Compilation error
0 ms0 KiB
#include <iostream> #include "grader.h" #define C(a) memset((a),0,sizeof(a)) using namespace std; int order[100000][8]; int ordered[100000]; int firstorder = -1; int lastorder = -1; int currentFood[8]; void Init() { C(order); C(ordered); } void Order(int n, int* a) { if(firstorder == -1) firstorder = 0; lastorder++; for(int i = 0; i < n; i++) { order[lastorder][a[i]]++; ordered[i] = 1; } CheckAll(); } void CheckAll() { for(int i = firstorder; i < lastorder; i++) { bool bakable = true; for(int j = 0; j < 8; j++) { if(order[i][j] == 1 && currentFood[8] == 0) bakable = false; } if(bakable) { Bake(i); for(int j = 0; j < 8; j++) { if(order[i][j]) currentFood[j]--; } if(i == firstorder) { for(int j = firstorder+1; j < 100000; j++) { if(ordered[j]) { firstorder = j; } } } } } } void Delivery(int l) { currentFood[i]++; CheckAll(); }

Compilation message (stderr)

grader.cpp: In function ‘int main(int, char**)’:
grader.cpp:65:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
tutorial5.cpp:2:20: fatal error: grader.h: 그런 파일이나 디렉터리가 없습니다
 #include "grader.h"
                    ^
compilation terminated.