C. Marco and GCD Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then…
C. Marco and GCD Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then…
题目链接:https://cn.vjudge.net/problem/CodeForces-894C In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then disappeared with the wind of time. When he woke up, he only remembered that the key…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 把gcd(a[1..n])放在输入的n个数之间. [代码] /* 1.Shoud it use long long ? 2.Have you ever test several sample(at least therr) yourself? 3.Can you promise that the solution is right? At least,the main ideal 4.use the puts("")…
BC都被hack的人生,痛苦. 下面是题解的表演时间: A. QAQ "QAQ" is a word to denote an expression of crying. Imagine "Q" as eyes with tears and "A" as a mouth. Now Diamond has given Bort a string consisting of only uppercase English letters of leng…
我感觉这场CF还是比较毒的,虽然我上分了... Problem A QAQ 题目大意:给你一个由小写字母构成的字符串,问你里面有多少个QAQ. 思路:找字符串中的A然后找两边的Q即可,可以枚举找Q,也可以前缀和优化一下. #include<bits/stdc++.h> using namespace std; ]; ]; long long ans; int main() { scanf(); ); ;i<=n;i++) { sum[i]=sum[i-]; if(s[i]=='Q')…