# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104615 | teomrn | Tug of War (BOI15_tug) | C++14 | 885 ms | 11172 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 <stdio.h>
#include <set>
#include <assert.h>
#include <vector>
#include <algorithm>
#include <map>
#include <math.h>
#include <iostream>
using namespace std;
const int NMAX = 60010;
namespace FindCycles {
set <int> who_wants_me[NMAX];
int i_want[NMAX][2];
int power[NMAX];
int n;
int ans[2];
bool choosen[NMAX];
void make_him_choose(int id) {
for (int c = 0; c <= 1; c++) {
int where = i_want[id][c];
if (who_wants_me[where].size() == 1) {
/// eu sunt ala
// cout << id << " m-am dus la " << where << '\n';
choosen[id] = 1;
ans[where > n] += power[id];
who_wants_me[where].erase(id);
Compilation message (stderr)
# | 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... |