# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
166064 | itiam | Preokret (COCI18_preokret) | C++11 | 3 ms | 380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
int La[2883],Lb[2883];
int main(){
int Na,Nb,x,m=0,mm,pp=0,brop=0; //pp=prije poluvremena, brop=brojac preokreta, m=max, mm=minimal..
cin >> Na;
for (int i=0;i<Na;i++){
cin >> x;
if (x>m) m=x;
if (x<mm || i==0) mm=x;
if (x<=1440) pp+=1;
La[x]=1;
}
cin >> Nb;
for (int i=0;i<Nb;i++){
cin >> x;
if (x>m) m=x;
if (x<mm) mm=x;
if (x<=1440) pp+=1;
Lb[x]=1;
}
int p=0,pv;
if (La[mm]==1) pv=-1;
else if (Lb[mm]==1) pv=1;
for (int i=mm;i<=m;i++){
if (La[i]==1){
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |