Submission #91732

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
917322018-12-29 15:51:03SwistakkMechanical Doll (IOI18_doll)C++14
100 / 100
209 ms9320 KiB
#include "doll.h"
#include <bits/stdc++.h>
#define MP make_pair
#define PB push_back
#define st first
#define nd second
#define rd third
#define FOR(i, a, b) for(int i =(a); i <=(b); ++i)
#define RE(i, n) FOR(i, 1, n)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
#define REP(i, n) for(int i = 0;i <(n); ++i)
#define VAR(v, i) __typeof(i) v=(i)
#define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
using namespace std;
template<typename TH> void _dbg(const char* sdbg, TH h) { cerr<<sdbg<<"="<<h<<"\n"; }
template<typename TH, typename... TA> void _dbg(const char* sdbg, TH h, TA... t) {
while(*sdbg != ',')cerr<<*sdbg++; cerr<<"="<<h<<","; _dbg(sdbg+1, t...);
}
#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<"\n"; }}
#else
#define debug(...) (__VA_ARGS__)
#define debugv(x)
#define cerr if(0)cout
#endif
#define next ____next
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

doll.cpp: In function 'void _dbg(const char*, TH, TA ...)':
doll.cpp:20:3: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   20 |   while(*sdbg != ',')cerr<<*sdbg++; cerr<<"="<<h<<","; _dbg(sdbg+1, t...);
      |   ^~~~~
doll.cpp:20:37: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   20 |   while(*sdbg != ',')cerr<<*sdbg++; cerr<<"="<<h<<","; _dbg(sdbg+1, t...);
      |                                     ^~~~
doll.cpp: In lambda function:
doll.cpp:72:11: warning: left operand of comma operator has no effect [-Wunused-value]
   72 |     debug(cur_node, sz, rem_hei);
      |           ^~~~~~~~
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:72:25: warning: right operand of comma operator has no effect [-Wunused-value]
   72 |     debug(cur_node, sz, rem_hei);
      |                         ^~~~~~~
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:85:13: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
   85 |       debug(sz);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:113:9: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  113 |   debug(X);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:114:9: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  114 |   debug(Y);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:117:11: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  117 |     debug(goal);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:120:13: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  120 |       debug(cur_node);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:143:13: warning: left operand of comma operator has no effect [-Wunused-value]
  143 |     debug(i + 1, -X[i], -Y[i]);
      |           ~~^~~
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:143:18: warning: value computed is not used [-Wunused-value]
  143 |     debug(i + 1, -X[i], -Y[i]);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:145:9: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  145 |   debug(X);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:146:9: warning: statement has no effect [-Wunused-value]
   26 | #define debug(...) (__VA_ARGS__)
      |                    ~~~~~~~~~~~~~
......
  146 |   debug(Y);
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:6:12: warning: statement has no effect [-Wunused-value]
    6 | #define st first
      |            ^
doll.cpp:26:21: note: in definition of macro 'debug'
   26 | #define debug(...) (__VA_ARGS__)
      |                     ^~~~~~~~~~~
doll.cpp:147:9: note: in expansion of macro 'st'
  147 |   debug(st);
      |         ^~
#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...