Submission #38866

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
388662018-01-07 11:56:2914kgHorses (IOI15_horses)C++11
17 / 100
183 ms19268 KiB
#include "horses.h"
#define MOD 1000000007
#define N 500001
#define NN 1048576
struct NUM {
bool big_num;
int num;
void push(bool _big_num, int _num) {
big_num = _big_num, num = _num;
}
} tree1[NN], one;
int n, nn, tree2[NN], Y[N];
NUM mul(NUM x, NUM y) {
long long tx = x.num, ty = y.num, temp = (tx*ty) % MOD;
NUM res;
res.push(tx*ty >= MOD, (int)temp);
return res;
}
long long ll_mul(long long x, long long y) {
return x*y;
}
NUM get_tree1(int lev, int l, int r, int x, int y) {
int mid = (l + r) / 2;
if (x <= l && r <= y) return tree1[lev];
if (r < x || y < l) return one;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp:58:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateX(int pos, int val) { 
                 ^
horses.cpp:58:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateX(int pos, int val) { 
                          ^
horses.cpp:62:17: warning: unused parameter 'pos' [-Wunused-parameter]
 int updateY(int pos, int val) {
                 ^
horses.cpp:62:26: warning: unused parameter 'val' [-Wunused-parameter]
 int updateY(int pos, int val) {
                          ^
#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...