# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
757951 | BentoOreo | Towers (NOI22_towers) | C++14 | 1 ms | 212 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <unordered_map>
#include <deque>
#include <set>
#include <unordered_set>
#include <algorithm>
#define ll long long
using namespace std;
int max_count = 0;
unordered_map<int,pair<ll,ll> > copygarbage;
void recurse(unordered_map<int,pair<ll,ll> > gyms, ll level, int count){
if(gyms.size() == 0){
max_count = max(max_count,count);
} else {
for(auto elem: gyms){
if(level <= elem.second.first){//if level less than level cap
copygarbage = gyms;
copygarbage.erase(elem.first);
recurse(copygarbage, level + elem.second.second, count + 1);
}
}
max_count = max(max_count,count);//if I exhaust all I still need to check lol
}
}
int main(){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |