Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: "aba" Output: True Example 2: Input: "abca" Output: True Explanation: You could delete the character 'c'. N
The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another number in the set, which results in repetition of one number and loss of another number. Given an arr
问题描述 ACM题目 求思路 枚举超时· 解决方案 #include<iostream> using namespace std; long pow(int a,int b){ if(b==0) return 1; return a*pow(a,b-1); } int main(){ long x,y; int countinput=0; while(cin>>x>>y){ countinput++; int count=0; int countsame=0; for(