# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
480985 | pure_mem | Tug of War (BOI15_tug) | C++17 | 641 ms | 8448 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define ll long long
#define X first
#define Y second
#define MP make_pair
using namespace std;
const int N = 6e4 + 1, M = 10 * N;
const int mod = 1e9 + 7;
int n, k, deg[N], vis[N], w[N];
vector< pair<int, int> > g[N];
bitset<M> dp;
int main() {
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
cin >> n >> k;
int sum = 0;
for(int i = 1, x, y;i <= n + n;i++) {
cin >> x >> y >> w[i], y += n;
g[x].push_back(MP(y, i)), deg[x]++;
g[y].push_back(MP(x, i)), deg[y]++;
}
{
set< pair<int, int> > st;
for(int i = 1;i <= n + n;i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |