Compare commits

...

2 Commits

Author SHA1 Message Date
ag
74cad036f8 deleted .vscode 2024-09-17 12:21:53 +03:00
ag
03036ff185 last commit 2024-09-17 10:24:26 +03:00
2 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
*.o
*
*.vscode

View File

@ -21,7 +21,7 @@ public:
TwoCache(size_t q1sz, size_t q2sz): cpct_q1(q1sz), cpct_q2(q2sz) {} //ctor
void put_page(int id) {
if (umap1.find(id) != umap1.end()) { //page is in fast queue in the end, nothing to do (fast case)
if (umap1.find(id) != umap1.end()) { //page is found, nothing to do (fast case)
return;
} else if (umap2.find(id) != umap2.end()) {
q2.erase(umap2[id]); //if page is in slow put it in fast
@ -76,7 +76,7 @@ public:
answer += std::to_string(*i) + " ";
}
answer.pop_back();
answer.pop_back(); //delete last space
return answer;
}