hiho week 224 register

Ended

Participants:153

Verdict:Accepted
Score:100 / 100
Submitted:2018-10-17 23:25:54

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<stdio.h>
#include<iostream>
#include<map>
/*
  Continous increasing means 1,2,3,4;not 1,2,3,5
*/
using namespace std;
int T,K,N;
long long A[50001];
map<long long , int> m;
int main()
{
    //freopen("hiho224.txt","r",stdin);
    scanf("%d",&T);
    for(int i=0;i<T;++i)
    {
        scanf("%d %d",&N,&K);
        for(int j=0;j<N;++j)
        {
            scanf("%lld",&A[j]);
            m[A[j]] += 1;
        }
        //cout<<"round "<<i<<endl;
        
        for(map<long long, int >::iterator it = m.begin();it!=m.end();++it)
        {  
            if(it->second>0)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX