# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
166064 | itiam | Preokret (COCI18_preokret) | C++11 | 3 ms | 380 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |