Submission #132796

#TimeUsernameProblemLanguageResultExecution timeMemory
132796arthurconmyKralj (COCI16_kralj)C++14
56 / 140
314 ms19304 KiB
/* Arthur Conmy / arthurconmy */ #include <iostream> #include <fstream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <map> #include <queue> #include <bitset> #include <random> #include <stack> #include <deque> #include <chrono> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<bool> vb; typedef pair<int,int> pii; #define REP(i, a, b) for (int i = int(a); i <= int(b); i++) #define REPb(j, d, c) for (int j = int(d); j >= int(c); j--) #define ff first #define ss second #define pb push_back #define len(x) int((x).size()) #define endl "\n" int main() // LL OR INT?? { #ifdef ARTHUR_LOCAL ifstream cin("input.txt"); #endif ios_base::sync_with_stdio(0); cin.tie(0); int n; cin>>n; vi A; REP(i,1,n) { int a; cin>>a; A.pb(a); } vi D; REP(i,1,n) { int d; cin>>d; D.pb(d); } deque<int> E; REP(i,1,n) { int e; cin>>e; E.pb(e); } sort(D.rbegin(),D.rend()); sort(E.begin(),E.end()); int ans=0; REP(i,0,n-1) { if(E.back() >= D[i]) { ans++; E.pop_back(); } else { E.pop_front(); } } cout << ans << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...