結果

問題 No.3560 Giant Salamander
コンテスト
ユーザー みつ
提出日時 2026-05-29 20:31:30
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,988 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,358 ms
コンパイル使用メモリ 337,320 KB
実行使用メモリ 7,976 KB
最終ジャッジ日時 2026-05-29 20:31:40
合計ジャッジ時間 5,317 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
部分点1 5 % AC * 5
部分点2 20 % WA * 6
部分点3 15 % WA * 11
部分点4 40 % AC * 5 WA * 17
満点 20 % AC * 9 WA * 26
合計 5 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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

#define all(v) v.begin(),v.end()
#define rall(v)v.rbegin(),v.rend()

using ll = long long;
using ull = unsigned long long;
#define iINF 2000000000
#define llINF 9000000000000000000ll
const int MOD9 = 998244353;
const int MOD1 = 1000000000 + 7;
const vector<int> dx = {0,1,0,-1} , dy = {1,0,-1,0};

//chmin , chmax
template<typename T>
bool chmin(T &a , T b){ if(a > b){a = b ; return 1;}return 0;}
template<typename T>
bool chmax(T &a , T b){ if(a < b){a = b ; return 1;}return 0;}

//io
template<typename T , typename F>
std::istream& operator>>(std::istream& is , pair<T,F> &p){
    is >> p.first >> p.second; return is;
}
template<typename T , typename F>
std::ostream& operator<<(std::ostream& os , const pair<T,F> &p){
    os << " [" << p.first << " , " << p.second << "] "; return os;
}

//vio
template<typename T>
void printv1(vector<T> &v){
    for(int i=0;i<(int)v.size()-1;i++) cout << v[i] << " ";
    cout << v.back() << "\n";
}
template<typename T>
void printv2(vector<T> & v){
    for(auto &vi : v) cout << vi << "\n";
}
template<typename T>
void printvv(vector<vector<T>> &vv){
    for(auto &vvi : vv) printv1(vvi);
}
template<typename T>
void printve1(vector<T> &v){
    for(int i=0;i<(int)v.size()-1;i++) cerr << v[i] << " ";
    cerr << v.back() << "\n";
}
template<typename T>
void printve2(vector<T> & v){
    for(auto &vi : v) cerr << vi << "\n";
}
template<typename T>
void printvve(vector<vector<T>> &vv){
    for(auto &vvi : vv) printve1(vvi);
}

template<typename T>
void vin(vector<T> &v){
    for(auto &vi : v) cin >> vi;
}
template<typename T>
void vvin(vector<vector<T>> &vv){
    for(auto &vvi : vv) vin(vvi);
}


int main(){cin.tie(0);ios::sync_with_stdio(0);
    int t;
    cin >> t;
    while(t--){
        int n,m;cin >> n >> m;
        vector<int> a(m) , b(m);
        for(int i=0;i<m;i++) cin >> a[i] >> b[i];
        if(m == 1 || n == m) cout << "Yes" << endl;
        else cout << "No" << endl;
    }

}
0