Submission #201912

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2019122020-02-12 19:28:45maruiiNew Home (APIO18_new_home)C++14
80 / 100
5045 ms100356 KiB
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
#define ff first
#define ss second
const int SIZE = 1 << 20;
struct ST {
int A[2 * SIZE];
void init() { fill(A, A + 2 * SIZE, -1e9); }
void update(int x, int v) {
x += SIZE; A[x] = v;
for (x >>= 1; x; x >>= 1) A[x] = max(A[x << 1], A[x << 1 | 1]);
}
int query(int s, int e) {
int ret = -1e9;
for (s += SIZE, e += SIZE; s <= e; s >>= 1, e >>= 1) {
if ( s & 1) ret = max(ret, A[s++]);
if (~e & 1) ret = max(ret, A[e--]);
}
return ret;
}
} seg;
int N, K, Q;
vector<pair<int, pii> > qin, qout, qry;
vector<pii> xx;
int ans[300005];
multiset<int> MS[300005];
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

new_home.cpp: In function 'void solve()':
new_home.cpp:36:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (j < qin.size() && qin[j].ff <= i.ff) {
          ~~^~~~~~~~~~~~
new_home.cpp:47:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (k < qout.size() && qout[k].ff < i.ff) {
          ~~^~~~~~~~~~~~~
new_home.cpp:59:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while (j < qin.size()) {
         ~~^~~~~~~~~~~~
new_home.cpp:64:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while (k < qout.size()) {
         ~~^~~~~~~~~~~~~
new_home.cpp:73:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (j < qin.size() && qin[j].ff <= i.ff) {
          ~~^~~~~~~~~~~~
new_home.cpp:90:12: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   while (k < qout.size() && qout[k].ff < i.ff) {
          ~~^~~~~~~~~~~~~
new_home.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while (j < qin.size()) {
         ~~^~~~~~~~~~~~
new_home.cpp:114:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while (k < qout.size()) {
         ~~^~~~~~~~~~~~~
#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...