Submission #290064

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2900642020-09-03 11:01:37DystoriaXHorses (IOI15_horses)C++14
54 / 100
1588 ms33016 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:40:30: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   40 | void updateBIT(int x, int val){
      |                              ^
horses.cpp:37:13: note: shadowed declaration is here
   37 | vector<int> x, y;
      |             ^
horses.cpp: In function 'long long int qs(int)':
horses.cpp:44:19: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   44 | long long qs(int x){
      |                   ^
horses.cpp:37:13: note: shadowed declaration is here
   37 | vector<int> x, y;
      |             ^
horses.cpp: In function 'int GetValue()':
horses.cpp:139:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  139 |   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...