답안 #488455

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
488455 2021-11-19T03:39:32 Z Wayne_Yan Newspapers (CEOI21_newspapers) C++17
4 / 100
1 ms 336 KB
#include <bits/extc++.h>
using namespace std;
using namespace __gnu_pbds;

typedef int64_t ll;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define pb emplace_back
#define mp make_pair
#define mt make_tuple
#define pii pair<int,int>
#define F(n) Fi(i,n)
#define Fi(i,n) Fl(i,0,n)
#define Fl(i,l,n) for(int i=l;i<n;i++)
#define RF(n) RFi(i,n)
#define RFi(i,n) RFl(i,0,n)
#define RFl(i,l,n) for(int i=n-1;i>=l;i--)
#define all(v) begin(v),end(v)
#define siz(v) (ll(v.size()))
#define get_pos(v,x) (lower_bound(all(v),x)-begin(v))
#define sort_uni(v) sort(begin(v),end(v)),v.erase(unique(begin(v),end(v)),end(v))
#define mem(v,x) memset(v,x,sizeof v)
#define ff first
#define ss second
#define mid ((l+r)>>1)
#define RAN(a,b) uniform_int_distribution<int> (a, b)(rng)

template <typename T> using max_heap = __gnu_pbds::priority_queue<T,less<T> >;
template <typename T> using min_heap = __gnu_pbds::priority_queue<T,greater<T> >;
template <typename T> using rbt = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

const int maxN = 1010;
vector<int> edges[maxN];

signed main(){
  
  int n,m;
  cin >> n >> m;
  F(m){
    int x,y;
    cin >> x >> y;
    edges[x].pb(y);
    edges[y].pb(x);
  }

  if(m == n-1){
    printf("YES\n1\n1\n");
  }else{
    printf("NO\n");
  }
  
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
3 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
4 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
5 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 332 KB Failed to provide a successful strategy.
7 Correct 1 ms 208 KB Output is correct
8 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
9 Incorrect 0 ms 208 KB Output isn't correct
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
3 Partially correct 0 ms 328 KB Failed to provide a successful strategy.
4 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
5 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
7 Partially correct 1 ms 208 KB Failed to provide a successful strategy.
8 Partially correct 1 ms 336 KB Failed to provide a successful strategy.
9 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
10 Partially correct 0 ms 328 KB Failed to provide a successful strategy.
11 Partially correct 1 ms 336 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 0 ms 204 KB Output is correct
2 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
3 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
4 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
5 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
6 Partially correct 0 ms 332 KB Failed to provide a successful strategy.
7 Correct 1 ms 208 KB Output is correct
8 Partially correct 0 ms 208 KB Failed to provide a successful strategy.
9 Incorrect 0 ms 208 KB Output isn't correct
10 Halted 0 ms 0 KB -