| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1160573 | andrei_n | Exam (eJOI20_exam) | C++20 | 11 ms | 1096 KiB |
#include <bits/stdc++.h>
using namespace std;
int a[100005],b[100005];
signed main()
{
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int n; cin>>n;
for(int i=1; i<=n; ++i) cin>>a[i];
for(int i=1; i<=n; ++i) cin>>b[i];
if(count(b+1, b+n+1, b[1]) == n)
{
int l = 0, cnt = 0;
bool have = false;
for(int i=1; i<=n; ++i)
{
if(a[i] == b[1])
have = true;
if(a[i] <= b[1])
++l;
else
{
if(have) cnt += l;
l = 0; have = false;
}
}
if(have) cnt += l;
cout<<cnt;
}
return 0;
}
| # | 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... | ||||
