Submission #127839

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1278392019-07-10 07:01:51junhopark조화행렬 (KOI18_matrix)C++14
38 / 100
4045 ms505388 KiB
#include <bits/stdc++.h>
#define eb emplace_back
#define all(V) (V).begin(),(V).end()
#define fi first
#define se second
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
const int SZ = 2e5+5;
struct data{int x, y, z;}p[SZ];
struct node
{
int val, l, r;
node() {}
node(int val, int l, int r):val(val),l(l),r(r) {}
};
int n, m, res, ans;
vector<node> tree, emp;
vector<vector<node>> sub;
vector<int> u, v, w, lis;
bool comp(data l, data r) {return l.x<r.x;}
void compress()
{
for (int i=1; i<=n; i++) {
u.eb(p[i].x);
v.eb(p[i].y);
w.eb(p[i].z);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

matrix.cpp: In function 'int get_sub_max(int, int, int, int, int, int)':
matrix.cpp:48:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mi=si+ei>>1;
         ~~^~~
matrix.cpp: In function 'int get_max(int, int, int, int, int, int, int)':
matrix.cpp:66:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mi=si+ei>>1;
         ~~^~~
matrix.cpp: In function 'void update_sub(int, int, int, int, int, int)':
matrix.cpp:86:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mi=si+ei>>1;
         ~~^~~
matrix.cpp: In function 'void update(int, int, int, int, int, int)':
matrix.cpp:111:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mi=si+ei>>1;
         ~~^~~
matrix.cpp: In function 'int main()':
matrix.cpp:141:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (pl==lis.size()) lis.eb(p[i].y);
        ~~^~~~~~~~~~~~
matrix.cpp:144:28: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
   printf("%d\n", lis.size());
                  ~~~~~~~~~~^
matrix.cpp:132:9: warning: unused variable 'j' [-Wunused-variable]
  int i, j;
         ^
matrix.cpp:133:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &m, &n);
  ~~~~~^~~~~~~~~~~~~~~~~
matrix.cpp:135:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (i=1; i<=n; i++) scanf("%d", &p[i].x);
                        ~~~~~^~~~~~~~~~~~~~~
matrix.cpp:136:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (i=1; i<=n; i++) scanf("%d", &p[i].y);
                        ~~~~~^~~~~~~~~~~~~~~
matrix.cpp:147:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (i=1; i<=n; i++) scanf("%d", &p[i].x);
                        ~~~~~^~~~~~~~~~~~~~~
matrix.cpp:148:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (i=1; i<=n; i++) scanf("%d", &p[i].y);
                        ~~~~~^~~~~~~~~~~~~~~
matrix.cpp:149:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (i=1; i<=n; i++) scanf("%d", &p[i].z);
                        ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...