8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8853a7c commit f8bdb74Copy full SHA for f8bdb74
0x0D/solutions/14890.cpp
@@ -1,6 +1,6 @@
1
// Authored by : jihwan0123
2
// Co-authored by : BaaaaaaaaaaarkingDog
3
-// http://boj.kr/9187f01ead404a5388ea1df4e7140121
+// http://boj.kr/f7b9b1367b054a08a753f1096b829b26
4
#include <bits/stdc++.h>
5
using namespace std;
6
@@ -25,7 +25,7 @@ bool check(vector<int>& line){
25
}
26
else { // 다음 칸이 더 낮으면
27
// l 길이 만큼 길이 없으면 경사로 설치 불가
28
- if (idx + l > n) return 0;
+ if (idx + l >= n) return 0;
29
for (int i = idx + 1; i < idx + l; i++)
30
if (line[i] != line[i + 1]) return 0;
31
idx = idx + l; // 경사로 설치했으면, 설치한 칸부터 다음칸과 비교
0 commit comments