Submission #303308

#TimeUsernameProblemLanguageResultExecution timeMemory
303308Vimmer슈퍼트리 잇기 (IOI20_supertrees)C++14
0 / 100
1 ms384 KiB
#include <bits/stdc++.h>
#include "supertrees.h"
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

#define N 200005
#define PB push_back
#define sz(x) int(x.size())
#define P 31
#define F first
#define M ll(1e9 + 7)
#define S second
#define all(x) x.begin(), x.end()
#define endl '\n'

//#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("-O3")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("fast-math")
//#pragma GCC optimize("no-stack-protector")

using namespace std;
//using namespace __gnu_pbds;

typedef long long ll;

//typedef tree<int, null_type, less_equal <int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

ll mlt(ll a, ll b) {return (a * b) % M;}
ll sm(ll a, ll b) {return (a + b) % M;}

int construct(vector<vector<int> > p)
{
	int n = sz(p);

	vector<vector<int> > answer; answer.clear();

    bool f = 1;

    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++) if (p[i][j] != 1) f = 0;

    if (f)
    {
        answer.resize(n);

        for (int i = 0; i < n; i++)
            answer[i].resize(n, 0);

        for (int i = 1; i < n; i++) answer[0][i] = 1;
    }

	build(answer);

	return 1;
}

//int main()
//{
////    freopen("help.in", "r", stdin); freopen("help.out", "w", stdout);
//
//    ios_base::sync_with_stdio(0); istream::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...