# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
150550 | 2019-09-01T08:37:26 Z | お前はもう死んでいる(#3784, kuroni, nvmdava, tfg) | 로카히아 유적 (FXCUP4_lokahia) | C++17 | 10 ms | 696 KB |
#include "lokahia.h" #include <bits/stdc++.h> using namespace std; int FindBase(int N){ vector<vector<int> > s, t, de; vector<int> la; for(int i = 0; i < N; i++) s.push_back({i}); while(s.size() > 1){ for(int i = 1; i < s.size(); i += 2){ if(CollectRelics(s[i - 1][0], s[i][0]) == -1){ de.push_back(s[i - 1]); de.push_back(s[i]); } else { for(int& x : s[i - 1]) s[i].push_back(x); t.push_back(s[i]); } } if(s.size() & 1){ de.push_back(s.back()); la = s.back(); } swap(s, t); t.clear(); } int sz = 0; if(s.empty()) s.push_back(la); else sz = s[0].size(); if(s[0].empty()) return -1; int res = 0; for(auto& x : de){ int rrr = CollectRelics(x[0], s[0][0]); if(rrr != -1){ res = rrr; sz += x.size(); } } if(sz > N / 2) return res; return -1; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 640 KB | Wrong |
2 | Incorrect | 6 ms | 640 KB | Wrong |
3 | Correct | 7 ms | 640 KB | Correct : C = 272 |
4 | Correct | 5 ms | 640 KB | Correct : C = 60 |
5 | Incorrect | 7 ms | 640 KB | Wrong |
6 | Correct | 6 ms | 640 KB | Correct : C = 274 |
7 | Correct | 5 ms | 640 KB | Correct : C = 158 |
8 | Correct | 6 ms | 640 KB | Correct : C = 118 |
9 | Correct | 6 ms | 640 KB | Correct : C = 198 |
10 | Incorrect | 6 ms | 512 KB | Wrong |
11 | Correct | 6 ms | 640 KB | Correct : C = 271 |
12 | Correct | 10 ms | 640 KB | Correct : C = 163 |
13 | Correct | 6 ms | 640 KB | Correct : C = 164 |
14 | Correct | 5 ms | 384 KB | Correct : C = 163 |
15 | Correct | 6 ms | 640 KB | Correct : C = 119 |
16 | Correct | 5 ms | 512 KB | Correct : C = 4 |
17 | Correct | 6 ms | 696 KB | Correct : C = 100 |
18 | Correct | 5 ms | 512 KB | Correct : C = 0 |
19 | Correct | 6 ms | 640 KB | Correct : C = 199 |
20 | Correct | 6 ms | 640 KB | Correct : C = 105 |
21 | Incorrect | 5 ms | 640 KB | Wrong |
22 | Correct | 6 ms | 640 KB | Correct : C = 264 |
23 | Correct | 6 ms | 640 KB | Correct : C = 264 |
24 | Correct | 6 ms | 640 KB | Correct : C = 163 |
25 | Incorrect | 6 ms | 640 KB | Wrong |
26 | Correct | 6 ms | 640 KB | Correct : C = 272 |
27 | Correct | 6 ms | 640 KB | Correct : C = 131 |