Submission #761760

#TimeUsernameProblemLanguageResultExecution timeMemory
761760Sohsoh84Jousting tournament (IOI12_tournament)C++17
0 / 100
8 ms852 KiB
#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>

using namespace std;
using namespace __gnu_pbds;

template<
typename Key, // Key type
typename Mapped, // Mapped-policy
typename Cmp_Fn = std::less<Key>, // Key comparison functor
typename Tag = rb_tree_tag, // Specifies which underlying data structure to use
template<
typename Const_Node_Iterator,
typename Node_Iterator,
typename Cmp_Fn_,
typename Allocator_>
class Node_Update = null_node_update, // A policy for updating node invariants
typename Allocator = std::allocator<char> > // An allocator type
class tree;

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

const int MAXN = 1e6 + 10;

int n;

namespace fenwick {
	int fen[2][MAXN];

	inline void update(int c, int ind, int val) {
		for (++ind; ind < MAXN; ind += ind & -ind)
			fen[c][ind] += val;
	}

	inline void update(int c, int l, int r, int val) {
		update(c, l, val);
		update(c, r + 1, -val);
	}

	inline int query(int c, int ind) {
		int ans = 0;
		for (++ind; ind > 0; ind -= ind & -ind)
			ans += fen[c][ind];
		
		return ans;
	}
}



int GetBestPosition(int N, int C, int R, int *K, int *S, int *E) {
	n = N;
	vector<int> bst;
	for (int i = 1; i < n; i++)
		if (K[i - 1] > R)
			bst.push_back(i);

	for (int i = 0; i < C; i++) {
		int l = S[i] + 1, r = E[i];
		
	}
	return 0;
}

Compilation message (stderr)

tournament.cpp: In function 'int GetBestPosition(int, int, int, int*, int*, int*)':
tournament.cpp:65:7: warning: unused variable 'l' [-Wunused-variable]
   65 |   int l = S[i] + 1, r = E[i];
      |       ^
tournament.cpp:65:21: warning: unused variable 'r' [-Wunused-variable]
   65 |   int l = S[i] + 1, r = E[i];
      |                     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...