Submission #569527

#TimeUsernameProblemLanguageResultExecution timeMemory
569527redstonegamer22Crayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
#include <ext/rope> int l; __gnu_cxx::crope v[1e6 + 7]; void Init() {;} void TypeLetter(char c) { v[l + 1] = v[l] + c; ++l; } void UndoCommands(int k) { v[l + 1] = v[l - k]; ++l; } void GetLetter(int k) { return v[l][k]; }

Compilation message (stderr)

scrivener.cpp:4:24: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    4 | __gnu_cxx::crope v[1e6 + 7];
      |                    ~~~~^~~
scrivener.cpp:4:24: error: could not convert '(1.0e+6 + (double)7)' from 'double' to 'long unsigned int'
scrivener.cpp:4:24: error: size of array 'v' has non-integral type 'double'
scrivener.cpp: In function 'void GetLetter(int)':
scrivener.cpp:9:38: error: return-statement with a value, in function returning 'void' [-fpermissive]
    9 | void GetLetter(int k) { return v[l][k]; }
      |                                ~~~~~~^