Submission #284563

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2845632020-08-27 16:12:13_7_7_Horses (IOI15_horses)C++14
0 / 100
770 ms41088 KiB
#include "horses.h"
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
//#define int long long
//#pragma GCC optimize("Ofast")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#define file(s) freopen(s".in","r",stdin); freopen(s".out","w",stdout);
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define all(x) x.begin(), x.end()
#define sz(s) (int)s.size()
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define s second
#define f first
typedef pair < long long, long long > pll;
typedef pair < int, int > pii;
typedef unsigned long long ull;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp: In function 'void build(int, int, int)':
horses.cpp:61:44: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   61 |  tt[v] = tt[v << 1] * 1ll * tt[v << 1 | 1] % mod;
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'void updX(int, int, int, int, int)':
horses.cpp:64:65: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   64 | void updX (int pos, int x, int v = 1, int tl = 0, int tr = n - 1) {
      |                                                                 ^
horses.cpp:45:31: note: shadowed declaration is here
   45 | int t[N << 2], tt[N << 2], n, x[N], y[N];
      |                               ^
horses.cpp:76:44: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
   76 |  tt[v] = tt[v << 1] * 1ll * tt[v << 1 | 1] % mod;
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'void updY(int, int, int, int, int)':
horses.cpp:80:65: warning: declaration of 'x' shadows a global declaration [-Wshadow]
   80 | void updY (int pos, int x, int v = 1, int tl = 0, int tr = n - 1) {
      |                                                                 ^
horses.cpp:45:31: note: shadowed declaration is here
   45 | int t[N << 2], tt[N << 2], n, x[N], y[N];
      |                               ^
horses.cpp: In function 'int getX(int, int, int, int, int)':
horses.cpp:104:79: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  104 |  return getX(l, r, v << 1, tl, tm) * 1ll * getX(l, r, v << 1 | 1, tm + 1, tr) % mod;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int solve()':
horses.cpp:164:40: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
  164 |  return getX(0, V[j].f) * 1ll * V[j].s % mod;
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
#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...