用户输出
New Folder
New Folder (2)
New Folder (3)
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#116941 | #1465. [L1-3] 新建文件夹 - 副本 (3) - 副本 - 副本 | Accepted | 100 | 17 ms | 388 K | C++ 17 / 1.0 K | Sakura丶Charon | 2025-04-19 13:39:26 |
#pragma GCC optimize(3, "Ofast", "inline")
#include <bits/stdc++.h>
#ifdef ONLINE_JUDGE
#define debug(...)
#else
#include <debug.hpp>
#endif
#define int long long
#define x first
#define y second
using namespace std;
const int mod = 998244353; // 1e9 + 7;
void pre() {}
void solve() {
vector<string> s;
int cnt = 1;
for (int i = 0; i < 3; i++) {
int op;
cin >> op;
if (op == 1) {
string t = "New Folder";
if (cnt > 1)
t += " (" + to_string(cnt) + ")";
cnt++;
cout << t << '\n';
s.push_back(t);
} else {
int x;
cin >> x;
string t = s[x - 1];
t += " - Copy";
if (count(s.begin(), s.end(), t))
t += " (2)";
cout << t << '\n';
s.push_back(t);
}
}
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int _ = 1;
// cin >> _;
pre();
while (_--) solve();
return 0;
}
用户输出
New Folder
New Folder (2)
New Folder (3)
系统信息
Exited with return code 0
用户输出
New Folder
New Folder (2)
New Folder - Copy
系统信息
Exited with return code 0
用户输出
New Folder
New Folder (2)
New Folder (2) - Copy
系统信息
Exited with return code 0
用户输出
New Folder
New Folder - Copy
New Folder (2)
系统信息
Exited with return code 0
用户输出
New Folder
New Folder - Copy
New Folder - Copy (2)
系统信息
Exited with return code 0