제출 #1130684

#제출 시각아이디문제언어결과실행 시간메모리
1130684vibeduck송신탑 (IOI22_towers)C++20
0 / 100
273 ms1036 KiB
#include "towers.h" #include <vector> int ans = 1; int k = -1; void init(int N, std::vector<int> H) { if (N == 1) return; if (N == 2) return; if (H[0] > H[1] || H[N - 2] < H[N - 1]) return; for (int i = 0; i < N; i++) { if (H[i] > H[i + 1]) { k = i; break; } } return; } int max_towers(int L, int R, int D) { if (k == -1) return 1; if (R - L + 1 < 3) return 1; if (L < k && k < R) return 3; else return 1; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...