Link: ARC 066 传送门 C: 如果存在可行方案则答案为$2^{n/2}$ #include <bits/stdc++.h> using namespace std; #define X first #define Y second typedef long long ll; typedef pair<int,int> P; ,MOD=1e9+; int n,x,res[MAXN]; int main() { scanf("%d",&n); ;…
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 解题思路: 往一个用数组表示的数里面加1,注意下数据溢出即可,JAVA实现如下: public int[] plusOne(int[] digits)…
题目链接:http://abc066.contest.atcoder.jp/tasks/abc066_b Time limit : 2sec / Memory limit : 256MB Score : 200 points Problem Statement We will call a string that can be obtained by concatenating two equal strings an even string. For example, xyzxyz and a…
题目: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number 0 itself. The digits are stored such that the most significant digit i…
Time limit : 2sec / Memory limit : 256MB Score : 900 points Problem Statement Joisino has a formula consisting of N terms: A1 op1 A2 … opN−1 AN. Here, Ai is an integer, and opi is an binary operator either + or -. Because Joisino loves large numbers,…
拿着刚磨好的热咖啡,我坐在了显示器前.“美好的一天又开始了”,我想. 昨晚做完了一个非常困难的任务并送给美国同事Review,因此今天只需要根据他们提出的意见适当修改代码并提交,一周的任务就完成了.剩下的两三天里,我就可以有一些空余的时间看看其它资料来继续充实自己了. 打开Review Board,可以看到我的代码已经被标记为可以提交,但是下面所留的注解引起了我的注意: “Great job! With this solution, we can start our integration wo…