Submission #1169229

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11692292025-03-18 12:09:51sleepntsheepCats or Dogs (JOI18_catdog)C++17
0 / 100
2 ms2880 KiB
#include "catdog.h"
#include <cstdio>
#include <vector>
#include <algorithm>
#define N 111111
int col[N];
struct Mat{
long long a[4];
friend Mat operator*(const Mat &a, const Mat &b) {
Mat c;
c.a[0] = std::min(a.a[0] + b.a[0], a.a[1] + b.a[2]);
c.a[1] = std::min(a.a[0] + b.a[1], a.a[1] + b.a[3]);
c.a[2] = std::min(a.a[2] + b.a[0], a.a[3] + b.a[2]);
c.a[3] = std::min(a.a[2] + b.a[1], a.a[3] + b.a[3]);
return c;
}
void pt() {
return ;
printf(" [ %d %d %d %d]\n",a[0],a[1],a[2],a[3]);
}
};
struct LCT {
struct{
int c[2],pa;
Mat val,prod;
} t[N];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

catdog.cpp: In member function 'void Mat::pt()':
catdog.cpp:22:30: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
   22 |                 printf("  [ %d %d %d %d]\n",a[0],a[1],a[2],a[3]);
      |                             ~^              ~~~~
      |                              |                 |
      |                              int               long long int
      |                             %lld
catdog.cpp:22:33: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' [-Wformat=]
   22 |                 printf("  [ %d %d %d %d]\n",a[0],a[1],a[2],a[3]);
      |                                ~^                ~~~~
      |                                 |                   |
      |                                 int                 long long int
      |                                %lld
catdog.cpp:22:36: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long long int' [-Wformat=]
   22 |                 printf("  [ %d %d %d %d]\n",a[0],a[1],a[2],a[3]);
      |                                   ~^                  ~~~~
      |                                    |                     |
      |                                    int                   long long int
      |                                   %lld
catdog.cpp:22:39: warning: format '%d' expects argument of type 'int', but argument 5 has type 'long long int' [-Wformat=]
   22 |                 printf("  [ %d %d %d %d]\n",a[0],a[1],a[2],a[3]);
      |                                      ~^                    ~~~~
      |                                       |                       |
      |                                       int                     long long int
      |                                      %lld
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...