제출 #880181

#제출 시각아이디문제언어결과실행 시간메모리
880181Regulus함박 스테이크 (JOI20_hamburg)C++17
0 / 100
2 ms604 KiB
#include <bits/stdc++.h> #define IO ios::sync_with_stdio(false);cin.tie(0); #define debug(x) cerr << #x << " = " << (x) << ' ' #define endl cerr << '\n' #define all(v) (v).begin(), (v).end() #define SZ(v) (ll)(v).size() #define lowbit(x) (x)&-(x) #define pb emplace_back #define F first #define S second using namespace std; using ll = long long; using pll = pair<ll, ll>; const int N = 1e5+5; int L[N], R[N], D[N], U[N]; pll p[4]; inline bool chk(int x, int y, int j) { return L[j] <= x && x <= R[j] && D[j] <= y && y <= U[j]; } int main(void) { IO ll n, i, j, m; bool ff; cin >> n >> m; for (i=1; i <= n; ++i) cin >> L[i] >> D[i] >> R[i] >> U[i]; for (i=1; i <= n; ++i) { p[0] = {L[i], D[i]}, p[1] = {L[i], U[i]}; p[2] = {R[i], D[i]}, p[3] = {R[i], U[i]}; ff = 0; for (int d=0; d < 4; ++d) { for (j=1; j <= n; ++j) { if (i == j) continue; if (!chk(p[d].F, p[d].S, j)) break; } if (j > n) { cout << p[d].F << ' ' << p[d].S << '\n'; exit(0); } } } assert(0); return 0; }

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

hamburg.cpp: In function 'int main()':
hamburg.cpp:27:10: warning: variable 'ff' set but not used [-Wunused-but-set-variable]
   27 |     bool ff;
      |          ^~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...