Submission #32064

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
320642017-09-24 06:04:16imeimi2000Roller Coaster Railroad (IOI16_railroad)C++14
30 / 100
416 ms48732 KiB
#include "railroad.h"
#include <algorithm>
using namespace std;
typedef long long llong;
typedef pair<int, int> pi;
int n;
vector<int> comp;
int bsearch(int x) {
int s = 0, e = comp.size() - 1, m;
while (s < e) {
m = (s + e) / 2;
if (comp[m] == x) return m;
if (comp[m] < x) s = m + 1;
else e = m - 1;
}
return s;
}
int degree[400000];
int group[400000];
int par[400000];
vector<int> edge[400000];
pi mst[400000];
void dfs(int x, int s) {
group[x] = s;
for (int i : edge[x]) {
if (group[i] > 0) continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:58:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i + 1 < comp.size(); ++i) {
                        ^
railroad.cpp:71:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < comp.size(); ++i) {
                    ^
railroad.cpp:75:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0, j = 0; i + 1 < comp.size(); ++i) {
                               ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...