编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#116936 #1473. [L2-3] Ice World 2 Compile Error 0 0 ms 0 K C++ 17 (Clang) / 841 B minstdfx0v0 2025-04-19 0:54:11
显示原始代码
def solve(n, m):
#特殊情况:一行或者一列,Bob 直接获胜
    if n == 1 or m == 1:
        return "Bob"

#对于一般情况,分析从 Alice 和 Bob 的初始位置的移动路径:
#Alice 从(1, 1) 开始,Bob 从(n, m) 开始
#如果 Alice 经过一系列操作可以在 Bob 到达之前先到达一个可以攻击 Bob 的位置,
#那么 Alice 获胜,否则 Bob 获胜。

#如果 n 或 m 大于 1,Alice 会逐步逼近 Bob 所在位置
#由于 Alice 先手并且可以有效攻击周围位置
#在一般情况下,Alice 的移动距离将比 Bob 靠近得更快。

#Alice 获胜
    return "Alice"

#输入处理
T = int(input())  # 读取数据组数
for _ in range(T):
    n, m = map(int, input().split())
    print(solve(n, m))

编译信息

/sandbox/1/a.cpp:1:1: error: unknown type name 'def'
def solve(n, m):
^
/sandbox/1/a.cpp:1:11: error: unknown type name 'n'
def solve(n, m):
          ^
/sandbox/1/a.cpp:1:14: error: unknown type name 'm'
def solve(n, m):
             ^
/sandbox/1/a.cpp:2:19: warning: treating Unicode character <U+FF1A> as identifier character rather than as ':' symbol [-Wunicode-homoglyph]
    # 特殊情况:一行或者一列,Bob 直接获胜
              ^~
/sandbox/1/a.cpp:2:40: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 特殊情况:一行或者一列,Bob 直接获胜
                            ^~
/sandbox/1/a.cpp:2:7: error: invalid preprocessing directive
    # 特殊情况:一行或者一列,Bob 直接获胜
      ^
/sandbox/1/a.cpp:3:5: error: expected class member or base class name
    if n == 1 or m == 1:
    ^
/sandbox/1/a.cpp:6:25: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 对于一般情况,分析从 Alice 和 Bob 的初始位置的移动路径:
                  ^~
/sandbox/1/a.cpp:6:7: error: invalid preprocessing directive
    # 对于一般情况,分析从 Alice 和 Bob 的初始位置的移动路径:
      ^
/sandbox/1/a.cpp:6:82: warning: treating Unicode character <U+FF1A> as identifier character rather than as ':' symbol [-Wunicode-homoglyph]
    # 对于一般情况,分析从 Alice 和 Bob 的初始位置的移动路径:
                                                            ^~
/sandbox/1/a.cpp:7:7: error: invalid preprocessing directive
    # Alice 从 (1, 1) 开始,Bob 从 (n, m) 开始
      ^
/sandbox/1/a.cpp:7:30: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # Alice 从 (1, 1) 开始,Bob 从 (n, m) 开始
                          ^~
/sandbox/1/a.cpp:8:7: error: invalid preprocessing directive
    # 如果 Alice 经过一系列操作可以在 Bob 到达之前先到达一个可以攻击 Bob 的位置,
      ^
/sandbox/1/a.cpp:8:108: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 如果 Alice 经过一系列操作可以在 Bob 到达之前先到达一个可以攻击 Bob 的位置,
                                                                               ^~
/sandbox/1/a.cpp:9:7: error: invalid preprocessing directive
    # 那么 Alice 获胜,否则 Bob 获胜。
      ^
/sandbox/1/a.cpp:9:26: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 那么 Alice 获胜,否则 Bob 获胜。
                     ^~
/sandbox/1/a.cpp:11:7: error: invalid preprocessing directive
    # 如果 n 或 m 大于 1,Alice 会逐步逼近 Bob 所在位置
      ^
/sandbox/1/a.cpp:11:30: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 如果 n 或 m 大于 1,Alice 会逐步逼近 Bob 所在位置
                        ^~
/sandbox/1/a.cpp:12:7: error: invalid preprocessing directive
    # 由于 Alice 先手并且可以有效攻击周围位置
      ^
/sandbox/1/a.cpp:13:25: warning: treating Unicode character <U+FF0C> as identifier character rather than as ',' symbol [-Wunicode-homoglyph]
    # 在一般情况下,Alice 的移动距离将比 Bob 靠近得更快。
                  ^~
/sandbox/1/a.cpp:13:7: error: invalid preprocessing directive
    # 在一般情况下,Alice 的移动距离将比 Bob 靠近得更快。
      ^
/sandbox/1/a.cpp:15:7: error: invalid preprocessing directive
    # Alice 获胜
      ^
/sandbox/1/a.cpp:18:3: error: invalid preprocessing directive
# 输入处理
  ^
/sandbox/1/a.cpp:1:16: error: only constructors take base initializers
def solve(n, m):
               ^
9 warnings and 15 errors generated.