제출 #400978

#제출 시각아이디문제언어결과실행 시간메모리
400978jairRSFinding Routers (IOI20_routers)C++17
16 / 100
2 ms332 KiB
#include "routers.h" #define pb push_back using namespace std; std::vector<int> find_routers(int l, int n, int q) { vector<int> ans = {0}; int lastRouter = 0; int lastRouterIndex = 0; for (int i = 0; i <= l; i++) { int detected = use_detector(i); if(detected != lastRouter){ int nextRouter = (i - 1)*2; ans.pb(nextRouter); lastRouter = detected; lastRouterIndex = nextRouter; i = lastRouterIndex; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...