Submission #197899

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1978992020-01-24 05:04:21arnold518Rectangles (IOI19_rect)C++14
72 / 100
5049 ms613132 KiB
#pragma GCC optimize ("O3")
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#include "rect.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2500;
int N, M, A[MAXN+10][MAXN+10];
int L[MAXN+10][MAXN+10], R[MAXN+10][MAXN+10], U[MAXN+10][MAXN+10], D[MAXN+10][MAXN+10];
struct Line
{
int y, x;
Line(int y, int x1, int x2) : y(y), x(x1*3000+x2) {}
bool operator < (const Line &p) const
{
if(y!=p.y) return y<p.y;
return x<p.x;
}
bool operator == (const Line &p) { return y==p.y && x==p.x; }
bool operator != (const Line &p) { return !(y==p.y && x==p.x); }
};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

rect.cpp: In function 'll count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:142:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=0, j=0; i<HT.size(); i++)
                 ~^~~~~~~~~~
rect.cpp:144:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(; j<H.size() && H[j]<HT[i].first; j++);
          ~^~~~~~~~~
rect.cpp:145:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if(j<H.size() && HT[i].first==H[j]) posH[HT[i].second/3000][HT[i].second%3000]=j;
       ~^~~~~~~~~
rect.cpp:150:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(i=0, j=0; i<VT.size(); i++)
                 ~^~~~~~~~~~
rect.cpp:152:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(; j<V.size() && V[j]<VT[i].first; j++);
          ~^~~~~~~~~
rect.cpp:153:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if(j<V.size() && VT[i].first==V[j]) posV[VT[i].second/3000][VT[i].second%3000]=j;
       ~^~~~~~~~~
#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...