摘要:
洛谷P5300 与或和 "题目链接" 按照二进制将矩阵转换为32个01矩阵,and和就是一个01矩阵中全1子矩阵的个数乘以当前矩阵的贡献值,or和就是(总子矩阵个数 全0子矩阵的个数) 当前矩阵的贡献值。 c++ include "bits/stdc++.h" using namespace std 阅读全文
摘要:
Happy Equation Time Limit: 1 Second Memory Limit: 65536 KB Little Sub has just received an equation, which is shown below, as his birthday gift. $ a^x 阅读全文
摘要:
题目描述 Given two arrays A, B of length n and m separately, you have to merge them into only one array C (of length n + m) obeying the rule that the rela 阅读全文
摘要:
题目描述 石头游戏在一个 n 行 m 列 (1≤n,m≤8) 的网格上进行,每个格子对应一种操作序列,操作序列至多有10种,分别用0~9这10个数字指明。操作序列是一个长度不超过6且循环执行、每秒执行一个字符的字符串。每秒钟,所有格子同时执行各自操作序列里的下一个字符。序列中的每个字符是以下格式之一 阅读全文
摘要:
题目描述 Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. 输入 The input contains exactly one test case. The first li 阅读全文