# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
699028 | gghx | Alternating Heights (CCO22_day1problem1) | C++14 | 582 ms | 13980 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll n,k,qn;
cin>>n>>k>>qn;
ll arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
arr[i]--;
}
ll rightmost[n]; //the rightmost workable n
for(int i=0;i<n;i++) rightmost[i]=i;
ll right=0;
for(int i=0;i<n;i++){
//check range (i,right+1)
while(true){
rightmost[i]=right;
if(right>n-1) break;
right++;
vector<ll> adj[k],adj1[k];
bool bigger=true;
bool die=false;
for(int j=i;j<right-1;j++){
if(arr[j]==arr[j+1]){
die=true;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |