# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
714127 | mongla | Preokret (COCI18_preokret) | C++17 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
long long n,m,ans=0,anss=0,ld;
int a[3000],b[3000],jsa[3000],jsb[3000];
int main(){
cin>>n;
for(int i=1; i<=n; i++){
cin>>a[i];
if(a[i]<=1440) ans++;
jsa[a[i]]=1;
}
scanf("%lld",&m);
for(int i=1; i<=m; i++){
cin>>b[i];
if(b[i]<=1440) ans++;
jsb[b[i]]=1;
}
cout<<ans<<endl;
for(int i=1; i<=3000; i++)
jsa[i]+=jsa[i-1],jsb[i]+=jsb[i-1];
for(int i=1; i<=3000; i++)
{
if(jsa[i]>jsb[i] && jsa[i-1]==jsb[i-1] && ld==2)
anss++;
if(jsa[i]<jsb[i] && jsa[i-1]==jsb[i-1] && ld==1)
anss++;
if(jsa[i]!=jsb[i])
{
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |