Submission #70766061


Source Code Expand

#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i,l,r)for(int i=(l);i<(r);++i)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; --i)
#define rrep2(i,l,r)for(int i=(r) - 1;i>=(l);--i)
#define all(x) (x).begin(),(x).end()
#define allR(x) (x).rbegin(),(x).rend()
#define P pair<int,int>
template<typename A, typename B> inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; }
template<typename A, typename B> inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; }

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	int n, m, k; cin >> n >> m >> k;
	vector<int>h(n), b(m);
	rep(i, n)cin >> h[i];
	rep(i, m)cin >> b[i];
	sort(all(h));
	sort(all(b));
	bool chk = true;
	rep(i, k) {
		int j = m - k + i;
		if (h[i] > b[j])chk = false;
	}
	cout << (chk ? "Yes" : "No") << endl;
	return 0;
}

Submission Info

Submission Time
Task C - Robot Factory
User kwm_t
Language C++23 (GCC 15.2.0)
Score 300
Code Size 1203 Byte
Status AC
Exec Time 37 ms
Memory 5064 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 35
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3612 KiB
00_sample_01.txt AC 1 ms 3544 KiB
00_sample_02.txt AC 1 ms 3664 KiB
00_sample_03.txt AC 1 ms 3532 KiB
01_random_03.txt AC 37 ms 4944 KiB
01_random_04.txt AC 37 ms 4972 KiB
01_random_05.txt AC 37 ms 4988 KiB
01_random_06.txt AC 37 ms 4928 KiB
01_random_07.txt AC 37 ms 4980 KiB
01_random_08.txt AC 37 ms 5052 KiB
01_random_09.txt AC 37 ms 5064 KiB
01_random_10.txt AC 37 ms 5056 KiB
01_random_11.txt AC 37 ms 4980 KiB
01_random_12.txt AC 17 ms 4032 KiB
01_random_13.txt AC 18 ms 4048 KiB
01_random_14.txt AC 24 ms 4288 KiB
01_random_15.txt AC 11 ms 3776 KiB
01_random_16.txt AC 10 ms 3820 KiB
01_random_17.txt AC 12 ms 3836 KiB
01_random_18.txt AC 37 ms 4968 KiB
01_random_19.txt AC 37 ms 4972 KiB
01_random_20.txt AC 37 ms 4964 KiB
01_random_21.txt AC 37 ms 4916 KiB
01_random_22.txt AC 37 ms 4928 KiB
01_random_23.txt AC 17 ms 4092 KiB
01_random_24.txt AC 2 ms 3656 KiB
01_random_25.txt AC 34 ms 4860 KiB
01_random_26.txt AC 37 ms 4936 KiB
01_random_27.txt AC 37 ms 4968 KiB
01_random_28.txt AC 37 ms 4968 KiB
01_random_29.txt AC 37 ms 4928 KiB
01_random_30.txt AC 37 ms 4944 KiB
01_random_31.txt AC 23 ms 4296 KiB
01_random_32.txt AC 27 ms 4540 KiB
01_random_33.txt AC 26 ms 4424 KiB