F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

sequence2

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 981    Accepted Submission(s): 365


Problem Description
Given an integer array $b_i$ with a length of $n$, please tell me how many exactly different increasing subsequences.

P.S. A subsequence $b_{a_i}(1 \leq i \leq k)$ is an increasing subsequence of sequence $b_i(1 \leq i \leq n)$ if and only if $1\leq a_1 < a_2 < ... < a_k \leq n$ and $ b_{a_1} < b_{a_2} < ... < b_{a_k} $.
Two sequences $a_i$ and $b_i$ is exactly different if and only if there exist at least one $i$ and $a_i \neq b_i$.
 

Input
Several test cases(about $5$)

For each cases, first come 2 integers, $n,k(1 \leq n \leq 100,1 \leq k \leq n)$

Then follows $n$ integers $a_i ( 0 \leq a_i \leq 10^9)$
 

Output
For each cases, please output an integer in a line as the answer.
 

Sample Input
3 2 1 2 2 3 2 1 2 3
 

Sample Output
2 3
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 12:51:46, Gzip enabled