Alex_tz307

School-CCC Hyperloop Direct - Level 1

Oct 28th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. ifstream fin("text.in");
  6. ofstream fout("text.out");
  7.  
  8. int main() {
  9.     int Y;
  10.     fin >> Y;
  11.     int T;
  12.     fin >> T;
  13.     while(T--) {
  14.         int x, y;
  15.         fin >> x >> y;
  16.         if((y < Y && Y > 0) || (y > Y && Y < 0))
  17.             fout << x << ' ' << y << ' ';
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment