# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1184900 | islam_2010 | Connecting Supertrees (IOI20_supertrees) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#include "supertrees.h"
#define all(x) x.begin(), x.end()
#define int long long
#define pii pair<int, int>
using namespace std;
const int sz = 1e5 + 5;
const int mod = 1e9+7;
int binpow(int x, int n){
int res = 1;
n%=mod;
while (n > 0){
if(n&1){
res = res * x % mod;
}x = x * x % mod;
n/=2;
}return res;
}
int gcd(int a, int b){
if(b == 0){
return a;
}
return gcd(b, a % b);
}
bool is_prime(int n){
if(n==1){
return false;
}if(n==2){
return true;
}
for(int i = 2; i * i <= n; i++){
if(n%i==0){
return false;
}
}return true;
}
int construct(vector<vector<int>> p){
int n = p.size();
bool flag=true;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
if(p[i][j]!='1'){
flag=false;
break;
}
}if(!flag){
break;
}
}if(flag){
return 1;
}
}
// signed main() {
// ios_base::sync_with_stdio(false);
// cin.tie(0);
// return 0;
// }