Submission #499546

# Submission time Handle Problem Language Result Execution time Memory
499546 2021-12-28T15:19:32 Z AramJ Lampice (COCI21_lampice) C++14
0 / 50
0 ms 204 KB
#include <iostream>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int c[n];
for(int i=0;i<n;i++){
    cin>>c[i];
}
int h;
int f=0;
for(int i=0;i<n;i++){
    h=c[i];
    if(h==c[i]){
        f++;
    }
    if(f==k){
        cout<<"1"<<endl<<h;
        break;
    }
    else{
        cout<<"-1";
        break;
    }
}

}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -