F. Restoring the Expression time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A correct expression of the form a+b=c was written; a, b and c are non-negative integers without leading zeros.
898F - Restoring the Expression 思路:字符串hash,base是10,事实证明对2e64取模会T(也许ull很费时),对1e9+7取模. 代码: #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define ull unsigned long long #define mem(a,b) memset(a,b,sizeof(a)) ; ;
题目链接:http://codeforces.com/contest/7/problem/D D. Palindrome Degree time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output String s of length n is called k-palindrome, if it is a palindrome itself