Submission #249603

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2496032020-07-15 10:37:23ryanseeTeams (IOI15_teams)C++14
77 / 100
1209 ms524292 KiB
#include "teams.h"
#include "bits/stdc++.h"
using namespace std;
#define FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
#define cbr cerr<<"hi\n"
#define mmst(x, v) memset((x), v, sizeof ((x)))
#define siz(x) ll(x.size())
#define all(x) (x).begin(), (x).end()
#define lbd(x,y) (lower_bound(all(x),y)-x.begin())
#define ubd(x,y) (upper_bound(all(x),y)-x.begin())
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); //can be used by calling rng() or shuffle(A, A+n, rng)
inline long long rand(long long x, long long y) { return rng() % (y+1-x) + x; } //inclusivesss
string inline to_string(char c) {string s(1,c);return s;} template<typename T> inline T gcd(T a,T b){ return a==0?llabs(b):gcd(b%a,a); }
using ll=long long;
using ld=long double;
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
using pi=pair<ll,ll>; using spi=pair<ll,pi>; using dpi=pair<pi,pi>;
#define LLINF ((long long)1e18)
#define INF int(1e9+1e6)
#define MAXN (500006)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

teams.cpp: In function 'void init(int, int*, int*)':
teams.cpp:73:21: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
  seg[0]=new node(0,n+1,1);
                    ~^~
teams.cpp:11:11: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
 #define s second
           ^
teams.cpp:77:35: note: in expansion of macro 's'
    seg[i]=seg[i]->update(v.back().s,1);
                                   ^
teams.cpp: In function 'int can(int, int*)':
teams.cpp:14:16: warning: conversion to 'std::vector<int>::value_type {aka int}' from 'll {aka long long int}' may alter its value [-Wconversion]
 #define siz(x) ll(x.size())
                ^~~~~~~~~~~~
teams.cpp:99:27: note: in expansion of macro 'siz'
      vector<int>start(n+2,siz(v)),endd(n+2,siz(v));
                           ^~~
teams.cpp:14:16: warning: conversion to 'std::vector<int>::value_type {aka int}' from 'll {aka long long int}' may alter its value [-Wconversion]
 #define siz(x) ll(x.size())
                ^~~~~~~~~~~~
teams.cpp:99:44: note: in expansion of macro 'siz'
      vector<int>start(n+2,siz(v)),endd(n+2,siz(v));
                                            ^~~
teams.cpp:101:50: warning: conversion to '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}' from 'll {aka long long int}' may alter its value [-Wconversion]
          FOR(j,i==0?0:v[i-1].f+1,v[i].f)start[j]=i;
                                                  ^
teams.cpp:102:49: warning: conversion to '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}' from 'll {aka long long int}' may alter its value [-Wconversion]
          FOR(j,i==0?0:v[i-1].f,v[i].f-1)endd[j]=i;
                                                 ^
teams.cpp:10:11: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
 #define f first
teams.cpp:110:41: note: in expansion of macro 'f'
       bet[i][j]=seg[v[i].f]->rmq(v[j-1].f,j == siz(v) ? n+1 : (v[j].f-1));
                                         ^
teams.cpp:110:55: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
       bet[i][j]=seg[v[i].f]->rmq(v[j-1].f,j == siz(v) ? n+1 : (v[j].f-1));
                                           ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
teams.cpp:110:55: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
teams.cpp:10:11: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
 #define f first
teams.cpp:111:50: note: in expansion of macro 'f'
       if(i) bet[i][j]-=seg[v[i-1].f]->rmq(v[j-1].f,j == siz(v) ? n+1 : (v[j].f-1));
                                                  ^
teams.cpp:111:64: warning: conversion to 'int' from 'll {aka long long int}' may alter its value [-Wconversion]
       if(i) bet[i][j]-=seg[v[i-1].f]->rmq(v[j-1].f,j == siz(v) ? n+1 : (v[j].f-1));
                                                    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
teams.cpp:111:64: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...