Submission #218204

#TimeUsernameProblemLanguageResultExecution timeMemory
218204EntityIT라멘 (JOI14_ramen)C++14
100 / 100
6 ms384 KiB
#include<bits/stdc++.h> using namespace std; #include "ramen.h" #define all(x) (x).begin(), (x).end() #define sz(x) ( (int)(x).size() ) using LL = long long; mt19937 rng( (uint32_t)chrono::steady_clock::now().time_since_epoch().count() ); void Ramen(int N) { vector<int> small, big; for (int i = 0; i < N; i += 2) { if (i + 1 < N) { if (~Compare(i, i + 1) ) { big.emplace_back(i + 1); small.emplace_back(i); } else { big.emplace_back(i); small.emplace_back(i + 1); } } else { small.emplace_back(i); big.emplace_back(i); } } int x = big[0]; for (int i = 1; i < sz(big); ++i) if (~Compare(x, big[i]) ) x = big[i]; int y = small[0]; for (int i = 1; i < sz(small); ++i) if (~Compare(small[i], y) ) y = small[i]; Answer(x, y); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...