1136A-Nastya Is Reading a Book,
(A) Nastya Is Reading a Book, Accepted
- #include<iostream>
- #include<stdio.h>
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
-
- int n,k;
- cin >>n;
- int arr[2*n];
- for(int j=0;j<2*n;j++)
- cin >>arr[j];
-
-
- cin>>k;
- float x=0;
- for(int j=0;j<2*n;j++){
- if(k<=arr[j])
- x++;
-
- }
- float ans =x/2;
- cout<<ceil(ans);
- }
Comments
Post a Comment