Submission #400797

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4007972021-05-08 16:43:33idk321Ancient Books (IOI17_books)C++11
50 / 100
334 ms106116 KiB
#include "books.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1000000;
bool vis[N];
/*
bool tree[4 * N];
void push(int node)
{
if (tree[node])
{
tree[node * 2] = true;
tree[node * 2 +1] = true;
}
}
void ins(int from, int to, int a, int b, int node)
{
if (from <= a && b <= to)
{
tree[node] = true;
return;
}
push(node);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:94:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   94 |     for (int i = 1; i < ivals.size(); i++)
      |                     ~~^~~~~~~~~~~~~~
books.cpp:111:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  111 |     for (int i = 1; i < together.size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~
books.cpp:126:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  126 |     for (int i = 0; i < together.size(); i++)
      |                     ~~^~~~~~~~~~~~~~~~~
books.cpp:138:13: warning: unused variable 'cr' [-Wunused-variable]
  138 |         int cr = 0;
      |             ^~
books.cpp:139:13: warning: unused variable 'cl' [-Wunused-variable]
  139 |         int cl = 0;
      |             ^~
books.cpp:140:13: warning: unused variable 'cur' [-Wunused-variable]
  140 |         int cur = s;
      |             ^~~
#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...