#284. [2026 June TFOJ Normal Round] Written Examination

[2026 June TFOJ Normal Round] Written Examination

版权声明

本题版权归 所有。

题目来源:https://oj.piaoztsdy.cn/contest/69ef77f24dcef706b447be85

题目

  1. 下面这份代码输出什么?
    int a = 3;
    int* p = &a;
    cout << (*p + 4) << endl;
    
  2. 下面这份代码的时间复杂度是多少?(答案格式示例:O(n^2 log n))
    for (int i = n; i >= 1; i >>= 1)
        for (int j = 1; j <= i; j++)
            s++;
    
  3. 已知一棵二叉树的中序遍历是 AEDFCHBG,后序遍历是 EACHFGBD,则其前序遍历是什么?
  4. 填入最少的数字字符使以下判断成立:0xB3 + 064 == 0b________
  5. 填入最少的字符,给下面 T 类型变量 x 的成员 a 赋值为 1(不要带空格):
    struct T { int a, b, c; } x;
    T* p = &x;
    int main() { p ___ = 1; /* ... */ }
    
  6. 下面列出了多少项网络攻击技术:SQL 注入,数据加密,负载均衡,日志审计。
  7. 若二叉树的根结点深度为 11,则深度为 77 的结点至多有多少个?
  8. 中缀表达式 a+b*c-(d-e) 对应的后缀表达式是什么?(不要带空格)
  9. 下面的代码输出什么?(省略最后一个空格,其余原样作答)
    #include <bits/stdc++.h>
    using namespace std;
    class C
    {
        private:
            int k, v;
        public:
            C(int x, int y): k(x), v(y)
            {
                printf("OK: %d -> %d; ", k, v);
            }
            void update(int y)
            {
                this -> v = y;
                printf("Update: %d -> %d; ", this -> k, this -> v);
            }
    };
    int main()
    {
        C c(1, 5);
        c.update(6);
        return 0;
    }
    
  10. 一段不压缩的 22 分钟视频,每秒播放 2424 帧 1024×5121024 \times 512 的 3232 位色彩图像,没有音频,大约占用多少 MiB 空间?

答题区

  1. {{ input(1) }}
  2. {{ input(2) }}
  3. {{ input(3) }}
  4. {{ input(4) }}
  5. {{ input(5) }}
  6. {{ input(6) }}
  7. {{ input(7) }}
  8. {{ input(8) }}
  9. {{ input(9) }}
  10. {{ input(10) }}