http://codeforces.com/contest/900

A

 1 #include<bits/stdc++.h>
 2 using namespace std;
 3 #define lson l,mid,rt<<1
 4 #define rson mid+1,r,rt<<1|1
 5 #define sqr(x) ((x)*(x))
 6 #define pb push_back
 7 #define eb emplace_back
 8 #define maxn 100005
 9 #define eps 1e-8
10 #define pi acos(-1.0)
11 #define rep(k,i,j) for(int k=i;k<j;k++)
12 typedef long long ll;
13 typedef pair<int,int> pii;
14 typedef pair<long long,int>pli;
15 typedef pair<int,char> pic;
16 typedef pair<pair<int,string>,pii> ppp;
17 typedef unsigned long long ull;
18 const long long MOD=1e9+7;
19 /*#ifndef ONLINE_JUDGE
20         freopen("1.txt","r",stdin);
21 #endif */
22 
23 int a[2];
24 int main(){
25     #ifndef ONLINE_JUDGE
26      //   freopen("1.txt","r",stdin);
27     #endif
28     std::ios::sync_with_stdio(false);   
29     int n;
30     cin>>n;
31     int u,v;
32     for(int i=0;i<n;i++){
33         cin>>u>>v;
34         if(u>0) a[0]++;
35         else a[1]++;
36     }
37     if(a[0]<=1||a[1]<=1) cout<<"YES"<<endl;
38     else cout<<"NO"<<endl;
39 }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-08-12
  • 2021-04-24
  • 2021-12-04
  • 2021-11-19
猜你喜欢
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
相关资源
相似解决方案