摘要:
There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then th 阅读全文
摘要:
After each PAT, the PAT Center will announce the ranking of institutions based on their students' performances. Now you are asked to generate the rank 阅读全文
摘要:
The task of this problem is simple: insert a sequence of distinct positive integers into a hash table first. Then try to find another sequence of inte 阅读全文
摘要:
Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we 阅读全文
摘要:
Given N integers, you are supposed to find the smallest positive integer that is NOT in the given list. Input Specification: Each input file contains 阅读全文
摘要:
Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 1673 阅读全文
摘要:
Consider a positive integer N written in standard notation with k+1 digits ai as ak⋯a1a0 with 0 for all i and ak>0. Then N is palindrom 阅读全文
摘要:
Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s 阅读全文
摘要:
string 转 char* 使用c_str() #include<bits/stdc++.h> using namespace std; int main(){ string s="abc"; printf("%s\n",s.c_str());//string 转 char * return 0; 阅读全文
摘要:
Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output t 阅读全文