Compile Error

/in/foo.cc:22:7: error: invalid preprocessing directive #\U00006620\U00005c04\U00006d77\U000062d4\U00005230\U000057ce\U00005e02\U00007f16\U000053f7\U0000ff081
   22 |     # 映射海拔到城市编号(1-based)
      |       ^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:25:7: error: invalid preprocessing directive #\U00009884\U00005904\U00007406B_next\U0000548cA_next
   25 |     # 预处理B_next和A_next
      |       ^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:26:32: error: stray '#' in program
   26 |     B_next = [None] * (N + 1)  # B_next[i]是城市i东边最近的城市
      |                                ^
/in/foo.cc:27:32: error: stray '#' in program
   27 |     A_next = [None] * (N + 1)  # A_next[i]是城市i东边第二近的城市
      |                                ^
/in/foo.cc:30:7: error: invalid preprocessing directive #\U00004ece\U0000540e\U00005f80\U0000524d\U00005904\U00007406\U000057ce\U00005e02i\U0000ff081
   30 |     # 从后往前处理城市i(1-based),i从N-1到1
      |       ^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:32:11: error: invalid preprocessing directive #\U000052a0\U00005165\U000057ce\U00005e02i
   32 |         # 加入城市i+1的海拔(因为i+1 > i,属于东边)
      |           ^~~~~~~~~
/in/foo.cc:33:28: error: stray '#' in program
   33 |         h_i_plus_1 = H[i]  # 城市i+1的海拔是H[i](0-based)
      |                            ^
/in/foo.cc:36:11: error: invalid preprocessing directive #\U00005f53\U0000524d\U000057ce\U00005e02i\U00007684\U00006d77\U000062d4
   36 |         # 当前城市i的海拔
      |           ^~~~~~~~~~~~~~~
/in/foo.cc:37:29: error: stray '#' in program
   37 |         h_current = H[i-1]  # 城市i的海拔是H[i-1]
      |                             ^
/in/foo.cc:39:11: error: invalid preprocessing directive #\U0000627e\U00005230\U000063d2\U00005165\U00004f4d\U00007f6e
   39 |         # 找到插入位置
      |           ^~~~~~~~~~~~
/in/foo.cc:42:11: error: invalid preprocessing directive #\U00006536\U000096c6\U00005019\U00009009\U00005143\U00007d20\U0000ff08pos\U00009644\U00008fd1\U00007684\U00005143\U00007d20\U0000ff09
   42 |         # 收集候选元素(pos附近的元素)
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:48:11: error: invalid preprocessing directive #\U00006309\U0000ff08\U00008ddd\U000079bb\U0000ff0c\U00006d77\U000062d4\U0000ff09\U00006392\U00005e8f
   48 |         # 按(距离,海拔)排序
      |           ^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:51:11: error: invalid preprocessing directive #\U000066f4\U000065b0B_next\U0000548cA_next
   51 |         # 更新B_next和A_next
      |           ^~~~~~~~~~~~~~~~~~
/in/foo.cc:62:7: error: invalid preprocessing directive #\U000095ee\U000098981\U0000ff1a\U0000627e\U00005230\U00006700\U00004f18\U00007684S0
   62 |     # 问题1:找到最优的S0
      |       ^~~~~~~~~~~~~~~~~~~
/in/foo.cc:63:7: error: invalid preprocessing directive #\U00004f7f\U00007528\U00008bb0\U00005fc6\U00005316\U00006a21\U000062df
   63 |     # 使用记忆化模拟
      |       ^~~~~~~~~~~~~~
/in/foo.cc:71:11: error: invalid preprocessing directive #\U0000786e\U00005b9a\U00004e0b\U00004e00\U00006b65\U000057ce\U00005e02
   71 |         # 确定下一步城市
      |           ^~~~~~~~~~~~~~
/in/foo.cc:81:11: error: invalid preprocessing directive #\U00008ba1\U00007b97\U00008ddd\U000079bb
   81 |         # 计算距离
      |           ^~~~~~~~
/in/foo.cc:87:11: error: invalid preprocessing directive #\U00009012\U00005f52\U00008ba1\U00007b97\U00005269\U00004f59\U00008def\U00007a0b
   87 |         # 递归计算剩余路程
      |           ^~~~~~~~~~~~~~~~
/in/foo.cc:101:7: error: invalid preprocessing directive #\U0000904d\U00005386\U00006240\U00006709\U000053ef\U000080fd\U00007684\U000051fa\U000053d1\U000057ce\U00005e02\U0000ff0c\U0000627e\U00005230\U00006700\U00004f18S0
  101 |     # 遍历所有可能的出发城市,找到最优S0
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:102:24: warning: multi-character character constant [-Wmultichar]
  102 |     best_ratio = float('inf')
      |                        ^~~~~
/in/foo.cc:104:21: warning: multi-character character constant [-Wmultichar]
  104 |     best_h = -float('inf')
      |                     ^~~~~
/in/foo.cc:110:11: error: invalid preprocessing directive #\U00008ba1\U00007b97\U00005f53\U0000524d\U00006bd4\U0000503c
  110 |         # 计算当前比值
      |           ^~~~~~~~~~~~
/in/foo.cc:112:35: warning: multi-character character constant [-Wmultichar]
  112 |             current_ratio = float('inf')
      |                                   ^~~~~
/in/foo.cc:116:11: error: invalid preprocessing directive #\U000066f4\U000065b0\U00006700\U00004f18\U000089e3
  116 |         # 更新最优解
      |           ^~~~~~~~~~
/in/foo.cc:129:7: error: invalid preprocessing directive #\U00005904\U00007406M\U00004e2a\U000067e5\U00008be2
  129 |     # 处理M个查询
      |       ^~~~~~~~~~~
/in/foo.cc:135:19: error: stray '#' in program
  135 |         step = 1  # 1表示小A开车,2表示小B,依次轮换
      |                   ^
/in/foo.cc:138:32: error: stray '#' in program
  138 |             if step % 2 == 1:  # 小A开车
      |                                ^
/in/foo.cc:141:20: error: stray '#' in program
  141 |             else:  # 小B开车
      |                    ^
/in/foo.cc:148:15: error: invalid preprocessing directive #\U00008ba1\U00007b97\U00008ddd\U000079bb
  148 |             # 计算距离
      |               ^~~~~~~~
/in/foo.cc:153:15: error: invalid preprocessing directive #\U000066f4\U000065b0\U0000603b\U00008ddd\U000079bb\U0000548c\U00005404\U000081ea\U00008def\U00007a0b
  153 |             # 更新总距离和各自路程
      |               ^~~~~~~~~~~~~~~~~~~~
/in/foo.cc:1:1: error: 'from' does not name a type
    1 | from sortedcontainers import SortedList
      | ^~~~
/in/foo.cc:26:5: error: 'B_next' does not name a type
   26 |     B_next = [None] * (N + 1)  # B_next[i]是城市i东边最近的城市
      |     ^~~~~~
/in/foo.cc:66:5: error: 'def' does not name a type
   66 |     def simulate_mem(current, is_A_turn, remaining_X):
      |     ^~~

信息

递交者
类型
递交
题目
P1194 自驾游
语言
C++
递交时间
2025-07-15 19:23:43
评测时间
2025-07-15 19:23:43
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes