Submission #283657

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2836572020-08-26 04:46:36arnold518Iqea (innopolis2018_final_C)C++14
51 / 100
2097 ms117812 KiB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
const int INF = 5e7;
int N;
pii A[MAXN+10];
vector<int> X[MAXN+10], Y[MAXN+10];
struct Line
{
int l, r, p;
Line(int l, int r, int p) : l(l), r(r), p(p) {}
bool operator < (const Line &q) const { return r<q.r; }
};
int Q;
vector<Line> LX[MAXN+10], LY[MAXN+10];
vector<int> adjX[MAXN+10], adjY[MAXN+10];
pii get(int y, int x)
{
int nx=lower_bound(LX[y].begin(), LX[y].end(), Line(0, x, 0))->p;
int ny=lower_bound(LY[x].begin(), LY[x].end(), Line(0, y, 0))->p;
return {nx, ny};
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

C.cpp: In function 'int main()':
C.cpp:147:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  147 |   for(int j=0; j+1<X[i].size(); j++)
      |                ~~~^~~~~~~~~~~~
C.cpp:166:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  166 |    for(; p<LX[i-1].size() && LX[i-1][p].r<it.l; p++);
      |          ~^~~~~~~~~~~~~~~
C.cpp:167:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  167 |    for(; p<LX[i-1].size() && LX[i-1][p].l<=it.r; p++)
      |          ~^~~~~~~~~~~~~~~
C.cpp:186:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  186 |   for(int j=0; j+1<Y[i].size(); j++)
      |                ~~~^~~~~~~~~~~~
C.cpp:205:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  205 |    for(; p<LY[i-1].size() && LY[i-1][p].r<it.l; p++);
      |          ~^~~~~~~~~~~~~~~
C.cpp:206:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  206 |    for(; p<LY[i-1].size() && LY[i-1][p].l<=it.r; p++)
      |          ~^~~~~~~~~~~~~~~
C.cpp:131:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  131 |  scanf("%d", &N);
      |  ~~~~~^~~~~~~~~~
C.cpp:135:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  135 |   scanf("%d%d", &y, &x);
      |   ~~~~~^~~~~~~~~~~~~~~~
C.cpp:232:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  232 |  scanf("%d", &Q);
      |  ~~~~~^~~~~~~~~~
C.cpp:237:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  237 |   scanf("%d%d%d", &tt, &y, &x);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#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...