Submission #164311

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1643112019-11-19 07:31:50qwerty234Werewolf (IOI18_werewolf)C++14
100 / 100
1261 ms141424 KiB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define f first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
using namespace std;
const int N = 4e5 + 123;
struct query {
int La, Ra, Lb, Rb, id;
} qq[N];
struct qwe{
int k, id, Lb, Rb;
};
vector <qwe> qe[N];
int n, m, q, S[N], E[N], L[N], R[N], Pmin[N], Pmax[N], p[N], sz[N], val[N];
int rootL[N], rootR[N], tinm[N], toutm[N], tin[N], tout[N], timer = 0, tmn[N], tmx[N];
int t[4 * N], to[N], a1[N];
vector <int> Qmin[N], Qmax[N], g[N], gmin[N], gmax[N];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

werewolf.cpp: In function 'void dfsmax(int, int)':
werewolf.cpp:67:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < gmax[u].size(); i++)
                     ~~^~~~~~~~~~~~~~~~
werewolf.cpp: In function 'void dfsmin(int, int)':
werewolf.cpp:77:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < gmin[u].size(); i++)
                     ~~^~~~~~~~~~~~~~~~
werewolf.cpp: In function 'std::vector<int> check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
werewolf.cpp:138:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int j = 0; j < g[i].size(); j++) {
                      ~~^~~~~~~~~~~~~
werewolf.cpp:144:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int j = 0; j < Qmin[i].size(); j++) {
                      ~~^~~~~~~~~~~~~~~~
werewolf.cpp:151:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int j = 0; j < g[i].size(); j++) {
                      ~~^~~~~~~~~~~~~
werewolf.cpp:157:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int j = 0; j < Qmax[i].size(); j++) {
                      ~~^~~~~~~~~~~~~~~~
werewolf.cpp:201:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (int i = 0; i < q; i++)
     ^~~
werewolf.cpp:203:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  build(1, 1, n);
  ^~~~~
werewolf.cpp:206:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      for (int j = 0; j < qe[i].size(); j++) {
                      ~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...