Submission #1303140

#TimeUsernameProblemLanguageResultExecution timeMemory
1303140gabrielzMigrations (IOI25_migrations)C++20
Compilation error
0 ms0 KiB
constexpr int LM 9998, RM = 20000; int lm = LM, rm = RM; int send_message(int N, int i, int Pi) { if (lm % 2 == 0) { return lm--; } else { return rm--; } } std::pair<int, int> longest_path(std::vector<int> S) { std::make_pair(LM, RM); }

Compilation message (stderr)

migrations.cpp:1:18: error: expected initializer before numeric constant
    1 | constexpr int LM 9998, RM = 20000;
      |                  ^~~~
migrations.cpp:2:10: error: 'LM' was not declared in this scope; did you mean 'lm'?
    2 | int lm = LM, rm = RM;
      |          ^~
      |          lm
migrations.cpp: In function 'int send_message(int, int, int)':
migrations.cpp:8:12: error: 'rm' was not declared in this scope; did you mean 'lm'?
    8 |     return rm--;
      |            ^~
      |            lm
migrations.cpp: At global scope:
migrations.cpp:12:6: error: 'pair' in namespace 'std' does not name a template type
   12 | std::pair<int, int> longest_path(std::vector<int> S) {
      |      ^~~~
migrations.cpp:1:1: note: 'std::pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
  +++ |+#include <utility>
    1 | constexpr int LM 9998, RM = 20000;