Submission #674672

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6746722022-12-25 18:29:01QwertyPiProgression (NOI20_progression)C++14
100 / 100
1192 ms103508 KiB
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MAXN = 3e5 + 11;
int d[MAXN];
struct SegTree{
struct tag{
tag() = default;
tag(int _type, int _s, int _c) : type(_type), s(_s), c(_c) {};
int type, s, c;
void operator+= (const tag& t) {
if(t.type == 1) s += t.s, c += t.c;
else type = 2, s = t.s, c = t.c;
}
tag shift(int n) {
return {type, s + n * c, c};
}
void pr() {
printf("tag(%d %d %d)\n", type, s, c);
}
} lazy[MAXN << 2];
struct node{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Progression.cpp: In member function 'void SegTree::tag::pr()':
Progression.cpp:26:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   26 |    printf("tag(%d %d %d)\n", type, s, c);
      |                ~^            ~~~~
      |                 |            |
      |                 int          long long int
      |                %lld
Progression.cpp:26:20: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   26 |    printf("tag(%d %d %d)\n", type, s, c);
      |                   ~^               ~
      |                    |               |
      |                    int             long long int
      |                   %lld
Progression.cpp:26:23: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   26 |    printf("tag(%d %d %d)\n", type, s, c);
      |                      ~^               ~
      |                       |               |
      |                       int             long long int
      |                      %lld
Progression.cpp: In member function 'void SegTree::node::pr()':
Progression.cpp:81:13: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |            ~^                                  ~~~
      |             |                                  |
      |             int                                long long int
      |            %lld
Progression.cpp:81:19: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                  ~^                                 ~~~~
      |                   |                                 |
      |                   int                               long long int
      |                  %lld
Progression.cpp:81:22: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                     ~^                                    ~~~~
      |                      |                                    |
      |                      int                                  long long int
      |                     %lld
Progression.cpp:81:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                        ~^                                       ~~~~
      |                         |                                       |
      |                         int                                     long long int
      |                        %lld
Progression.cpp:81:32: warning: format '%d' expects argument of type 'int', but argument 6 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                               ~^                                      ~~~~
      |                                |                                      |
      |                                int                                    long long int
      |                               %lld
Progression.cpp:81:35: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                                  ~^                                         ~~~~
      |                                   |                                         |
      |                                   int                                       long long int
      |                                  %lld
Progression.cpp:81:38: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                                     ~^                                            ~~~~
      |                                      |                                            |
      |                                      int                                          long long int
      |                                     %lld
Progression.cpp:81:42: warning: format '%d' expects argument of type 'int', but argument 9 has type 'long long int' [-Wformat=]
   81 |    printf("%d pf(%d %d %d) sf(%d %d %d) %d\n", ans, pf_s, pf_c, pf_x, sf_s, sf_c, sf_x, _size);
      |                                         ~^                                              ~~~~~
      |                                          |                                              |
      |                                          int                                            long long int
      |                                         %lld
#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...