結果
| 問題 | No.3560 Giant Salamander |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-22 09:45:50 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 635 bytes |
| 記録 | |
| コンパイル時間 | 3,365 ms |
| コンパイル使用メモリ | 341,048 KB |
| 実行使用メモリ | 9,600 KB |
| 最終ジャッジ日時 | 2026-05-29 18:33:32 |
| 合計ジャッジ時間 | 5,302 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| サブタスク | 配点 | 結果 |
|---|---|---|
| 部分点1 | 5 % | AC * 5 |
| 部分点2 | 20 % | AC * 5 WA * 1 |
| 部分点3 | 15 % | AC * 9 WA * 2 |
| 部分点4 | 40 % | AC * 19 WA * 3 |
| 満点 | 20 % | AC * 30 WA * 5 |
| 合計 | 5 点 |
ソースコード
// guess
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll t;
cin >> t;
while(t--){
ll n,m;
cin >> n >> m;
vector<pair<ll,ll>> vp(m);
for(ll i=0;i<m;i++){
cin >> vp[i].first >> vp[i].second;
vp[i].first--;
}
sort(vp.begin(),vp.end());
vp.push_back({vp[0].first+n,vp[0].second});
bool ok=true;
for(ll i=0;i<m;i++){
ll x=vp[i+1].first-vp[i].first+1;
ll y=vp[i+1].second+vp[i].second;
if(x>y){ok=false;}
}
if(ok){cout << "Yes\n";}
else{cout << "No\n";}
}
return 0;
}