题目链接: B. Xenia and Hamming 题意: 要求找到复制后的两个字符串中不同样的字符 思路: 子问题: 在两串长度是最大公倍数的情况下, 求出一个串在还有一个串中反复字符的个数 CODE: #include <iostream> #include<stdio.h> #include<string> #include<string.h> using namespace std; #define M 1000006 int com[M][26]…
B. Xenia and Spies time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Xenia the vigorous detective faced n (n ≥ 2) foreign spies lined up in a row. We'll consider the spies numbered from 1 to…
D. Xenia and Bit Operations time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Xenia the beginner programmer has a sequence a, consisting of 2n non-negative integers: a1, a2, ..., a2n. Xenia…