Submission #745300

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7453002023-05-19 19:10:18arthur_nascimentoDungeons Game (IOI21_dungeons)C++17
0 / 100
36 ms28708 KiB
#include "dungeons.h"
#include <vector>
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
#define lg 25
#define maxn 50400
#define inf (1e9)
#define debug
#define ll long long
int jmp[lg][19][maxn];
ll inc[lg][19][maxn];
int least[lg][19][maxn];
vector<int> strength, inc_lose, go_win, go_lose;
int n;
void init(int N, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) {
//for(int i=0;i<N;i++) if(s[i] != 642842 ) printf("! %d -> %d %d, %d %d\n",i,w[i],l[i],s[i],p[i]);
n = N;
strength = s;
inc_lose = p;
go_win = w;
go_lose = l;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dungeons.cpp: In function 'void init(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
dungeons.cpp:36:8: warning: statement has no effect [-Wunused-value]
   36 |  debug("ini!\n");
      |       ~^~~~~~~~~
dungeons.cpp:52:11: warning: left operand of comma operator has no effect [-Wunused-value]
   52 |     debug("%d -> %d\n",i,jmp[k][0][i]);
      |           ^~~~~~~~~~~~
dungeons.cpp:52:37: warning: right operand of comma operator has no effect [-Wunused-value]
   52 |     debug("%d -> %d\n",i,jmp[k][0][i]);
      |                                     ^
dungeons.cpp: In function 'long long int simulate(int, int)':
dungeons.cpp:89:9: warning: left operand of comma operator has no effect [-Wunused-value]
   89 |   debug("x %d z %d k %d\n",x,z,k);
      |         ^~~~~~~~~~~~~~~~~~
dungeons.cpp:89:30: warning: right operand of comma operator has no effect [-Wunused-value]
   89 |   debug("x %d z %d k %d\n",x,z,k);
      |                              ^
dungeons.cpp:89:32: warning: right operand of comma operator has no effect [-Wunused-value]
   89 |   debug("x %d z %d k %d\n",x,z,k);
      |                                ^
dungeons.cpp:94:9: warning: statement has no effect [-Wunused-value]
   94 |   debug("\n");
      |        ~^~~~~
dungeons.cpp:100:11: warning: left operand of comma operator has no effect [-Wunused-value]
  100 |     debug("%d jmp %d to %d add %d\n",x,1<<j,jmp[k][j][x],inc[k][j][x]);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
dungeons.cpp:100:43: warning: right operand of comma operator has no effect [-Wunused-value]
  100 |     debug("%d jmp %d to %d add %d\n",x,1<<j,jmp[k][j][x],inc[k][j][x]);
      |                                           ^
dungeons.cpp:100:41: warning: right operand of comma operator has no effect [-Wunused-value]
  100 |     debug("%d jmp %d to %d add %d\n",x,1<<j,jmp[k][j][x],inc[k][j][x]);
      |                                        ~^~~
dungeons.cpp:100:56: warning: right operand of comma operator has no effect [-Wunused-value]
  100 |     debug("%d jmp %d to %d add %d\n",x,1<<j,jmp[k][j][x],inc[k][j][x]);
      |                                             ~~~~~~~~~~~^
dungeons.cpp:105:9: warning: left operand of comma operator has no effect [-Wunused-value]
  105 |   debug("z %d x %d stx %d\n",z,x,strength[x]);
      |         ^~~~~~~~~~~~~~~~~~~~
dungeons.cpp:105:32: warning: right operand of comma operator has no effect [-Wunused-value]
  105 |   debug("z %d x %d stx %d\n",z,x,strength[x]);
      |                                ^
dungeons.cpp:105:44: warning: right operand of comma operator has no effect [-Wunused-value]
  105 |   debug("z %d x %d stx %d\n",z,x,strength[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...
#Verdict Execution timeMemoryGrader output
Fetching results...