Submission #288249

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2882492020-09-01 10:51:25DystoriaXHorses (IOI15_horses)C++14
57 / 100
1579 ms38776 KiB
#include "horses.h"
#include <algorithm>
#include <vector>
#include <iostream>
#include <assert.h>
#define lc (i << 1)
#define rc (1 | (i << 1))
using namespace std;
const int MOD = 1e9 + 7;
int add(long long a, long long b){
return (a + b) % MOD;
}
int mul(long long a, long long b){
return (a * b) % MOD;
}
struct Node{
int val, mx;
Node(){
val = mx = 0;
}
};
Node st[4 * 500010];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp: In function 'int add(long long int, long long int)':
horses.cpp:15:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   15 |  return (a + b) % MOD;
      |         ~~~~~~~~^~~~~
horses.cpp: In function 'int mul(long long int, long long int)':
horses.cpp:19:17: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   19 |  return (a * b) % MOD;
      |         ~~~~~~~~^~~~~
horses.cpp: In function 'void updateBIT(int, int)':
horses.cpp:37:30: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   37 | void updateBIT(int x, int val){
      |                              ^
horses.cpp:34:13: note: shadowed declaration is here
   34 | vector<int> x, y;
      |             ^
horses.cpp: In function 'long long int qs(int)':
horses.cpp:41:19: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   41 | long long qs(int x){
      |                   ^
horses.cpp:34:13: note: shadowed declaration is here
   34 | vector<int> x, y;
      |             ^
horses.cpp: In function 'int GetValue()':
horses.cpp:133:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  133 |   int yval = queryMax(0, n - 1, idx, nxt, 1);
      |              ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#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...