# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1068104 | AlphaBruh | Soccer Stadium (IOI23_soccer) | C++17 | 198 ms | 39576 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "soccer.h"
#include<bits/stdc++.h>
using namespace std;
#define P pair<int,int>
int tot=0;
P emprg(vector<int>x){
P ret;
int cnt=0,fst=x.size(),lst=-1;
for(int i=0;i<x.size();i++){
if(x[i]==0){
cnt++;
fst=min(fst,i);
lst=max(lst,i);
}
}
tot+=cnt;
if(lst-fst+1 == cnt){
ret.first=fst;
ret.second=lst;
return ret;
}
ret.first=-2;
return ret;
}
int rla(P prf, P nxt){
if(prf.first == nxt.first && prf.second == nxt.second) return 0;
if (prf.first <= nxt.first && prf.second >= nxt.second) return -1;
if(prf.first >= nxt.first && prf.second <= nxt.second) return 1;
return -2;
}
int biggest_stadium(int N, std::vector<std::vector<int>> F)
{
bool inc=1;
tot=0;
P prf;
vector<P>allr;
for(int i=0;i<N;i++){
P get(emprg(F[i]));
if(get.first==-2) return 0;
if(i>0){
int x=rla(prf,get);
if(x==-2) return 0;
else if(x==-1) inc=0;
else if(x==1 && inc==0) return 0;
}
prf=get;
allr.push_back(get);
}
for(int i=0;i<N;i++){
for(int j=0;j<i;j++){
if(rla(allr[i],allr[j])==-2) return 0;
}
}
return tot;
}
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |