# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
701696 | scottchou | Preokret (COCI18_preokret) | C++17 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n;
vector<pair<int, bool> > a;
int x, cnt = 0;
for(int i = 0; i < n; i++){
cin >> x;
if(x <= 1440)
cnt++;
a.push_back({x, 0});
}
cin >> m;
for(int i = 0; i < m; i++){
cin >> x;
if(x <= 1440)
cnt++;
a.push_back({x, 1});
}
sort(a.begin(), a.end());
cout << cnt << '\n';
int aa = !a[0].second, bb = a[0].second;
bool now_win = a[0].second;
int cnt2 = 0;
for(int i = 1; i < a.size(); i++){
aa += !a[i].second; bb += a[i].second;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |