結果

問題 No.1205 Eye Drops
ユーザー umezoumezo
提出日時 2020-08-30 13:16:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 512 bytes
コンパイル時間 2,584 ms
コンパイル使用メモリ 198,300 KB
最終ジャッジ日時 2025-01-13 21:00:21
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 8 RE * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n,m;
  cin>>n>>m;
  
  vector<pair<ll,ll>> A(m+1);
  A[0].first=0;
  A[0].second=0;
  rep(i,n){
    cin>>A[i+1].first>>A[i+1].second;
  }
  sort(ALL(A));
  
  bool b=true;
  
  for(int i=0;i<n;i++){
    if(A[i+1].first-A[i].first<A[i+1].second-A[i].second) b=false;
  }
  if(b) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

  return 0;
}
0