제출 #683266

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6832662023-01-18 05:18:05ajstillpracticinMecho (IOI09_mecho)C++17
100 / 100
534 ms7692 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
int dx[4]{1,0,-1,0};
int dy[4]{0,1,0,-1};
char direc[4]{'R','U','L','D'};
void setIO(string filename=""){
ios_base::sync_with_stdio(0); cin.tie(0);
if(filename.size()){
freopen((filename + ".in").c_str(), "r", stdin);
freopen((filename + ".out").c_str(), "w", stdout);
}
}
const int INF=(int) 1e9;
const int M= 1e9+7;
const ll MAXD = 1e18;
//
const int MAXN = 1e4;
int main() {
setIO();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

mecho.cpp: In function 'void setIO(std::string)':
mecho.cpp:15:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |   freopen((filename + ".in").c_str(), "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mecho.cpp:16:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |   freopen((filename + ".out").c_str(), "w", stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mecho.cpp: In function 'int main()':
mecho.cpp:94:29: warning: 'mechoy' may be used uninitialized in this function [-Wmaybe-uninitialized]
   94 |   if(bee_time[mechox][mechoy]<=time)
      |      ~~~~~~~~~~~~~~~~~~~~~~~^
mecho.cpp:94:29: warning: 'mechox' may be used uninitialized in this function [-Wmaybe-uninitialized]
mecho.cpp:118:8: warning: 'homex' may be used uninitialized in this function [-Wmaybe-uninitialized]
  118 |    int nx=homex+dx[i],ny=homey+dy[i];
      |        ^~
mecho.cpp:118:23: warning: 'homey' may be used uninitialized in this function [-Wmaybe-uninitialized]
  118 |    int nx=homex+dx[i],ny=homey+dy[i];
      |                       ^~
#Verdict Execution timeMemoryGrader output
Fetching results...