제출 #223119

#제출 시각아이디문제언어결과실행 시간메모리
223119AQTMeetings (JOI19_meetings)C++14
0 / 100
6 ms512 KiB
#include "meetings.h" #include <bits/stdc++.h> using namespace std; void rec(vector<int> v){ if(v.size() == 1){ return; } int c = v[0]; vector<vector<int>> st; for(int i = 1; i<v.size(); i++){ int n = v[i]; bool b = 0; for(int j = 0; j<st.size(); j++){ if(Query(n, st[j][0], c) != c){ b = 1; st[j].push_back(n); break; } } if(!b){ st.push_back({n}); } } for(auto k : st){ vector<int> lst; if(k.size() == 1){ continue; } int lca = Query(k[0], k[1], c); for(int j = 2; j<k.size(); j++){ lca = Query(lca, k[j], c); } lst.push_back(lca); Bridge(lca, c); for(int n : k){ if(lca != n){ lst.push_back(n); } } rec(lst); } } void Solve(int N) { vector<int> v; for(int i = 0; i<N; i++){ v.push_back(i); } }

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

meetings.cpp: In function 'void rec(std::vector<int>)':
meetings.cpp:12:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 1; i<v.size(); i++){
                 ~^~~~~~~~~
meetings.cpp:15:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j<st.size(); j++){
                  ~^~~~~~~~~~
meetings.cpp:32:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 2; j<k.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...