제출 #1363843

#제출 시각아이디문제언어결과실행 시간메모리
1363843weedywelonRoller Coaster Railroad (IOI16_railroad)C++20
0 / 100
44 ms4284 KiB
#include "railroad.h"
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <limits.h>
#include <set>
#include <string>
#include <queue>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <deque>
#include <map>
#include <chrono>
#include <random>
#include <bitset>
#include <tuple>
#define SZ(x) int(x.size())
#define FR(i,a,b) for(int i=(a);i<(b);++i)
#define FOR(i,n) FR(i,0,n)
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define A first
#define B second
#define mp(a,b) make_pair(a,b)
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef unsigned __int128 U128;
typedef __int128 I128;
typedef std::pair<int,int> PII;
typedef std::pair<LL,LL> PLL;
using namespace std;

LL plan_roller_coaster(vector<int> s, vector<int> t){
	int n=SZ(s);
	sort(s.begin(),s.end());
	t.push_back(1);
	sort(t.begin(),t.end());
	
	FOR(i,n){
		int x=s[i];
		int cnt=upper_bound(t.begin(),t.end(),x)-t.begin();
		if (cnt<i+1) return 1;
	}
	return 0;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…