hiho week 295 register

Ended

Participants:48

Verdict:Accepted
Score:100 / 100
Submitted:2020-02-23 19:59:24

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<bits/stdc++.h>
using namespace std;
const long long h=1e9+7;
int N,K,n;
int S[100010];
long long cal(int x)
{
    long long i,j,k,l;
    i=1;
    while(x>=30){
        i=(i<<30)%h;
        x=x-30;
    }
    i=(i<<x)%h;
    return i;
}
int main()
{
    int i,j,k,l;
    long long total,temp;
    ios::sync_with_stdio(false);
    while(cin>>N>>K){
        for(i=n=0;i<N;i++){
            cin>>S[n];
            if(S[n]<=K)n++;
        }
        if(n==0)cout<<-1<<endl;
        else if(n==1)cout<<1<<endl;
        else{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX