結果
| 問題 | No.1205 Eye Drops | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-08-30 16:05:11 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 21 ms / 2,000 ms | 
| コード長 | 518 bytes | 
| コンパイル時間 | 706 ms | 
| コンパイル使用メモリ | 65,916 KB | 
| 最終ジャッジ日時 | 2025-01-13 23:33:09 | 
| ジャッジサーバーID (参考情報) | judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 37 | 
ソースコード
#include <iostream>
using lint = long long;
void solve() {
    lint n;
    int m;
    std::cin >> n >> m;
    lint px = 0, pt = 0;
    while (m--) {
        lint t, x;
        std::cin >> t >> x;
        lint dx = std::abs(x - px),
             dt = t - pt;
        if (dx > dt) {
            std::cout << "No\n";
            return;
        }
        px = x, pt = t;
    }
    std::cout << "Yes\n";
}
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    solve();
    return 0;
}
            
            
            
        