제출 #977057

#제출 시각아이디문제언어결과실행 시간메모리
977057Tsagana서열 (APIO23_sequence)C++17
컴파일 에러
0 ms0 KiB
#include "cyberland.h" //OP #include <bits/stdc++.h> #define IOS ios_base::sync_with_stdio(false);cin.tie();cout.tie(); #define all(x) x.begin(), x.end() #define vi vector<int> #define pi pair<int, int > #define pq priority_queue #define lb lower_bound #define ub upper_bound #define pb push_back #define eb emplace_back #define mset multiset #define F first #define S second using namespace std; struct arr { vector<int> v; void res() {v.clear();} void insert(int x) { v.pb(x); sort(all(v)); } pair<int, int> med() { int n = v.size(); if (n % 2 == 1) { return {v[n/2], -1}; } else { return {v[n/2-1], v[n/2]}; } } int calc() { pair<int, int> p = med(); int c1 = 0, c2 = 0; for (auto i: v) { if (i == p.F) c1++; if (i == p.S) c2++; } return max(c1, c2); } }; int sequence(int N, std::vector<int> A) { int ans = 0; for (int i = 0; i < N; i++) { arr a; a.res(); for (int j = i; j < N; j++) { a.insert(A[j]); ans = max(ans, a.calc()); // for (auto k: a.v) cout << k << ' '; // cout << " - " << ans << '\n'; } } return ans; } //ED

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

sequence.cpp:1:10: fatal error: cyberland.h: No such file or directory
    1 | #include "cyberland.h"
      |          ^~~~~~~~~~~~~
compilation terminated.