Submission #138129

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1381292019-07-29 11:54:04claudyHorses (IOI15_horses)C++14
100 / 100
1059 ms50288 KiB
# include "horses.h"
//# pragma GCC optimize("Ofast,no-stack-protector")
//# pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
# pragma GCC optimize("Ofast")
# pragma GCC optimization ("unroll-loops")
# include "bits/stdc++.h"
/*
# include <ext/pb_ds/tree_policy.hpp>
# include <ext/pb_ds/assoc_container.hpp>
# include <ext/rope>
*/
std::pair<int,int> DR[] = {{-1,0},{0,1},{1,0},{0,-1},{-1,1},{-1,-1},{1,1},{1,-1}};
# define ll long long
# define clock (clock() * 1000.0 / CLOCKS_PER_SEC)
# define rc(s) return cout << s,0
# define rcg(s) cout << s;exit(0)
# define _ ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
# define db(x) cerr << #x << " = " << x << '\n'
# define pb push_back
# define mp make_pair
# define all(s) s.begin(),s.end()
# define sz(x) (int)((x).size())
# define int ll
using namespace std;
const int mod = 1e9 + 7;
set<int>s,S;
int fen[1 << 19],x[1 << 19],y[1 << 19],t[1 << 21],n,b[1 << 19];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

horses.cpp:5:0: warning: ignoring #pragma GCC optimization [-Wunknown-pragmas]
 # pragma GCC optimization ("unroll-loops")
 
horses.cpp: In function 'void upd(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:38:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid = l + r >> 1;
            ~~^~~
horses.cpp: In function 'long long int qry(long long int, long long int, long long int, long long int, long long int)':
horses.cpp:48:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  int mid = tl + tr >> 1;
            ~~~^~~~
horses.cpp: In function 'long long int f()':
horses.cpp:102:10: warning: declaration of 'i' shadows a previous local [-Wshadow]
  for(int i = 0;i < sz(vec);i++) b[i] = 1;
          ^
horses.cpp:85:6: note: shadowed declaration is here
  int i = pos;
      ^
horses.cpp:103:10: warning: declaration of 'i' shadows a previous local [-Wshadow]
  for(int i = 0;i < sz(vec);i++)
          ^
horses.cpp:85:6: note: shadowed declaration is here
  int i = pos;
      ^
horses.cpp:124:10: warning: declaration of 'i' shadows a previous local [-Wshadow]
  for(int i = 0;i < sz(vec);i++)
          ^
horses.cpp:85:6: note: shadowed declaration is here
  int i = pos;
      ^
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:147:10: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return f();
         ~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:175:10: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return f();
         ~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:185:10: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
  return f();
         ~^~
#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...