結果

問題 No.1205 Eye Drops
ユーザー kohkohkohkoh
提出日時 2020-08-30 13:42:44
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 1,551 bytes
コンパイル時間 710 ms
コンパイル使用メモリ 99,616 KB
実行使用メモリ 13,644 KB
最終ジャッジ日時 2023-08-15 13:24:55
合計ジャッジ時間 2,239 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 5 ms
11,628 KB
testcase_01 AC 4 ms
11,596 KB
testcase_02 AC 5 ms
11,564 KB
testcase_03 AC 4 ms
11,624 KB
testcase_04 AC 3 ms
11,696 KB
testcase_05 AC 4 ms
11,680 KB
testcase_06 AC 4 ms
11,544 KB
testcase_07 AC 4 ms
11,560 KB
testcase_08 AC 4 ms
11,548 KB
testcase_09 AC 5 ms
11,560 KB
testcase_10 AC 4 ms
11,612 KB
testcase_11 AC 4 ms
11,544 KB
testcase_12 AC 4 ms
11,592 KB
testcase_13 AC 4 ms
11,656 KB
testcase_14 AC 4 ms
11,596 KB
testcase_15 AC 4 ms
11,820 KB
testcase_16 AC 3 ms
11,552 KB
testcase_17 AC 3 ms
11,612 KB
testcase_18 AC 4 ms
11,616 KB
testcase_19 AC 4 ms
11,548 KB
testcase_20 AC 4 ms
11,628 KB
testcase_21 AC 4 ms
11,600 KB
testcase_22 AC 4 ms
11,732 KB
testcase_23 AC 4 ms
11,548 KB
testcase_24 AC 4 ms
11,556 KB
testcase_25 AC 4 ms
11,556 KB
testcase_26 AC 3 ms
11,616 KB
testcase_27 AC 4 ms
11,560 KB
testcase_28 AC 4 ms
11,568 KB
testcase_29 AC 4 ms
11,688 KB
testcase_30 AC 4 ms
11,608 KB
testcase_31 AC 4 ms
11,564 KB
testcase_32 AC 4 ms
11,608 KB
testcase_33 AC 3 ms
11,544 KB
testcase_34 AC 4 ms
11,736 KB
testcase_35 AC 3 ms
11,540 KB
testcase_36 AC 3 ms
11,600 KB
testcase_37 AC 55 ms
13,644 KB
testcase_38 AC 4 ms
11,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <random>
#include <queue>
#include <stack>
#include <bitset>
#include <cassert>
#define int long long
#define double long double
#define rep(i,n) for(int i=0;i<n;i++)
#define srep(i,n,m) for(int i=n;i<m;i++)
#define elif else if
#define pi 3.141592653589793
#define prique priority_queue
constexpr auto mod=1000000007;
using namespace std;
int gcd(int a,int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int lcm(int a,int b){
    return a*b/gcd(a,b);
}
bool prime(int n){
    int cnt=0;
    for(int i=1;i<=sqrt(n);i++){
        if(n%1==0)cnt++;
    }
    if(cnt!=1) return false;
    else return n!=1;
}
struct UnionFind{
    vector<int> r;
    UnionFind(int N){
        r=vector<int>(N,-1);
    }
    int root(int x){
        if(r[x]<0) return x;
        return r[x]=root(r[x]);
    }
    bool unite(int x,int y){
        x=root(x);
        y=root(y);
        if(x==y) return false;
        if(r[x]>r[y]) swap(x,y);
        r[x]+=r[y];
        r[y]=x;
        return true;
    }
    int size(int x){
        return -r[root(x)];
    }
};
vector<int> v;
int n,m,cnt=0,ans=0,aa[220000],ab[220000];
pair<int,int> pp[220000];
string s,ss[220000];
queue<int> que;
signed main(){
    cin>>n>>m;
    rep(i,m){
        cin>>pp[i].first>>pp[i].second;
        if(abs(pp[i].first-pp[i-1].first)<abs(pp[i].second-pp[i-1].second)){
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;
}
0