답안 #724593

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
724593 2023-04-15T15:33:20 Z awu Arcade (NOI20_arcade) C++14
컴파일 오류
0 ms 0 KB
#include <bits/extc++.h>
using namespace std;

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2")

#define int long long
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define debug(x) do{auto __tmp__ = x; cerr << #x << " = " << __tmp__ << endl;}while(0)
// #define endl "\n"
#define unordered_map __gnu_pbds::gp_hash_table
using pii = pair<int, int>;

const int inf = 1ll << 60;
// const int inf = 1 << 30;
const int MOD = 1e9 + 7;

signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << 2 << endl;
  return 0;
  int n, m; cin >> n >> m;
  vector<int> t(n), a(n);
  for(int i = 0; i < m; i++) {
    cin >> t[hi];
  }
  for(int i = 0; i < m; i++) {
    cin >> a[i];
  }
  vector<pii> p(n);
  for(int i = 0; i < n; i++) {
    p[i] = {t[i] + a[i], t[i] - a[i]};
  }
  sort(all(p));
  set<int> ws;
  for(auto i : p) {
    auto w = ws.upper_bound(i.s);
    if(w != ws.begin()) {
      w--;
      ws.erase(w);
    }
    ws.insert(i.s);
  }
  cout << ws.size() << endl;
}

Compilation message

Arcade.cpp: In function 'int main()':
Arcade.cpp:28:14: error: 'hi' was not declared in this scope; did you mean 'i'?
   28 |     cin >> t[hi];
      |              ^~
      |              i