QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#646840#8684. Alea Iacta EstPrinceton_TigersCompile Error//C++144.2kb2024-10-17 09:09:352024-10-17 09:09:35

Details

answer.code:21:11: error: invalid preprocessing directive #Represent
   21 |         # Represent words as sorted tuples of symbols
      |           ^~~~~~~~~
answer.code:24:7: error: invalid preprocessing directive #Precompute
   24 |     # Precompute possible symbols per die
      |       ^~~~~~~~~~
answer.code:29:17: error: stray ‘#’ in program
   29 |     N = 1 << d  # Total number of states
      |                 ^
answer.code:30:22: error: stray ‘#’ in program
   30 |     p_s = [0.0] * N  # Probability of success for each state
      |                      ^
answer.code:31:36: error: stray ‘#’ in program
   31 |     possible_symbols = [None] * N  # Possible symbol combinations for each state
      |                                    ^
answer.code:40:19: error: invalid preprocessing directive #Fixed
   40 |                 # Fixed dice, take any one of their symbols (they are fixed)
      |                   ^~~~~
answer.code:46:11: error: invalid preprocessing directive #Generate
   46 |         # Generate all possible combinations for the rerolled dice
      |           ^~~~~~~~
answer.code:47:11: error: invalid preprocessing directive #Since
   47 |         # Since total combinations can be up to 46656, we can handle this
      |           ^~~~~
answer.code:52:15: error: invalid preprocessing directive #No
   52 |             # No dice being rerolled
      |               ^~
answer.code:53:15: error: invalid preprocessing directive #Build
   53 |             # Build multiset of symbols
      |               ^~~~~
answer.code:57:23: error: invalid preprocessing directive #Fixed
   57 |                     # Fixed dice
      |                       ^~~~~
answer.code:58:49: error: stray ‘#’ in program
   58 |                     symbols.append(dice[i][0])  # Since die is fixed, any face (they are the same)
      |                                                 ^
answer.code:66:11: error: invalid preprocessing directive #Build
   66 |         # Build fixed symbols
      |           ^~~~~
answer.code:70:19: error: invalid preprocessing directive #Fixed
   70 |                 # Fixed dice
      |                   ^~~~~
answer.code:71:19: error: invalid preprocessing directive #Since
   71 |                 # Since die is not being rerolled, the symbol is fixed
      |                   ^~~~~
answer.code:74:11: error: invalid preprocessing directive #Now
   74 |         # Now generate all combinations for the rerolled dice
      |           ^~~
answer.code:85:15: error: invalid preprocessing directive #Add
   85 |             # Add fixed symbols
      |               ^~~
answer.code:88:23: error: invalid preprocessing directive #Fixed
   88 |                     # Fixed die
      |                       ^~~~~
answer.code:89:23: error: invalid preprocessing directive #Since
   89 |                     # Since the die is fixed, its face is undetermined but we can pick any
      |                       ^~~~~
answer.code:90:23: error: invalid preprocessing directive #face
   90 |                     # face as they are the same (from the initial roll)
      |                       ^~~~
answer.code:99:7: error: invalid preprocessing directive #Initialize
   99 |     # Initialize E[s]
      |       ^~~~~~~~~~
answer.code:100:20: warning: multi-character character constant [-Wmultichar]
  100 |     E_old = [float('inf')] * N
      |                    ^~~~~
answer.code:105:30: warning: multi-character character constant [-Wmultichar]
  105 |             E_old[s] = float('inf')
      |                              ^~~~~
answer.code:109:7: error: invalid preprocessing directive #Iteratively
  109 |     # Iteratively update E[s]
      |       ^~~~~~~~~~~
answer.code:121:11: error: invalid preprocessing directive #Check
  121 |         # Check for convergence
      |           ^~~~~
answer.code:127:35: error: stray ‘#’ in program
  127 |     initial_state = (1 << d) - 1  # All dice are being rerolled
      |                                   ^
answer.code:133:16: warning: character constant too long for its type
  133 | if __name__ == '__main__':
      |                ^~~~~~~~~~
answer.code:1:1: error: ‘import’ does not name a type
    1 | import sys
      | ^~~~~~
answer.code:1:1: note: C++20 ‘import’ only available with ‘-fmodules-ts’