제출 #195570

#제출 시각아이디문제언어결과실행 시간메모리
195570theStaticMindMeetings (JOI19_meetings)C++14
0 / 100
3 ms564 KiB
#include "meetings.h" #include<bits/stdc++.h> #define pb push_back #define ii pair<int,int> #define all(x) (x).begin(),(x).end() #define INF 100000000000000000 #define modulo 1000000007 #define mod 998244353 using namespace std; void dp(vector<int> data,int curr){ if(data.empty())return; int big=data[0]; vector<int>sub,other; sub.pb(big); for(int i=1;i<data.size();i++){ if(data[i]==big)continue; int q=Query(big,curr,data[i]); if(q==curr)other.pb(data[i]); else{ sub.pb(data[i]); big=q; } } Bridge(curr,big); sub.erase(find(all(sub),big)); dp(sub,big); dp(other,curr); } void Solve(int N){ vector<int>arr(N); for(int i=1;i<N;i++)cin>>arr[i]; dp(arr,0); }

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

meetings.cpp: In function 'void dp(std::vector<int>, int)':
meetings.cpp:16:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int i=1;i<data.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...