답안 #1114605

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1114605 2024-11-19T08:45:18 Z vjudge1 Newspapers (CEOI21_newspapers) C++17
4 / 100
1 ms 504 KB
//Dost SEFEROĞLU
#include <bits/stdc++.h>
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt")
using namespace std;
#define int long long
#define pii pair<int,int>
#define ff first
#define ss second
#define sp << " " <<    
#define all(cont) cont.begin(),cont.end()
#define vi vector<int>
const int MOD = 1e9+7,inf = 2e18;
const int N = 2e5+50,Q = 2e5+50;
const int B = 500;


void solve() { 
    int n,m;
    cin >> n >> m;
    vi deg(n+1,0);
    for (int i=1;i<=m;i++) {
        int a,b;
        cin >> a >> b;
        deg[a]++,deg[b]++;
    }
    if (m > n-1) {
        cout << "NO\n";
        return;
    }
    cout << "YES\n";
    cout << 1 << '\n';
    cout << 1 << '\n';
    
}                    
                             
signed main() { 
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    #ifdef Dodi
        freopen("in.txt","r",stdin);
        freopen("out.txt","w",stdout);
    #endif
    int t = 1;
    //cin >> t; 
    while (t --> 0) solve();
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
3 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
4 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
5 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
6 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
7 Correct 1 ms 336 KB Output is correct
8 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
9 Incorrect 1 ms 336 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Partially correct 1 ms 504 KB Failed to provide a successful strategy.
3 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
4 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
5 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
6 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
7 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
8 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
9 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
10 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
11 Partially correct 1 ms 504 KB Failed to provide a successful strategy.
12 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
13 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
14 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
15 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
16 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
17 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
18 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
19 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
20 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 336 KB Output is correct
2 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
3 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
4 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
5 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
6 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
7 Correct 1 ms 336 KB Output is correct
8 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
9 Incorrect 1 ms 336 KB Output isn't correct
10 Halted 0 ms 0 KB -