제출 #812310

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8123102023-08-07 08:20:36Hanksburger즐거운 행로 (APIO20_fun)C++17
26 / 100
11 ms2772 KiB
#include "fun.h"
#include <bits/stdc++.h>
using namespace std;
int dist[100005], bad[100005], n;
vector<int> adj[100005], ans;
queue<pair<int, int> > q;
void recur(int u)
{
vector<int> vecL, vecR;
if (u*2+1<n)
vecL.push_back(u*2+1);
for (int i=0; i<vecL.size(); i++)
{
if (vecL[i]*2+1<n)
vecL.push_back(vecL[i]*2+1);
if (vecL[i]*2+2<n)
vecL.push_back(vecL[i]*2+2);
}
if (u*2+2<n)
vecR.push_back(u*2+2);
for (int i=0; i<vecR.size(); i++)
{
if (vecR[i]*2+1<n)
vecR.push_back(vecR[i]*2+1);
if (vecR[i]*2+2<n)
vecR.push_back(vecR[i]*2+2);
}
reverse(vecL.begin(), vecL.end());
reverse(vecR.begin(), vecR.end());
for (int i=0; i<vecR.size(); i++)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

fun.cpp: In function 'void recur(int)':
fun.cpp:12:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |     for (int i=0; i<vecL.size(); i++)
      |                   ~^~~~~~~~~~~~
fun.cpp:21:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     for (int i=0; i<vecR.size(); i++)
      |                   ~^~~~~~~~~~~~
fun.cpp:30:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   30 |     for (int i=0; i<vecR.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...
#Verdict Execution timeMemoryGrader output
Fetching results...