제출 #288377

#제출 시각아이디문제언어결과실행 시간메모리
288377emil_physmath벽 (IOI14_wall)C++17
0 / 100
1 ms384 KiB
#include "wall.h" #include <iostream> #include <random> #include <chrono> using namespace std; using llong = long long; #define BUGO(x) cerr << #x << " = " << (x) << '\n'; #define BUGOARR(a) {cerr << #a << ": "; for (auto i: a) cerr << i << ' '; cerr << '\n';} #ifndef MANSON #define BUGO(x) #define BUGOARR(x) #endif ostream& operator<<(ostream& out, const pair<auto, auto>& p) { out << "{" << p.first << ", " << p.second << "}"; } mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); inline int rnd(int l, int r) { return uniform_int_distribution<int>(l, r)(rng); } void buildWall(int n, int k, int op[], int left[], int right[], int height[], int ans[]) { for (int i = 0; i < n; ++i) ans[i] = 0; if (n <= 10000 && k <= 5000) { for (int x = 0; x < k; ++x) if (op[x] == 1) // Add { for (int i = left[x]; i <= right[x]; ++i) ans[i] = max(ans[i], height[x]); } else // Remove { for (int i = left[x]; i <= right[x]; ++i) ans[i] = min(ans[i], height[x]); } exit(0); } }

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

wall.cpp:10: warning: "BUGO" redefined
   10 | #define BUGO(x)
      | 
wall.cpp:7: note: this is the location of the previous definition
    7 | #define BUGO(x) cerr << #x << " = " << (x) << '\n';
      | 
wall.cpp:11: warning: "BUGOARR" redefined
   11 | #define BUGOARR(x)
      | 
wall.cpp:8: note: this is the location of the previous definition
    8 | #define BUGOARR(a) {cerr << #a << ": "; for (auto i: a) cerr << i << ' '; cerr << '\n';}
      | 
wall.cpp:13:46: warning: use of 'auto' in parameter declaration only available with '-fconcepts'
   13 | ostream& operator<<(ostream& out, const pair<auto, auto>& p) {
      |                                              ^~~~
wall.cpp:13:52: warning: use of 'auto' in parameter declaration only available with '-fconcepts'
   13 | ostream& operator<<(ostream& out, const pair<auto, auto>& p) {
      |                                                    ^~~~
wall.cpp: In function 'std::ostream& operator<<(std::ostream&, const std::pair<_T1, _T2>&)':
wall.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...