제출 #962766

#제출 시각아이디문제언어결과실행 시간메모리
962766n3rm1n로봇 (IOI13_robots)C++17
0 / 100
1 ms4444 KiB
#include<bits/stdc++.h> #include"robots.h" using namespace std; int putaway(int A,int B,int T, int X[],int Y[],int W[],int S[]) { if(A + B == 2 && T == 2) { int fit00 = 0, fit01 = 0, fit10 = 0, fit11 = 0; if(A == 2) { if(W[0] <= X[0])fit00 ++; if(W[1] <= X[0])fit01 ++; if(W[0] <= X[1])fit10 ++; if(W[1] <= X[1])fit11 ++; } else if(B == 2) { if(S[0] <= Y[0])fit00 ++; if(S[1] <= Y[0])fit01 ++; if(S[0] <= Y[1])fit10 ++; if(S[1] <= Y[1])fit11 ++; } else { if(W[0] <= X[0])fit00 ++; if(W[1] <= X[0])fit01 ++; if(S[0] <= Y[0])fit10 ++; if(S[1] <= Y[0])fit11 ++; } if(!fit01 && !fit00)return -1; if(!fit11 && !fit10)return -1; if(fit01 && fit10)return 1; if(fit00 && fit11)return 1; return 2; } }

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

robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:38:1: warning: control reaches end of non-void function [-Wreturn-type]
   38 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...