제출 #100103

#제출 시각아이디문제언어결과실행 시간메모리
100103SomeoneUnknownRoller Coaster Railroad (IOI16_railroad)C++14
0 / 100
2009 ms4240 KiB
#include "railroad.h" #include <bits/stdc++.h> using namespace std; long long plan_roller_coaster(vector<int> s, vector<int> t) { long long tal = 0; int p2[s.size()]; for(int i = 0; i < s.size(); i++){ p2[i] = i; } do{ long long p = 1; long long subtal = 0; for(int i = 0; i < s.size(); i++){ subtal += max(0LL, p-s[p2[i]]); p = t[p2[i]]; } tal = max(tal, subtal); }while(next_permutation(p2, p2+s.size())); return tal; }

컴파일 시 표준 에러 (stderr) 메시지

railroad.cpp: In function 'long long int plan_roller_coaster(std::vector<int>, std::vector<int>)':
railroad.cpp:8:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < s.size(); i++){
                    ~~^~~~~~~~~~
railroad.cpp:14:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i = 0; i < s.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...